Skip to content

Function: exportToPyStore() ​

exportToPyStore(manager): Promise<Map<string, Uint8Array<ArrayBufferLike>>>

Defined in: migrate-interop.ts:89

Exports every key in manager into py's layout. The result can be loaded into a py MigrationStateManager store dict (store[key] = value) and py will continue the history.

Parameters ​

manager ​

MigrationStateManager

The manager whose keys are exported.

Returns ​

Promise<Map<string, Uint8Array<ArrayBufferLike>>>

A map from "<id>_current" (the latest record) and "<id>_history" (all records, oldest first) to CBOR bytes.

Throws ​

if a stored history is corrupt.

Example ​

ts
const entries = await exportToPyStore(manager);
const latest = entries.get('orders_current'); // CBOR of the latest record of the key "orders"

Apache-2.0.