コンテンツにスキップ

Function: snapshotAsOf()

このコンテンツはまだ日本語訳がありません。

snapshotAsOf<S>(options): Promise<Map<string, Map<string, Record<string, unknown>>>>

Defined in: server/src/time-travel.ts:19

Rebuild the state of a table at the moment cookie was current, by replaying every change_log entry with row_version <= cookie. Rows that were deleted before the cookie are absent; rows updated after the cookie reflect their earlier value.

Useful for audit dashboards, “compare with a week ago” UIs, and compliance replays. Cost is O(number of change log entries) — for production use with millions of writes you’d want a compaction job (v2-13) or a materialised snapshot table.

S extends Record<string, AnyTable>

S

SqlExecutor

string | number

SqlDialect

Promise<Map<string, Map<string, Record<string, unknown>>>>