RealtimeStorageAdapter class abstract
Abstract contract for persisting MongoDB realtime documents locally.
Implement this interface to back the realtime cache with engines such as Hive, SQLite (Drift / sqflite), SharedPreferences, or custom storage.
- Implementers
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
clear(
) → Future< void> - Clears all stored collections and documents.
-
dispose(
) → Future< void> - Closes and releases any resources held by this adapter.
-
initialize(
) → Future< void> - Initializes the storage engine (e.g. opening boxes, DB tables, or directories).
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
readCollection(
String collection) → Future< List< JsonMap> > -
Reads all cached documents for the given
collection. -
readDocument(
String collection, String id) → Future< JsonMap?> -
Reads a single document by
collectionandid. -
removeDocument(
String collection, String id) → Future< void> -
Removes a document from
collectionbyid. -
toString(
) → String -
A string representation of this object.
inherited
-
writeCollection(
String collection, List< JsonMap> documents) → Future<void> -
Writes all cached documents for
collectionat once. -
writeDocument(
String collection, String id, JsonMap document) → Future< void> -
Writes or updates a single document in
collection.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited