Skip to content

basalt / drives/src / MemoryDriveConnectionStore

Class: MemoryDriveConnectionStore ​

Defined in: drives/src/store.ts:210

In-memory DriveConnectionStore. Production uses a durable store.

Implements ​

Constructors ​

Constructor ​

> new MemoryDriveConnectionStore(): MemoryDriveConnectionStore

Returns ​

MemoryDriveConnectionStore

Methods ​

create() ​

> create(record): Promise<void>

Defined in: drives/src/store.ts:213

Parameters ​

record ​

DriveConnection

Returns ​

Promise<void>

Implementation of ​

DriveConnectionStore.create


delete() ​

> delete(tenantId, id): Promise<void>

Defined in: drives/src/store.ts:248

Parameters ​

tenantId ​

string

id ​

string

Returns ​

Promise<void>

Implementation of ​

DriveConnectionStore.delete


find() ​

> find(tenantId, id): Promise<DriveConnection | null>

Defined in: drives/src/store.ts:217

Parameters ​

tenantId ​

string

id ​

string

Returns ​

Promise<DriveConnection | null>

Implementation of ​

DriveConnectionStore.find


list() ​

> list(tenantId, filter?): Promise<DriveConnection[]>

Defined in: drives/src/store.ts:222

Parameters ​

tenantId ​

string

filter? ​

DriveConnectionListFilter = {}

Returns ​

Promise<DriveConnection[]>

Implementation of ​

DriveConnectionStore.list


update() ​

> update(tenantId, id, patch, expectedRevision?): Promise<DriveConnection | null>

Defined in: drives/src/store.ts:233

Applies patch and bumps revision.

When expectedRevision is given the write applies only if the stored revision still matches; otherwise it must return null and change nothing. A store that ignores this argument is not safe to run more than one worker against — see DriveConnection.revision.

Parameters ​

tenantId ​

string

id ​

string

patch ​

DriveConnectionPatch

expectedRevision? ​

number

Returns ​

Promise<DriveConnection | null>

Implementation of ​

DriveConnectionStore.update

Released under the MIT License.