@minnowdb/core 0.2.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -32
- package/dist/block-format/block.d.ts +32 -13
- package/dist/block-format/block.js +179 -55
- package/dist/block-format/checksum.d.ts +2 -1
- package/dist/block-format/checksum.js +5 -2
- package/dist/block-format/codecs.d.ts +7 -2
- package/dist/block-format/codecs.js +53 -12
- package/dist/block-format/column.d.ts +3 -2
- package/dist/block-format/column.js +96 -30
- package/dist/block-format/index.d.ts +2 -2
- package/dist/block-format/index.js +2 -2
- package/dist/block-format/physical.d.ts +8 -2
- package/dist/block-format/physical.js +14 -6
- package/dist/block-format/types.d.ts +7 -3
- package/dist/block-format/types.js +0 -1
- package/dist/block-format/unicode.d.ts +11 -0
- package/dist/block-format/unicode.js +46 -0
- package/dist/date-value.d.ts +15 -0
- package/dist/date-value.js +64 -0
- package/dist/engine/artifact-cache.d.ts +2 -1
- package/dist/engine/artifact-cache.js +5 -1
- package/dist/engine/batch.d.ts +11 -3
- package/dist/engine/batch.js +17 -7
- package/dist/engine/buffered-writer.d.ts +2 -1
- package/dist/engine/buffered-writer.js +34 -9
- package/dist/engine/cache-limits.d.ts +25 -0
- package/dist/engine/cache-limits.js +25 -0
- package/dist/engine/catalog.d.ts +24 -5
- package/dist/engine/catalog.js +34 -7
- package/dist/engine/client.d.ts +29 -7
- package/dist/engine/client.js +216 -40
- package/dist/engine/database.d.ts +224 -39
- package/dist/engine/database.js +7475 -1539
- package/dist/engine/defaults.d.ts +4 -8
- package/dist/engine/defaults.js +46 -22
- package/dist/engine/errors.d.ts +19 -1
- package/dist/engine/errors.js +32 -2
- package/dist/engine/fts.d.ts +0 -6
- package/dist/engine/fts.js +41 -14
- package/dist/engine/group-index.d.ts +0 -1
- package/dist/engine/group-index.js +6 -11
- package/dist/engine/index.d.ts +16 -10
- package/dist/engine/index.js +12 -9
- package/dist/engine/join-index.d.ts +0 -1
- package/dist/engine/join-index.js +2 -2
- package/dist/engine/keyed-live.d.ts +57 -0
- package/dist/engine/keyed-live.js +226 -0
- package/dist/engine/live-api.d.ts +4 -0
- package/dist/engine/live-api.js +4 -0
- package/dist/engine/live.d.ts +43 -26
- package/dist/engine/live.js +504 -126
- package/dist/engine/memory.d.ts +2 -1
- package/dist/engine/memory.js +3 -2
- package/dist/engine/optimizer.d.ts +0 -1
- package/dist/engine/optimizer.js +262 -27
- package/dist/engine/query-api.d.ts +3 -0
- package/dist/engine/query-api.js +3 -0
- package/dist/engine/query-cache.d.ts +1 -2
- package/dist/engine/query-cache.js +7 -5
- package/dist/engine/query.d.ts +134 -29
- package/dist/engine/query.js +1668 -372
- package/dist/engine/result-wire.d.ts +0 -1
- package/dist/engine/result-wire.js +2 -2
- package/dist/engine/schema-wire.d.ts +6 -3
- package/dist/engine/schema-wire.js +40 -34
- package/dist/engine/schema.d.ts +156 -80
- package/dist/engine/schema.js +570 -108
- package/dist/engine/sort-keys.d.ts +4 -4
- package/dist/engine/sort-keys.js +44 -29
- package/dist/engine/sql-domains.d.ts +31 -0
- package/dist/engine/sql-domains.js +585 -0
- package/dist/engine/sql-driver.d.ts +19 -0
- package/dist/engine/sql-driver.js +1 -0
- package/dist/engine/sql-json.d.ts +7 -9
- package/dist/engine/sql-json.js +75 -15
- package/dist/engine/sql-semantics.d.ts +8 -3
- package/dist/engine/sql-semantics.js +458 -30
- package/dist/engine/typed-live.d.ts +67 -0
- package/dist/engine/typed-live.js +349 -0
- package/dist/engine/vector.d.ts +12 -2
- package/dist/engine/vector.js +635 -119
- package/dist/engine/worker-host.d.ts +9 -2
- package/dist/engine/worker-host.js +620 -152
- package/dist/engine/worker.d.ts +0 -1
- package/dist/engine/worker.js +3 -3
- package/dist/engine/write-block-planner.d.ts +18 -0
- package/dist/engine/write-block-planner.js +112 -0
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/plan/index.d.ts +3 -4
- package/dist/plan/index.js +3 -4
- package/dist/storage/index.d.ts +1 -1
- package/dist/storage/index.js +1 -1
- package/dist/storage/indexeddb.d.ts +99 -51
- package/dist/storage/indexeddb.js +13448 -2660
- package/dist/storage/memory.d.ts +64 -57
- package/dist/storage/memory.js +1042 -128
- package/dist/storage/opfs/files.d.ts +18 -7
- package/dist/storage/opfs/files.js +115 -28
- package/dist/storage/opfs/index.d.ts +1 -1
- package/dist/storage/opfs/index.js +1 -1
- package/dist/storage/opfs/leader.d.ts +409 -75
- package/dist/storage/opfs/leader.js +4621 -650
- package/dist/storage/opfs/rpc.d.ts +15 -3
- package/dist/storage/opfs/rpc.js +224 -2
- package/dist/storage/opfs/snapshot-ledger.d.ts +40 -0
- package/dist/storage/opfs/snapshot-ledger.js +281 -0
- package/dist/storage/opfs/store.d.ts +33 -99
- package/dist/storage/opfs/store.js +453 -364
- package/dist/storage/persistence.d.ts +37 -0
- package/dist/storage/persistence.js +78 -0
- package/dist/storage/snapshot-stream.d.ts +24 -0
- package/dist/storage/snapshot-stream.js +897 -0
- package/dist/storage/snapshot.d.ts +9 -85
- package/dist/storage/snapshot.js +33 -265
- package/dist/storage/toolkit/extents.d.ts +41 -7
- package/dist/storage/toolkit/extents.js +402 -39
- package/dist/storage/toolkit/index.d.ts +4 -5
- package/dist/storage/toolkit/index.js +28 -4
- package/dist/storage/toolkit/record-core.d.ts +182 -55
- package/dist/storage/toolkit/record-core.js +6158 -1331
- package/dist/storage/toolkit/sync-file.d.ts +10 -1
- package/dist/storage/toolkit/sync-file.js +50 -2
- package/dist/storage/toolkit/wal.d.ts +23 -5
- package/dist/storage/toolkit/wal.js +89 -27
- package/dist/storage/toolkit/wire.d.ts +15 -2
- package/dist/storage/toolkit/wire.js +199 -10
- package/dist/storage/types.d.ts +1439 -204
- package/dist/storage/types.js +1745 -141
- package/dist/testing/block-store-conformance.d.ts +0 -1
- package/dist/testing/block-store-conformance.js +1009 -119
- package/dist/testing/index.d.ts +46 -26
- package/dist/testing/index.js +112 -57
- package/dist/testing/opfs-shim.d.ts +13 -3
- package/dist/testing/opfs-shim.js +40 -6
- package/dist/testing/simulator.d.ts +97 -0
- package/dist/testing/simulator.js +591 -0
- package/dist/testing/sqllogictest.d.ts +89 -0
- package/dist/testing/sqllogictest.js +434 -0
- package/dist/transactions/index.d.ts +92 -16
- package/dist/transactions/index.js +1074 -236
- package/dist/worker-protocol/index.d.ts +3 -2
- package/dist/worker-protocol/index.js +2 -5
- package/package.json +53 -3
- package/postgres-feature-profile.json +223 -0
- package/sql-feature-matrix.json +172 -252
- package/dist/block-format/block.d.ts.map +0 -1
- package/dist/block-format/block.js.map +0 -1
- package/dist/block-format/checksum.d.ts.map +0 -1
- package/dist/block-format/checksum.js.map +0 -1
- package/dist/block-format/codecs.d.ts.map +0 -1
- package/dist/block-format/codecs.js.map +0 -1
- package/dist/block-format/column.d.ts.map +0 -1
- package/dist/block-format/column.js.map +0 -1
- package/dist/block-format/index.d.ts.map +0 -1
- package/dist/block-format/index.js.map +0 -1
- package/dist/block-format/physical.d.ts.map +0 -1
- package/dist/block-format/physical.js.map +0 -1
- package/dist/block-format/types.d.ts.map +0 -1
- package/dist/block-format/types.js.map +0 -1
- package/dist/engine/artifact-cache.d.ts.map +0 -1
- package/dist/engine/artifact-cache.js.map +0 -1
- package/dist/engine/batch.d.ts.map +0 -1
- package/dist/engine/batch.js.map +0 -1
- package/dist/engine/buffered-writer.d.ts.map +0 -1
- package/dist/engine/buffered-writer.js.map +0 -1
- package/dist/engine/catalog.d.ts.map +0 -1
- package/dist/engine/catalog.js.map +0 -1
- package/dist/engine/client.d.ts.map +0 -1
- package/dist/engine/client.js.map +0 -1
- package/dist/engine/coordinator.d.ts +0 -17
- package/dist/engine/coordinator.d.ts.map +0 -1
- package/dist/engine/coordinator.js +0 -60
- package/dist/engine/coordinator.js.map +0 -1
- package/dist/engine/database.d.ts.map +0 -1
- package/dist/engine/database.js.map +0 -1
- package/dist/engine/defaults.d.ts.map +0 -1
- package/dist/engine/defaults.js.map +0 -1
- package/dist/engine/errors.d.ts.map +0 -1
- package/dist/engine/errors.js.map +0 -1
- package/dist/engine/fts.d.ts.map +0 -1
- package/dist/engine/fts.js.map +0 -1
- package/dist/engine/group-index.d.ts.map +0 -1
- package/dist/engine/group-index.js.map +0 -1
- package/dist/engine/index.d.ts.map +0 -1
- package/dist/engine/index.js.map +0 -1
- package/dist/engine/join-index.d.ts.map +0 -1
- package/dist/engine/join-index.js.map +0 -1
- package/dist/engine/live.d.ts.map +0 -1
- package/dist/engine/live.js.map +0 -1
- package/dist/engine/memory.d.ts.map +0 -1
- package/dist/engine/memory.js.map +0 -1
- package/dist/engine/optimizer.d.ts.map +0 -1
- package/dist/engine/optimizer.js.map +0 -1
- package/dist/engine/query-cache.d.ts.map +0 -1
- package/dist/engine/query-cache.js.map +0 -1
- package/dist/engine/query.d.ts.map +0 -1
- package/dist/engine/query.js.map +0 -1
- package/dist/engine/result-wire.d.ts.map +0 -1
- package/dist/engine/result-wire.js.map +0 -1
- package/dist/engine/schema-wire.d.ts.map +0 -1
- package/dist/engine/schema-wire.js.map +0 -1
- package/dist/engine/schema.d.ts.map +0 -1
- package/dist/engine/schema.js.map +0 -1
- package/dist/engine/sort-keys.d.ts.map +0 -1
- package/dist/engine/sort-keys.js.map +0 -1
- package/dist/engine/sql-json.d.ts.map +0 -1
- package/dist/engine/sql-json.js.map +0 -1
- package/dist/engine/sql-semantics.d.ts.map +0 -1
- package/dist/engine/sql-semantics.js.map +0 -1
- package/dist/engine/vector.d.ts.map +0 -1
- package/dist/engine/vector.js.map +0 -1
- package/dist/engine/worker-host.d.ts.map +0 -1
- package/dist/engine/worker-host.js.map +0 -1
- package/dist/engine/worker.d.ts.map +0 -1
- package/dist/engine/worker.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/plan/index.d.ts.map +0 -1
- package/dist/plan/index.js.map +0 -1
- package/dist/storage/fixture-shape.d.ts +0 -42
- package/dist/storage/fixture-shape.d.ts.map +0 -1
- package/dist/storage/fixture-shape.js +0 -146
- package/dist/storage/fixture-shape.js.map +0 -1
- package/dist/storage/index.d.ts.map +0 -1
- package/dist/storage/index.js.map +0 -1
- package/dist/storage/indexeddb.d.ts.map +0 -1
- package/dist/storage/indexeddb.js.map +0 -1
- package/dist/storage/memory.d.ts.map +0 -1
- package/dist/storage/memory.js.map +0 -1
- package/dist/storage/opfs/files.d.ts.map +0 -1
- package/dist/storage/opfs/files.js.map +0 -1
- package/dist/storage/opfs/index.d.ts.map +0 -1
- package/dist/storage/opfs/index.js.map +0 -1
- package/dist/storage/opfs/leader.d.ts.map +0 -1
- package/dist/storage/opfs/leader.js.map +0 -1
- package/dist/storage/opfs/rpc.d.ts.map +0 -1
- package/dist/storage/opfs/rpc.js.map +0 -1
- package/dist/storage/opfs/store.d.ts.map +0 -1
- package/dist/storage/opfs/store.js.map +0 -1
- package/dist/storage/snapshot.d.ts.map +0 -1
- package/dist/storage/snapshot.js.map +0 -1
- package/dist/storage/toolkit/extents.d.ts.map +0 -1
- package/dist/storage/toolkit/extents.js.map +0 -1
- package/dist/storage/toolkit/index.d.ts.map +0 -1
- package/dist/storage/toolkit/index.js.map +0 -1
- package/dist/storage/toolkit/record-core.d.ts.map +0 -1
- package/dist/storage/toolkit/record-core.js.map +0 -1
- package/dist/storage/toolkit/sync-file.d.ts.map +0 -1
- package/dist/storage/toolkit/sync-file.js.map +0 -1
- package/dist/storage/toolkit/wal.d.ts.map +0 -1
- package/dist/storage/toolkit/wal.js.map +0 -1
- package/dist/storage/toolkit/wire.d.ts.map +0 -1
- package/dist/storage/toolkit/wire.js.map +0 -1
- package/dist/storage/types.d.ts.map +0 -1
- package/dist/storage/types.js.map +0 -1
- package/dist/testing/block-store-conformance.d.ts.map +0 -1
- package/dist/testing/block-store-conformance.js.map +0 -1
- package/dist/testing/index.d.ts.map +0 -1
- package/dist/testing/index.js.map +0 -1
- package/dist/testing/opfs-shim.d.ts.map +0 -1
- package/dist/testing/opfs-shim.js.map +0 -1
- package/dist/testing/seeds.d.ts +0 -11
- package/dist/testing/seeds.d.ts.map +0 -1
- package/dist/testing/seeds.js +0 -50
- package/dist/testing/seeds.js.map +0 -1
- package/dist/transactions/index.d.ts.map +0 -1
- package/dist/transactions/index.js.map +0 -1
- package/dist/worker-protocol/index.d.ts.map +0 -1
- package/dist/worker-protocol/index.js.map +0 -1
|
@@ -1,6 +1,356 @@
|
|
|
1
|
-
import { type BeginTransactionInput, type BeginTransactionResult, type
|
|
2
|
-
import type { DatabaseSnapshot, SnapshotLoadProgress } from "../snapshot.js";
|
|
1
|
+
import { type BeginTransactionInput, type BeginTransactionResult, type CloseSnapshotExportInput, type CancelSnapshotImportInput, type InterruptedSnapshotImportAbortResult, type AbortTransactionIfExpiredInput, type AdoptAbortedSegmentInput, type RenewTransactionInput, type CommitTransactionInput, type CompactionJobRecord, type CompactionJobRecordUpdate, type CreateGarbageCollectionJobInput, type UpdateGarbageCollectionPlanningInput, type DropTableColumnInput, type DropTableInput, type FtsCandidates, type FtsPostingQuery, type FtsPosting, type GarbageCollectionJobRecord, type GarbageCollectionStepResult, type LeaseRecord, type MoveLeaseInput, type ManifestSummary, type ManifestBlockPage, type ListManifestBlockPageInput, type ListRetiredManifestBlockPageInput, type RollbackTransactionArtifactsInput, type RenewLeaseInput, type RenewTempOwnerInput, type RunGarbageCollectionStepInput, type SegmentRecord, type StageTransactionArtifactsInput, type StoragePage, type StorageIntegrityMode, type StorageIntegrityReport, type StorageStats, type CatalogMutationOptions, type TableRecord, type TableRecordUpdate, type TempOwnerRecord, type TempRunPage, type TransactionRecord, type TransactionRecordUpdate, type WriteTransactionInput, type BeginUniqueKeyBuildInput, type RenewUniqueKeyBuildInput, type AppendUniqueKeyBuildChunkInput, type FinishUniqueKeyBuildInput, type AbortUniqueKeyBuildInput, type BeginPostingBuildInput, type RenewPostingBuildInput, type AppendPostingBuildChunkInput, type FinishPostingBuildInput, type AbortPostingBuildInput, type BeginSnapshotFrameExportInput, type BeginSnapshotFrameImportInput, type ReadSnapshotExportFrameInput, type RenewSnapshotFrameImportInput, type AppendSnapshotImportFramesInput, type FinishSnapshotFrameImportInput, type SnapshotFrame, type SnapshotFrameExportSession, type SnapshotFrameImportSession, type SnapshotFrameKind, type SnapshotFrameStreamHeader } from "../types.js";
|
|
3
2
|
import { OpfsTree } from "./files.js";
|
|
3
|
+
import { type Placement } from "../toolkit/extents.js";
|
|
4
|
+
/** A failed checkpoint may defer compaction, but the recovery log itself stays bounded. */
|
|
5
|
+
export declare const MAX_OPFS_WAL_BYTES: number;
|
|
6
|
+
export declare const MAX_OPFS_CHECKPOINT_BYTES: number;
|
|
7
|
+
/** Failed physical reclamation cannot permit byte-growing work forever. */
|
|
8
|
+
export declare const MAX_OPFS_CLEANUP_DEBT_BYTES: number;
|
|
9
|
+
interface IdPlacement {
|
|
10
|
+
id: string;
|
|
11
|
+
placement: Placement;
|
|
12
|
+
}
|
|
13
|
+
interface BlockRelocation {
|
|
14
|
+
id: string;
|
|
15
|
+
from: Placement;
|
|
16
|
+
placement: Placement;
|
|
17
|
+
}
|
|
18
|
+
interface FtsChunkRelocation {
|
|
19
|
+
key: string;
|
|
20
|
+
ordinal: number;
|
|
21
|
+
from: Placement;
|
|
22
|
+
placement: Placement;
|
|
23
|
+
}
|
|
24
|
+
interface FtsBuildChunkRelocation extends FtsChunkRelocation {
|
|
25
|
+
buildId: string;
|
|
26
|
+
}
|
|
27
|
+
interface FtsBasePointer {
|
|
28
|
+
coversVersion: number;
|
|
29
|
+
totalTokens: number;
|
|
30
|
+
chunks: Placement[];
|
|
31
|
+
chunkBounds: Array<{
|
|
32
|
+
first: string;
|
|
33
|
+
last: string;
|
|
34
|
+
}>;
|
|
35
|
+
}
|
|
36
|
+
interface TempPageLedgerRecord {
|
|
37
|
+
ownerId: string;
|
|
38
|
+
runId: string;
|
|
39
|
+
pageIndex: number;
|
|
40
|
+
length: number;
|
|
41
|
+
}
|
|
42
|
+
interface SnapshotFrameExportState {
|
|
43
|
+
sessionId: string;
|
|
44
|
+
ownerId: string;
|
|
45
|
+
createdAt: string;
|
|
46
|
+
expiresAt: string;
|
|
47
|
+
leaseRevision: number;
|
|
48
|
+
manifestVersion: number;
|
|
49
|
+
header: SnapshotFrameStreamHeader;
|
|
50
|
+
ledgerId: string;
|
|
51
|
+
ledgerLength: number;
|
|
52
|
+
metadataFrameCount: number;
|
|
53
|
+
nextSequence: number;
|
|
54
|
+
metadataOffset: number;
|
|
55
|
+
blockCursor: string | null;
|
|
56
|
+
lastSequence: number | null;
|
|
57
|
+
lastMetadataOffset: number | null;
|
|
58
|
+
lastBlockId: string | null;
|
|
59
|
+
}
|
|
60
|
+
interface SnapshotFrameObservedState {
|
|
61
|
+
frameCount: number;
|
|
62
|
+
itemCount: number;
|
|
63
|
+
storedBytes: number;
|
|
64
|
+
}
|
|
65
|
+
interface SnapshotFrameImportState {
|
|
66
|
+
identity: string;
|
|
67
|
+
ownerId: string;
|
|
68
|
+
version: number;
|
|
69
|
+
createdAt: string;
|
|
70
|
+
expiresAt: string;
|
|
71
|
+
header: SnapshotFrameStreamHeader;
|
|
72
|
+
ledgerId: string;
|
|
73
|
+
ledgerLength: number;
|
|
74
|
+
nextSequence: number;
|
|
75
|
+
stagedBytes: number;
|
|
76
|
+
blockCount: number;
|
|
77
|
+
blockBytes: number;
|
|
78
|
+
checksum: number;
|
|
79
|
+
currentKindIndex: number;
|
|
80
|
+
observed: Record<SnapshotFrameKind, SnapshotFrameObservedState>;
|
|
81
|
+
lastBatchStartSequence: number | null;
|
|
82
|
+
lastBatchOffset: number | null;
|
|
83
|
+
lastBatchFrameCount: number;
|
|
84
|
+
completedReplay: boolean;
|
|
85
|
+
}
|
|
86
|
+
type WalEntryBody = {
|
|
87
|
+
op: "relocatePayloads";
|
|
88
|
+
blocks: BlockRelocation[];
|
|
89
|
+
ftsChunks: FtsChunkRelocation[];
|
|
90
|
+
ftsBuildChunks: FtsBuildChunkRelocation[];
|
|
91
|
+
} | {
|
|
92
|
+
op: "addTable";
|
|
93
|
+
record: TableRecord;
|
|
94
|
+
expectedCatalogEpoch: number | null;
|
|
95
|
+
} | {
|
|
96
|
+
op: "updateTable";
|
|
97
|
+
id: string;
|
|
98
|
+
expectedRevision: number;
|
|
99
|
+
update: TableRecordUpdate;
|
|
100
|
+
} | {
|
|
101
|
+
op: "removeTable";
|
|
102
|
+
id: string;
|
|
103
|
+
expectedRevision: number;
|
|
104
|
+
expectedCatalogEpoch: number | null;
|
|
105
|
+
} | {
|
|
106
|
+
op: "dropTable";
|
|
107
|
+
input: DropTableInput;
|
|
108
|
+
} | {
|
|
109
|
+
op: "dropTableColumn";
|
|
110
|
+
input: DropTableColumnInput;
|
|
111
|
+
} | {
|
|
112
|
+
op: "removeFtsColumn";
|
|
113
|
+
tableId: string;
|
|
114
|
+
columnId: string;
|
|
115
|
+
} | {
|
|
116
|
+
op: "removeAbortedSegment";
|
|
117
|
+
id: string;
|
|
118
|
+
expectedTransactionId: string;
|
|
119
|
+
} | {
|
|
120
|
+
op: "adoptAbortedSegment";
|
|
121
|
+
input: AdoptAbortedSegmentInput;
|
|
122
|
+
} | {
|
|
123
|
+
op: "reserveRowIds";
|
|
124
|
+
tableId: string;
|
|
125
|
+
count: number;
|
|
126
|
+
} | {
|
|
127
|
+
op: "beginUniqueKeyBuild";
|
|
128
|
+
input: BeginUniqueKeyBuildInput;
|
|
129
|
+
} | {
|
|
130
|
+
op: "renewUniqueKeyBuild";
|
|
131
|
+
input: RenewUniqueKeyBuildInput;
|
|
132
|
+
} | {
|
|
133
|
+
op: "appendUniqueKeyBuildChunk";
|
|
134
|
+
input: AppendUniqueKeyBuildChunkInput;
|
|
135
|
+
} | {
|
|
136
|
+
op: "finishUniqueKeyBuild";
|
|
137
|
+
input: FinishUniqueKeyBuildInput;
|
|
138
|
+
} | {
|
|
139
|
+
op: "abortUniqueKeyBuild";
|
|
140
|
+
input: AbortUniqueKeyBuildInput;
|
|
141
|
+
} | {
|
|
142
|
+
op: "reserveAutoIncrement";
|
|
143
|
+
tableId: string;
|
|
144
|
+
columnId: string;
|
|
145
|
+
count: number;
|
|
146
|
+
atLeast?: bigint;
|
|
147
|
+
} | {
|
|
148
|
+
op: "beginTransaction";
|
|
149
|
+
input: BeginTransactionInput;
|
|
150
|
+
} | {
|
|
151
|
+
op: "createTransaction";
|
|
152
|
+
record: TransactionRecord;
|
|
153
|
+
} | {
|
|
154
|
+
op: "renewTransaction";
|
|
155
|
+
input: RenewTransactionInput;
|
|
156
|
+
} | {
|
|
157
|
+
op: "abortTransactionIfExpired";
|
|
158
|
+
input: AbortTransactionIfExpiredInput;
|
|
159
|
+
} | {
|
|
160
|
+
op: "updateTransaction";
|
|
161
|
+
id: string;
|
|
162
|
+
expectedRevision: number;
|
|
163
|
+
update: TransactionRecordUpdate;
|
|
164
|
+
} | {
|
|
165
|
+
op: "stageTransactionArtifacts";
|
|
166
|
+
transactionId: string;
|
|
167
|
+
expectedRevision: number;
|
|
168
|
+
blocks: IdPlacement[];
|
|
169
|
+
segments: SegmentRecord[];
|
|
170
|
+
updatedAt: string;
|
|
171
|
+
} | {
|
|
172
|
+
op: "rollbackTransactionArtifacts";
|
|
173
|
+
input: RollbackTransactionArtifactsInput;
|
|
174
|
+
} | {
|
|
175
|
+
op: "commitTransaction";
|
|
176
|
+
input: CommitTransactionInput;
|
|
177
|
+
} | {
|
|
178
|
+
op: "writeTransaction";
|
|
179
|
+
input: Omit<WriteTransactionInput, "blocks">;
|
|
180
|
+
blocks: IdPlacement[];
|
|
181
|
+
} | {
|
|
182
|
+
op: "createLease";
|
|
183
|
+
record: LeaseRecord;
|
|
184
|
+
} | {
|
|
185
|
+
op: "renewLease";
|
|
186
|
+
input: RenewLeaseInput;
|
|
187
|
+
} | {
|
|
188
|
+
op: "moveLease";
|
|
189
|
+
input: MoveLeaseInput;
|
|
190
|
+
} | {
|
|
191
|
+
op: "removeLeaseIfExpired";
|
|
192
|
+
id: string;
|
|
193
|
+
expectedRevision: number;
|
|
194
|
+
expiresAtCutoff: string;
|
|
195
|
+
} | {
|
|
196
|
+
op: "removeLease";
|
|
197
|
+
input: {
|
|
198
|
+
id: string;
|
|
199
|
+
ownerId: string;
|
|
200
|
+
};
|
|
201
|
+
} | {
|
|
202
|
+
op: "createCompactionJob";
|
|
203
|
+
record: CompactionJobRecord;
|
|
204
|
+
} | {
|
|
205
|
+
op: "updateCompactionJob";
|
|
206
|
+
id: string;
|
|
207
|
+
expectedRevision: number;
|
|
208
|
+
update: CompactionJobRecordUpdate;
|
|
209
|
+
} | {
|
|
210
|
+
op: "cancelCompactionJob";
|
|
211
|
+
id: string;
|
|
212
|
+
expectedRevision: number;
|
|
213
|
+
cancelledAt: string;
|
|
214
|
+
} | {
|
|
215
|
+
op: "removeCompactionJob";
|
|
216
|
+
id: string;
|
|
217
|
+
} | {
|
|
218
|
+
op: "createGarbageCollectionJob";
|
|
219
|
+
input: CreateGarbageCollectionJobInput;
|
|
220
|
+
} | {
|
|
221
|
+
op: "updateGarbageCollectionPlanning";
|
|
222
|
+
input: UpdateGarbageCollectionPlanningInput;
|
|
223
|
+
} | {
|
|
224
|
+
op: "garbageCollectionStep";
|
|
225
|
+
effect: {
|
|
226
|
+
job: GarbageCollectionJobRecord;
|
|
227
|
+
prunedManifestVersions: number[];
|
|
228
|
+
reclaimedSegmentIds: string[];
|
|
229
|
+
reclaimedBlockIds: string[];
|
|
230
|
+
reclaimedTransactionIds: string[];
|
|
231
|
+
updatedAt: string;
|
|
232
|
+
};
|
|
233
|
+
} | {
|
|
234
|
+
op: "removeGarbageCollectionJob";
|
|
235
|
+
id: string;
|
|
236
|
+
} | {
|
|
237
|
+
op: "removePrunedManifestRecords";
|
|
238
|
+
maxItems: number;
|
|
239
|
+
} | {
|
|
240
|
+
op: "createTempOwner";
|
|
241
|
+
record: TempOwnerRecord;
|
|
242
|
+
} | {
|
|
243
|
+
op: "renewTempOwner";
|
|
244
|
+
input: RenewTempOwnerInput;
|
|
245
|
+
} | {
|
|
246
|
+
op: "removeTempOwnerIfExpired";
|
|
247
|
+
ownerId: string;
|
|
248
|
+
expiresAtCutoff: string;
|
|
249
|
+
} | {
|
|
250
|
+
op: "removeTempOwner";
|
|
251
|
+
ownerId: string;
|
|
252
|
+
} | {
|
|
253
|
+
op: "reserveTempRunPages";
|
|
254
|
+
pages: TempPageLedgerRecord[];
|
|
255
|
+
} | {
|
|
256
|
+
op: "restoreTempRunPages";
|
|
257
|
+
pages: Array<Omit<TempPageLedgerRecord, "length"> & {
|
|
258
|
+
length: number | null;
|
|
259
|
+
}>;
|
|
260
|
+
} | {
|
|
261
|
+
op: "removeTempRun";
|
|
262
|
+
ownerId: string;
|
|
263
|
+
runId: string;
|
|
264
|
+
} | {
|
|
265
|
+
op: "writeFtsBase";
|
|
266
|
+
tableId: string;
|
|
267
|
+
columnId: string;
|
|
268
|
+
pointer: FtsBasePointer;
|
|
269
|
+
} | {
|
|
270
|
+
op: "beginFtsBaseBuild";
|
|
271
|
+
input: BeginPostingBuildInput;
|
|
272
|
+
} | {
|
|
273
|
+
op: "renewFtsBaseBuild";
|
|
274
|
+
input: RenewPostingBuildInput;
|
|
275
|
+
} | {
|
|
276
|
+
op: "writeFtsBaseBuildChunk";
|
|
277
|
+
input: Omit<AppendPostingBuildChunkInput, "chunk">;
|
|
278
|
+
placement: Placement;
|
|
279
|
+
bounds: {
|
|
280
|
+
first: string;
|
|
281
|
+
last: string;
|
|
282
|
+
};
|
|
283
|
+
totalTokens: number;
|
|
284
|
+
retainedEntries: number;
|
|
285
|
+
} | {
|
|
286
|
+
op: "finishFtsBaseBuild";
|
|
287
|
+
input: FinishPostingBuildInput;
|
|
288
|
+
} | {
|
|
289
|
+
op: "abortFtsBaseBuild";
|
|
290
|
+
input: AbortPostingBuildInput;
|
|
291
|
+
} | {
|
|
292
|
+
op: "beginSnapshotFrameExport";
|
|
293
|
+
state: SnapshotFrameExportState;
|
|
294
|
+
} | {
|
|
295
|
+
op: "advanceSnapshotFrameExport";
|
|
296
|
+
input: ReadSnapshotExportFrameInput;
|
|
297
|
+
expectedLeaseRevision: number;
|
|
298
|
+
next: Pick<SnapshotFrameExportState, "nextSequence" | "metadataOffset" | "blockCursor" | "lastSequence" | "lastMetadataOffset" | "lastBlockId">;
|
|
299
|
+
} | {
|
|
300
|
+
op: "closeSnapshotFrameExport";
|
|
301
|
+
input: CloseSnapshotExportInput;
|
|
302
|
+
} | {
|
|
303
|
+
op: "beginSnapshotFrameImport";
|
|
304
|
+
state: SnapshotFrameImportState;
|
|
305
|
+
} | {
|
|
306
|
+
op: "renewSnapshotFrameImport";
|
|
307
|
+
input: RenewSnapshotFrameImportInput;
|
|
308
|
+
} | {
|
|
309
|
+
op: "appendSnapshotImportFrames";
|
|
310
|
+
input: RenewSnapshotFrameImportInput;
|
|
311
|
+
state: Omit<SnapshotFrameImportState, "header">;
|
|
312
|
+
blockPlacements: IdPlacement[];
|
|
313
|
+
replay: boolean;
|
|
314
|
+
} | {
|
|
315
|
+
op: "finishSnapshotFrameImport";
|
|
316
|
+
input: FinishSnapshotFrameImportInput;
|
|
317
|
+
} | {
|
|
318
|
+
op: "cancelSnapshotFrameImport";
|
|
319
|
+
input: CancelSnapshotImportInput;
|
|
320
|
+
};
|
|
321
|
+
declare const CORE_READ_METHODS: readonly ["getTempOwner", "getTable", "getTableByName", "listTables", "getSegment", "listSegmentPage", "listTableSegmentPage", "getExistingUniqueKeys", "getUniqueKeyBuild", "getCurrentManifestVersion", "getCatalogProbe", "getCurrentManifest", "getManifest", "listManifestPage", "listManifestBlockPage", "listRetiredManifestBlockPage", "getTransaction", "getTransactions", "listTransactionPage", "getLease", "listLeases", "listExpiredLeasePage", "getCompactionJob", "listCompactionJobs", "listCompactionJobPage", "getGarbageCollectionJob", "listGarbageCollectionJobs", "listGarbageCollectionJobPage"];
|
|
322
|
+
type CoreReadMethod = (typeof CORE_READ_METHODS)[number];
|
|
323
|
+
declare const LOGGED_BODY_BUILDERS: {
|
|
324
|
+
readonly createTempOwner: ([record]: unknown[]) => WalEntryBody;
|
|
325
|
+
readonly renewTempOwner: ([input]: unknown[]) => WalEntryBody;
|
|
326
|
+
readonly removeAbortedSegment: ([id, expectedTransactionId]: unknown[]) => WalEntryBody;
|
|
327
|
+
readonly adoptAbortedSegment: ([input]: unknown[]) => WalEntryBody;
|
|
328
|
+
readonly reserveRowIds: ([tableId, count]: unknown[]) => WalEntryBody;
|
|
329
|
+
readonly beginUniqueKeyBuild: ([input]: unknown[]) => WalEntryBody;
|
|
330
|
+
readonly renewUniqueKeyBuild: ([input]: unknown[]) => WalEntryBody;
|
|
331
|
+
readonly appendUniqueKeyBuildChunk: ([input]: unknown[]) => WalEntryBody;
|
|
332
|
+
readonly finishUniqueKeyBuild: ([input]: unknown[]) => WalEntryBody;
|
|
333
|
+
readonly abortUniqueKeyBuild: ([input]: unknown[]) => WalEntryBody;
|
|
334
|
+
readonly reserveAutoIncrement: ([tableId, columnId, count, atLeast]: unknown[]) => WalEntryBody;
|
|
335
|
+
readonly createTransaction: ([record]: unknown[]) => WalEntryBody;
|
|
336
|
+
readonly renewTransaction: ([input]: unknown[]) => WalEntryBody;
|
|
337
|
+
readonly abortTransactionIfExpired: ([input]: unknown[]) => WalEntryBody;
|
|
338
|
+
readonly updateTransaction: ([id, expectedRevision, update]: unknown[]) => WalEntryBody;
|
|
339
|
+
readonly commitTransaction: ([input]: unknown[]) => WalEntryBody;
|
|
340
|
+
readonly createLease: ([record]: unknown[]) => WalEntryBody;
|
|
341
|
+
readonly renewLease: ([input]: unknown[]) => WalEntryBody;
|
|
342
|
+
readonly moveLease: ([input]: unknown[]) => WalEntryBody;
|
|
343
|
+
readonly removeLeaseIfExpired: ([id, expectedRevision, expiresAtCutoff]: unknown[]) => WalEntryBody;
|
|
344
|
+
readonly removeLease: ([input]: unknown[]) => WalEntryBody;
|
|
345
|
+
readonly createCompactionJob: ([record]: unknown[]) => WalEntryBody;
|
|
346
|
+
readonly updateCompactionJob: ([id, expectedRevision, update]: unknown[]) => WalEntryBody;
|
|
347
|
+
readonly cancelCompactionJob: ([id, expectedRevision, cancelledAt]: unknown[]) => WalEntryBody;
|
|
348
|
+
readonly createGarbageCollectionJob: ([input]: unknown[]) => WalEntryBody;
|
|
349
|
+
readonly updateGarbageCollectionPlanning: ([input]: unknown[]) => WalEntryBody;
|
|
350
|
+
readonly removeGarbageCollectionJob: ([id]: unknown[]) => WalEntryBody;
|
|
351
|
+
readonly removePrunedManifestRecords: ([maxItems]: unknown[]) => WalEntryBody;
|
|
352
|
+
};
|
|
353
|
+
type LoggedMethod = keyof typeof LOGGED_BODY_BUILDERS;
|
|
4
354
|
/**
|
|
5
355
|
* The leader: the one instance holding the database's write-ahead log handle, and with it
|
|
6
356
|
* every other handle — checkpoint slots, the tail extent, a small cache of sealed extents.
|
|
@@ -26,105 +376,89 @@ export declare class OpfsLeader {
|
|
|
26
376
|
wal: FileSystemSyncAccessHandle;
|
|
27
377
|
slotA: FileSystemSyncAccessHandle;
|
|
28
378
|
slotB: FileSystemSyncAccessHandle;
|
|
29
|
-
}, checkpointEntries?: number): Promise<OpfsLeader>;
|
|
30
|
-
/**
|
|
379
|
+
}, checkpointEntries?: number, cleanupLimitBytes?: number): Promise<OpfsLeader>;
|
|
380
|
+
/**
|
|
381
|
+
* Fully synchronous: publish the same generation to both slots, flush each, then reset.
|
|
382
|
+
* Therefore corruption of either post-success copy cannot expose an older database.
|
|
383
|
+
*/
|
|
31
384
|
checkpointNow(): void;
|
|
32
|
-
addBlock(id: string, bytes: Uint8Array): Promise<void>;
|
|
33
|
-
addBlocks(blocks: readonly BlockWrite[]): Promise<void>;
|
|
34
385
|
getBlock(id: string): Promise<Uint8Array | undefined>;
|
|
35
386
|
getBlocks(ids: readonly string[]): Promise<Array<Uint8Array | undefined>>;
|
|
36
|
-
|
|
37
|
-
|
|
387
|
+
readManifestBlock(version: number | null, id: string): Promise<Uint8Array | undefined>;
|
|
388
|
+
hasManifestBlocks(version: number | null, ids: readonly string[]): Promise<boolean[]>;
|
|
389
|
+
listManifestBlockPage(input: ListManifestBlockPageInput): Promise<ManifestBlockPage>;
|
|
390
|
+
listRetiredManifestBlockPage(input: ListRetiredManifestBlockPageInput): Promise<ManifestBlockPage>;
|
|
38
391
|
putTempRunPage(page: TempRunPage): Promise<void>;
|
|
392
|
+
putTempRunPages(pages: readonly TempRunPage[]): Promise<void>;
|
|
39
393
|
getTempRunPage(ownerId: string, runId: string, pageIndex: number): Promise<Uint8Array | undefined>;
|
|
40
394
|
removeTempRun(ownerId: string, runId: string): Promise<void>;
|
|
41
395
|
removeTempOwner(ownerId: string): Promise<void>;
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
396
|
+
removeCompactionJob(id: string): Promise<boolean>;
|
|
397
|
+
/** @internal Shared implementation installed for direct RecordCore reads below. */
|
|
398
|
+
_readCoreGenerated(method: CoreReadMethod, args: unknown[]): Promise<unknown>;
|
|
399
|
+
/** @internal Shared implementation installed for ordinary one-frame mutations below. */
|
|
400
|
+
_loggedGenerated(method: LoggedMethod, args: unknown[]): Promise<unknown>;
|
|
45
401
|
removeTempOwnerIfExpired(ownerId: string, expiresAtCutoff: string): Promise<boolean>;
|
|
46
402
|
listTempOwnerIdsPage(afterOwnerId: string | null, limit: number): Promise<StoragePage<string, string>>;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
getCatalogProbe(): Promise<CatalogProbe>;
|
|
55
|
-
getQueryCatalogState(tableNames: readonly string[]): Promise<QueryCatalogState>;
|
|
56
|
-
getCurrentManifest(): Promise<Manifest | undefined>;
|
|
57
|
-
getManifest(version: number): Promise<Manifest | undefined>;
|
|
58
|
-
listManifests(): Promise<Manifest[]>;
|
|
59
|
-
listManifestPage(afterVersion: number | null, limit: number): Promise<StoragePage<Manifest, number>>;
|
|
60
|
-
getTransaction(id: string): Promise<TransactionRecord | undefined>;
|
|
61
|
-
getTransactions(ids: readonly string[]): Promise<Array<TransactionRecord | undefined>>;
|
|
62
|
-
listTransactions(): Promise<TransactionRecord[]>;
|
|
63
|
-
listTransactionPage(afterId: string | null, limit: number): Promise<StoragePage<TransactionRecord, string>>;
|
|
64
|
-
getLease(id: string): Promise<LeaseRecord | undefined>;
|
|
65
|
-
listLeases(): Promise<LeaseRecord[]>;
|
|
66
|
-
getCompactionJob(id: string): Promise<CompactionJobRecord | undefined>;
|
|
67
|
-
listCompactionJobs(tableId?: string): Promise<CompactionJobRecord[]>;
|
|
68
|
-
listCompactionJobPage(afterId: string | null, limit: number): Promise<StoragePage<CompactionJobRecord, string>>;
|
|
69
|
-
getGarbageCollectionJob(id: string): Promise<GarbageCollectionJobRecord | undefined>;
|
|
70
|
-
listGarbageCollectionJobs(): Promise<GarbageCollectionJobRecord[]>;
|
|
71
|
-
addTable(record: TableRecord): Promise<void>;
|
|
72
|
-
updateTable(id: string, expectedRevision: number, update: {
|
|
73
|
-
columns?: TableColumnRecord[];
|
|
74
|
-
ftsColumns?: Record<string, FtsColumnIndexRecord> | null;
|
|
75
|
-
triggers?: TriggerRecord[] | null;
|
|
76
|
-
}): Promise<TableRecord>;
|
|
77
|
-
removeTable(id: string, expectedRevision: number): Promise<void>;
|
|
78
|
-
addSegment(record: SegmentRecord): Promise<void>;
|
|
79
|
-
removeSegment(id: string): Promise<void>;
|
|
80
|
-
reserveRowIds(tableId: string, count: number): Promise<RowIdRange>;
|
|
81
|
-
reserveAutoIncrement(tableId: string, columnId: string, count: number, atLeast?: bigint): Promise<RowIdRange>;
|
|
82
|
-
publishManifest(input: PublishManifestInput): Promise<Manifest>;
|
|
403
|
+
listExpiredTempOwnerPage(expiresAtCutoff: string, afterCursor: string | null, limit: number): Promise<StoragePage<string, string>>;
|
|
404
|
+
addTable(record: TableRecord, options?: CatalogMutationOptions): Promise<void>;
|
|
405
|
+
updateTable(id: string, expectedRevision: number, update: TableRecordUpdate): Promise<TableRecord>;
|
|
406
|
+
removeTable(id: string, expectedRevision: number, options?: CatalogMutationOptions): Promise<void>;
|
|
407
|
+
dropTable(input: DropTableInput): Promise<ManifestSummary>;
|
|
408
|
+
dropTableColumn(input: DropTableColumnInput): Promise<ManifestSummary>;
|
|
409
|
+
removeFtsColumn(tableId: string, columnId: string): Promise<void>;
|
|
83
410
|
beginTransaction(input: BeginTransactionInput): Promise<BeginTransactionResult>;
|
|
84
|
-
createTransaction(record: TransactionRecord): Promise<void>;
|
|
85
|
-
updateTransaction(id: string, expectedRevision: number, update: TransactionRecordUpdate): Promise<TransactionRecord>;
|
|
86
411
|
stageTransactionArtifacts(input: StageTransactionArtifactsInput): Promise<TransactionRecord>;
|
|
87
|
-
|
|
412
|
+
rollbackTransactionArtifacts(input: RollbackTransactionArtifactsInput): Promise<TransactionRecord>;
|
|
88
413
|
writeTransaction(input: WriteTransactionInput): Promise<ManifestSummary>;
|
|
89
|
-
createLease(record: LeaseRecord): Promise<void>;
|
|
90
|
-
renewLease(id: string, expectedRevision: number, expiresAt: string): Promise<LeaseRecord>;
|
|
91
|
-
moveLease(id: string, expectedRevision: number, manifestVersion: number | null, expiresAt: string): Promise<LeaseRecord>;
|
|
92
|
-
removeLeaseIfExpired(id: string, expectedRevision: number, expiresAtCutoff: string): Promise<boolean>;
|
|
93
|
-
removeLease(id: string): Promise<void>;
|
|
94
|
-
createCompactionJob(record: CompactionJobRecord): Promise<void>;
|
|
95
|
-
updateCompactionJob(id: string, expectedRevision: number, update: CompactionJobRecordUpdate): Promise<CompactionJobRecord>;
|
|
96
|
-
cancelCompactionJob(id: string, expectedRevision: number, cancelledAt: string): Promise<CompactionJobRecord>;
|
|
97
|
-
removeCompactionJob(id: string): Promise<void>;
|
|
98
|
-
createGarbageCollectionJob(input: CreateGarbageCollectionJobInput): Promise<GarbageCollectionJobRecord>;
|
|
99
414
|
runGarbageCollectionStep(input: RunGarbageCollectionStepInput): Promise<GarbageCollectionStepResult>;
|
|
100
|
-
removeGarbageCollectionJob(id: string): Promise<void>;
|
|
101
|
-
removePrunedManifestRecords(): Promise<number>;
|
|
102
415
|
writeFtsBase(tableId: string, columnId: string, input: {
|
|
103
416
|
coversVersion: number;
|
|
104
417
|
chunks: FtsPosting[][];
|
|
105
418
|
totalTokens: number;
|
|
106
419
|
}): Promise<void>;
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
420
|
+
beginFtsBaseBuild(input: BeginPostingBuildInput): Promise<void>;
|
|
421
|
+
renewFtsBaseBuild(input: RenewPostingBuildInput): Promise<void>;
|
|
422
|
+
writeFtsBaseBuildChunk(input: AppendPostingBuildChunkInput): Promise<void>;
|
|
423
|
+
finishFtsBaseBuild(input: FinishPostingBuildInput): Promise<void>;
|
|
424
|
+
abortFtsBaseBuild(input: AbortPostingBuildInput): Promise<void>;
|
|
425
|
+
readFtsCandidates(tableId: string, columnId: string, terms: readonly FtsPostingQuery[], upToVersion: number, maxRowIds?: number): Promise<FtsCandidates & {
|
|
111
426
|
deltaChunkCount: number;
|
|
112
427
|
totalTokens: number;
|
|
113
428
|
coversVersion: number;
|
|
429
|
+
hasBase: boolean;
|
|
114
430
|
}>;
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
431
|
+
readFtsPostings(tableId: string, columnId: string, upToVersion: number, maxRowIds?: number, maxRetainedBytes?: number): Promise<{
|
|
432
|
+
deltaChunkCount: number;
|
|
433
|
+
coversVersion: number;
|
|
434
|
+
hasBase: boolean;
|
|
435
|
+
postings: FtsPosting[];
|
|
436
|
+
overflow: boolean;
|
|
437
|
+
}>;
|
|
438
|
+
beginSnapshotFrameExport(input: BeginSnapshotFrameExportInput): Promise<SnapshotFrameExportSession>;
|
|
439
|
+
readSnapshotExportFrame(input: ReadSnapshotExportFrameInput): Promise<SnapshotFrame | undefined>;
|
|
440
|
+
closeSnapshotFrameExport(input: CloseSnapshotExportInput): Promise<boolean>;
|
|
441
|
+
beginSnapshotFrameImport(input: BeginSnapshotFrameImportInput): Promise<SnapshotFrameImportSession>;
|
|
442
|
+
renewSnapshotFrameImport(input: RenewSnapshotFrameImportInput): Promise<SnapshotFrameImportSession>;
|
|
443
|
+
appendSnapshotImportFrames(input: AppendSnapshotImportFramesInput): Promise<SnapshotFrameImportSession>;
|
|
444
|
+
finishSnapshotFrameImport(input: FinishSnapshotFrameImportInput): Promise<void>;
|
|
445
|
+
cancelSnapshotFrameImport(input: CancelSnapshotImportInput): Promise<InterruptedSnapshotImportAbortResult>;
|
|
123
446
|
/** Live payload bytes plus the control files — what this database logically occupies. */
|
|
124
447
|
getLogicalStorageBytes(): Promise<number>;
|
|
448
|
+
getStorageStats(): Promise<StorageStats>;
|
|
449
|
+
checkIntegrity(options?: {
|
|
450
|
+
mode?: StorageIntegrityMode;
|
|
451
|
+
maxIssues?: number;
|
|
452
|
+
}): Promise<StorageIntegrityReport>;
|
|
125
453
|
/** Graceful: flush, checkpoint (so the next leader's takeover is instant), release. */
|
|
126
454
|
shutdown(): Promise<void>;
|
|
127
455
|
/** Test-only: what tab death does — locks release, nothing is flushed or checkpointed. */
|
|
128
456
|
crash(): void;
|
|
129
457
|
}
|
|
130
|
-
|
|
458
|
+
/** @internal Exact pre-read aggregate limit, exported only for the no-allocation regression. */
|
|
459
|
+
export declare function assertBlockReadBatchByteLimit(placements: ReadonlyArray<{
|
|
460
|
+
length: number;
|
|
461
|
+
} | undefined>): void;
|
|
462
|
+
/** Conservative retained-heap model for one decoded postings chunk and its nested arrays. */
|
|
463
|
+
export declare function modeledFtsChunkBytes(chunk: readonly FtsPosting[]): number;
|
|
464
|
+
export {};
|