Skip to content

SyncMapTransaction

Defined in: src/backends/store/map.ts:22

Transaction for map stores.

SyncMapStore

new SyncMapTransaction(store): SyncMapTransaction

Defined in: src/backends/store/store.ts:85

SyncMapStore

SyncMapTransaction

SyncTransaction.constructor

readonly store: SyncMapStore

Defined in: src/backends/store/map.ts:23

SyncTransaction.store

abort(): Promise<void>

Defined in: src/backends/store/store.ts:168

Discards the changes, which stores with the atomic flag must implement

Promise<void>

SyncTransaction.abort


optional abortSync(): void

Defined in: src/backends/store/store.ts:142

Discards the changes, which stores with the atomic flag must implement

void

SyncTransaction.abortSync


commit(): Promise<void>

Defined in: src/backends/store/store.ts:164

Applies the changes, which stores with the atomic flag must implement

Promise<void>

SyncTransaction.commit


optional commitSync(): void

Defined in: src/backends/store/store.ts:136

Applies the changes, which stores with the atomic flag must implement

void

SyncTransaction.commitSync


get(id, offset?, end?): Promise<Uint8Array<ArrayBufferLike> | undefined>

Defined in: src/backends/store/map.ts:30

Retrieves data.

number

The key to look under for data.

number

number

Promise<Uint8Array<ArrayBufferLike> | undefined>

SyncTransaction.get


getSync(id, offset?, end?): Uint8Array<ArrayBufferLike> | undefined

Defined in: src/backends/store/map.ts:34

Retrieves data. Throws an error if an error occurs or if the key does not exist.

number

The key to look under for data.

number

number

Uint8Array<ArrayBufferLike> | undefined

The data stored under the key, or undefined if not present.

SyncTransaction.getSync


keys(): Promise<Iterable<number, any, any>>

Defined in: src/backends/store/map.ts:26

Gets all of the keys

Promise<Iterable<number, any, any>>

SyncTransaction.keys


remove(id): Promise<void>

Defined in: src/backends/store/store.ts:160

Deletes the data at ino.

number

The key to delete from the store.

Promise<void>

SyncTransaction.remove


removeSync(id): void

Defined in: src/backends/store/map.ts:42

Deletes the data at ino.

number

The key to delete from the store.

void

SyncTransaction.removeSync


set(id, data, offset?): Promise<void>

Defined in: src/backends/store/store.ts:156

Stores data under an id. Without offset, replaces any existing data. With offset, writes the data at offset and keeps the rest, which partial stores must support.

number

Uint8Array

number

Promise<void>

SyncTransaction.set


setSync(id, data, offset?): void

Defined in: src/backends/store/map.ts:38

Stores data under an id. Without offset, replaces any existing data. With offset, writes the data at offset and keeps the rest, which partial stores must support.

number

Uint8Array

number

void

SyncTransaction.setSync