SqliteAtClientStorage class
Keystore and sync queue in one SQLite database at dbPath.
dbPath may be :memory:, which is what InMemoryAtClientStorage passes.
- Inheritance
-
- Object
- AtClientStorageBase
- SqliteAtClientStorage
- Implementers
Constructors
- SqliteAtClientStorage({required String atSign, required String dbPath, bool closedByClient = false})
- SqliteAtClientStorage.under({required String atSign, required String storagePath, bool closedByClient = false})
-
The database under
storagePathlaid out as the upstream factory does.
Properties
- atSign → String
-
final
- closedByClient → bool
-
Whether the client that attaches to this storage closes it on AtClient.stop.
finalinherited
- dbPath → String
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isAttached → bool
-
no setterinherited
-
keyStore
→ AtKeyValueStore<
String, AtData, AtMetaData?> -
no setteroverride
- location → String
-
The store this points at: the canonicalised database file plus the atSign
its keystore is keyed by, since one file can hold more than one atSign.
An in-memory database is private to the connection that opened it, so it
reports a token unique to this instance instead — two of those share
nothing and must not be refused as one store.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- syncQueue → AtSyncQueue
-
no setteroverride
Methods
-
attach(
AtClient owner) → Future< void> -
Claims this storage for
owner.inherited -
clear(
) → Future< void> -
Empties keystore and queue and forgets the last principal. Idempotent.
inherited
-
clearData(
) → Future< void> -
Empties keystore and queue.
override
-
close(
) → Future< void> -
Closes the backend. Idempotent.
inherited
-
closeBackend(
) → Future< void> -
Closes the backend. Called at most once, by close.
override
-
detach(
AtClient owner) → Future< void> -
Drops
owner's claim, keeping the backend open.inherited -
forgetPrincipal(
) → Future< void> -
Forgets which principal last held this storage, keeping the data.
inherited
-
isHeldBy(
AtClient client) → bool -
Whether
clientis the one currently holding this storage.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
openBackend(
) → Future< void> -
Opens the backend. Idempotent.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- inMemoryPath → const String
- The path SQLite treats as "not a file": a database private to its own connection.