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:75

SyncMapStore

SyncMapTransaction

SyncTransaction.constructor

readonly store: SyncMapStore

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

SyncTransaction.store

get(id): Promise<Uint8Array<ArrayBufferLike> | undefined>

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

Retrieves data.

number

The key to look under for data.

Promise<Uint8Array<ArrayBufferLike> | undefined>

SyncTransaction.get


getSync(id): 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.

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:138

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:134

Adds the data to the store under an id. Overwrites any existing data.

number

The key to add the data under.

Uint8Array

The data to add to the store.

number

Promise<void>

SyncTransaction.set


setSync(id, data): void

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

Adds the data to the store under and id.

number

The key to add the data under.

Uint8Array

The data to add to the store.

void

SyncTransaction.setSync