Skip to content

Class: MemoryMigrationStore ​

Defined in: migrate.ts:318

In-memory store, for tests and single-process tools. Atomic within the process.

Implements ​

Constructors ​

Constructor ​

new MemoryMigrationStore(): MemoryMigrationStore

Returns ​

MemoryMigrationStore

Methods ​

compareAndSet() ​

compareAndSet(key, expected, value): boolean

Defined in: migrate.ts:329

Optional but strongly recommended. Atomically sets key to value only if its current value is exactly expected (undefined means "the key must not exist"). Returns whether the write happened. Recipes: Redis WATCH/MULTI or a Lua script; Postgres UPDATE ... WHERE value = $expected (and INSERT ... ON CONFLICT DO NOTHING for absent); DynamoDB ConditionExpression; SQLite BEGIN IMMEDIATE. FileMigrationStore (subpath quantum-safe-ts/file-store) is a tested single-host implementation.

Parameters ​

key ​

string

expected ​

string | undefined

value ​

string

Returns ​

boolean

Implementation of ​

MigrationStore.compareAndSet


get() ​

get(key): string | undefined

Defined in: migrate.ts:320

Parameters ​

key ​

string

Returns ​

string | undefined

Implementation of ​

MigrationStore.get


keys() ​

keys(): string[]

Defined in: migrate.ts:326

Returns ​

string[]

Implementation of ​

MigrationStore.keys


set() ​

set(key, value): void

Defined in: migrate.ts:323

Parameters ​

key ​

string

value ​

string

Returns ​

void

Implementation of ​

MigrationStore.set

Apache-2.0.