跳到主要内容

SqliteCoreKeyringStorage

Defined in: packages/rxdb-adapter-sqlite-core/src/keyring/sqlite-core-keyring-storage.ts:30

Persists the keyring singleton row in the adapter's own SQLite database via adapter.internalQuery. Used by both wa-sqlite and sqliteai inheritors.

Implements

Constructors

Constructor

new SqliteCoreKeyringStorage(adapter): SqliteCoreKeyringStorage;

Defined in: packages/rxdb-adapter-sqlite-core/src/keyring/sqlite-core-keyring-storage.ts:33

Parameters

ParameterType
adapterRxDBAdapterSqliteBase

Returns

SqliteCoreKeyringStorage

Methods

readSingleton()

readSingleton(): Promise<
| KeyringRow
| null>;

Defined in: packages/rxdb-adapter-sqlite-core/src/keyring/sqlite-core-keyring-storage.ts:35

Returns the singleton row or null if the keyring table is empty.

Returns

Promise< | KeyringRow | null>

Implementation of

KeyringStorageBinding.readSingleton


writeSingleton()

writeSingleton(row): Promise<void>;

Defined in: packages/rxdb-adapter-sqlite-core/src/keyring/sqlite-core-keyring-storage.ts:52

Insert the singleton row. Implementations MUST fail with a EncryptedConfigurationError(code: 'keyring_singleton_conflict') if a row already exists (use INSERT OR FAIL / INSERT … ON CONFLICT DO NOTHING

  • verification).

Parameters

ParameterType
rowKeyringRow

Returns

Promise<void>

Implementation of

KeyringStorageBinding.writeSingleton