abstractdb library
A flexible document database abstraction layer for Dart and Flutter supporting pluggable persistence, replication, reactivity, and query capabilities.
Classes
- AbstractDb
- Default implementation of database managing collections.
- AddToSetModifier
- A modifier that adds value to the array at selector if not already present.
- AllFilter
- AndFilter
- A logical AND filter that combines multiple filters.
-
Collection<
I> - A collection is a group of documents in a database.
- CurrentDateModifier
- A modifier that sets the field at selector to the current UTC timestamp.
-
Cursor<
I> - An abstract representation of a database query result cursor.
-
DataTransfer<
I> - Represents a data transfer object containing changes to a collection.
-
Document<
I> - A representation of a database document.
- DocumentSizeInfo
- Size information about a document.
- EqualsFilter
- Filter to assert that a field equals a value.
- FailResolver
- Contract for defining fail resolution strategies as conflicts and others
- FieldBasedFilter
- Base class for filters targeted at a specific document field.
- Filter
- The base definition for all query filters.
- FilterBuilder
- Helper class to construct filters for a specific field.
-
FindCursor<
I> - A cursor specialized for finding documents.
-
ForeignKeyIndex<
I> - An index that enforces foreign key constraints and maps field value -> document IDs.
- GreaterEqualFilter
- Filter to assert that a field is greater than or equal to a comparable value.
- GreaterThanFilter
- Filter to assert that a field is greater than a comparable value.
- IncModifier
- A modifier that increments the field at selector by value.
-
IndexProvider<
I> - An abstract representation of a database index.
- InFilter
- Filter to check if field value is in a list of allowed values.
-
InMemoryStore<
I> - An in-memory cache and document store implementation of StoreProvider.
- LesserEqualFilter
- Filter to assert that a field is less than or equal to a comparable value.
- LesserThanFilter
- Filter to assert that a field is less than a comparable value.
- LogicalFilter
- Base class for logical filters.
- MaxModifier
- A modifier that sets the field at selector to the maximum of its current value and value.
- Migration
- A basic implementation of database schema/data migration.
- MinModifier
- A modifier that sets the field at selector to the minimum of its current value and value.
- Modifier
- An abstract representation of database update modifiers.
- ModifierBuilder
- Helper class to construct modifiers for a specific field.
- Modifiers
- A combined group of modifiers applied sequentially.
- MulModifier
- A modifier that multiplies the field at selector by value.
-
NonUniqueEqualityIndex<
I> - An index that maps field value -> multiple document IDs.
- NotFilter
- A logical NOT filter negating a nested filter.
- NotInFilter
- Filter to check if field value is not in a list of values.
- OrFilter
- A logical OR filter that combines multiple filters.
-
PersistenceProvider<
I> - Interface for persistence providers.
-
PersistenceProviderAdapter<
I> - PopModifier
- A modifier that pops an element from the array at selector.
- PullModifier
- A modifier that removes elements matching predicate from the array at selector.
- PushModifier
- A modifier that pushes value into the array at selector.
- Query
- An abstract representation of a database query filter/criteria.
-
ReactivityProvider<
I> - Optional provider/adapter interface for integrating external reactivity frameworks (such as MobX, Signals, ValueNotifier, etc.) with AbstractDB.
-
ReactivityProviderAdapter<
I> - RegexFilter
- Filter to assert that a field matches a regular expression.
-
RemoveCursor<
I> - A cursor specialized for deleting documents.
- RenameModifier
- A modifier that renames the field at selector to newField.
-
ReplicatorProvider<
I> - An abstract representation of database collection replication.
-
ReplicatorProviderAdapter<
I> - SchemaInfo
- Holds version information for a database schema.
-
SembastPersistence<
I> - A persistence provider implementing Sembast-backed local document storage.
- SetModifier
- A modifier that sets the field at selector to value.
-
SignalsReactivityProvider<
I> -
A reactivity provider that transforms cursor query results into a
Signal. - SortModifier
- A modifier that sorts the array at selector.
-
StoreProvider<
I> - An abstract representation of an in-memory/cached store for a collection.
- StubAbstractDb
-
StubCollection<
I> -
SupabaseReplicator<
I> - A replicator provider that synchronizes collections with a Supabase PostgreSQL backend.
- SyncEvent
- Represents a locally registered sync event that needs to be synchronized. Each sync event has a strict sequence number to ensure serialization.
- SyncPointers
- Holds the current state of local and remote synchronization pointers.
- SyncQueue
- The sync queue contract.
- SyncTriggerPolicy
- Define a política de gatilho para o disparo de sincronizações ativas. A sincronização deve ocorrer quando QUALQUER uma das condições for atingida primeiro.
- TextFilter
- Filter to search for text substring matches.
-
TextIndexer<
I> - A fuzzy text search index provider.
- Transaction
- A handle to perform isolated database operations within a transaction block.
-
UniqueEqualityIndex<
I> - An index that enforces uniqueness on the indexed field and maps field value -> document ID.
- UnsetModifier
- A modifier that removes/unsets the field at selector.
-
UpdateCursor<
I> - A cursor specialized for updating documents.
-
ValueNotifier<
T> - A pure Dart implementation of ValueNotifier to keep the library platform-agnostic.
-
ValueNotifierReactivityProvider<
I> - A reactivity provider that transforms cursor query results into a ValueNotifier.
Enums
- SyncAction
- Represents the atomic action that occurred on a specific record or sync phase.
- SyncEventState
- Represents the state of a sync event.
- SyncMode
- Represents a synchronization propagation mode.
- SyncWay
- Represents a synchronization direction (upload/download).
Extensions
Constants
- defaultPgmqSchemaName → const String
- defaultSyncTriggerPolicy → const SyncTriggerPolicy
Functions
-
and(
List< Filter> filters) → Filter -
Creates a logical AndFilter from a list of
filters. -
deepEquals(
dynamic value, dynamic other) → bool - Deep equality comparison helper for dynamic types (maps, lists, sets, values). Deep equality comparison helper for dynamic types (maps, lists, sets, values).
-
not(
Filter filter) → Filter -
Creates a logical NotFilter negating the given
filter. -
or(
List< Filter> filters) → Filter -
Creates a logical OrFilter from a list of
filters. -
update(
String field) → ModifierBuilder -
Creates a ModifierBuilder for the specified
field. -
where(
String field) → FilterBuilder -
Creates a FilterBuilder for the specified
field.
Exceptions / Errors
- RollbackException
- An exception thrown to manually abort and rollback a transaction.