DataLocalDatabase class final

Open DataLocal 2.0 database instance.

Properties

changes Stream<DataLocalCommitEvent>
Commit events emitted after successful mutations.
no setter
hashCode int
The hash code for this object.
no setterinherited
isClosed bool
Whether this database has completed closing.
no setter
name String
Validated name used to namespace every stored record.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
storageCapabilities DataLocalStorageCapabilities
Capabilities advertised by the configured storage provider.
no setter

Methods

close() Future<void>
Drains accepted writes, closes storage and event streams.
collection<T>(String name, {required DataLocalCodec<T> codec}) DataLocalCollection<T>
Returns a typed collection using codec for serialization.
mapCollection(String name) DataLocalCollection<Map<String, Object?>>
Returns a map-backed collection named name.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
writeBatch(void build(DataLocalWriteBatch batch)) Future<void>
Atomically commits the mutations added synchronously by build.

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

open({required String name, required DataLocalStorage storage, DataLocalEncryptionProvider encryption = const DataLocalNoEncryptionProvider(), DataLocalClock clock = const DataLocalSystemClock(), DataLocalDocumentIdGenerator? idGenerator, DataLocalFailureInjector? failureInjector}) Future<DataLocalDatabase>
Opens a database and performs pending journal recovery.