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
get()
get(
key):string|undefined
Defined in: migrate.ts:320
Parameters
key
string
Returns
string | undefined
Implementation of
keys()
keys():
string[]
Defined in: migrate.ts:326
Returns
string[]
Implementation of
set()
set(
key,value):void
Defined in: migrate.ts:323
Parameters
key
string
value
string
Returns
void