@minnowdb/core 0.3.0 → 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 +4 -2
- 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 +0 -1
- package/dist/engine/artifact-cache.js +0 -1
- package/dist/engine/batch.d.ts +5 -2
- package/dist/engine/batch.js +0 -1
- 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 +5 -6
- package/dist/engine/catalog.js +5 -5
- package/dist/engine/client.d.ts +27 -7
- package/dist/engine/client.js +197 -31
- package/dist/engine/database.d.ts +161 -38
- package/dist/engine/database.js +4320 -1523
- package/dist/engine/defaults.d.ts +0 -1
- package/dist/engine/defaults.js +2 -4
- 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 +39 -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 -11
- package/dist/engine/index.js +12 -10
- 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 +499 -129
- 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 +4 -4
- package/dist/engine/query-api.d.ts +3 -0
- package/dist/engine/query-api.js +3 -0
- package/dist/engine/query-cache.d.ts +0 -1
- package/dist/engine/query-cache.js +4 -4
- package/dist/engine/query.d.ts +4 -7
- package/dist/engine/query.js +348 -155
- package/dist/engine/result-wire.d.ts +0 -1
- package/dist/engine/result-wire.js +2 -2
- package/dist/engine/schema-wire.d.ts +1 -2
- package/dist/engine/schema-wire.js +0 -1
- package/dist/engine/schema.d.ts +3 -8
- package/dist/engine/schema.js +41 -24
- package/dist/engine/sort-keys.d.ts +0 -1
- package/dist/engine/sort-keys.js +2 -2
- package/dist/engine/sql-domains.d.ts +6 -1
- package/dist/engine/sql-domains.js +209 -45
- package/dist/engine/sql-driver.d.ts +2 -2
- package/dist/engine/sql-driver.js +0 -1
- package/dist/engine/sql-json.d.ts +0 -1
- package/dist/engine/sql-json.js +53 -7
- package/dist/engine/sql-semantics.d.ts +8 -5
- package/dist/engine/sql-semantics.js +427 -65
- package/dist/engine/typed-live.d.ts +67 -0
- package/dist/engine/typed-live.js +349 -0
- package/dist/engine/vector.d.ts +7 -1
- package/dist/engine/vector.js +202 -58
- package/dist/engine/worker-host.d.ts +8 -2
- package/dist/engine/worker-host.js +616 -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 +0 -1
- package/dist/plan/index.js +0 -1
- package/dist/storage/index.d.ts +1 -1
- package/dist/storage/index.js +1 -1
- package/dist/storage/indexeddb.d.ts +74 -65
- package/dist/storage/indexeddb.js +12301 -2076
- package/dist/storage/memory.d.ts +56 -66
- package/dist/storage/memory.js +1004 -139
- 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 +403 -91
- package/dist/storage/opfs/leader.js +4306 -602
- package/dist/storage/opfs/rpc.d.ts +15 -3
- package/dist/storage/opfs/rpc.js +223 -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 +26 -121
- package/dist/storage/opfs/store.js +436 -388
- 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 -99
- package/dist/storage/snapshot.js +33 -309
- package/dist/storage/toolkit/extents.d.ts +41 -7
- package/dist/storage/toolkit/extents.js +402 -39
- package/dist/storage/toolkit/index.d.ts +3 -4
- package/dist/storage/toolkit/index.js +27 -3
- package/dist/storage/toolkit/record-core.d.ts +174 -61
- package/dist/storage/toolkit/record-core.js +5401 -849
- 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 +4 -6
- package/dist/storage/toolkit/wire.js +80 -25
- package/dist/storage/types.d.ts +1271 -218
- package/dist/storage/types.js +1471 -138
- package/dist/testing/block-store-conformance.d.ts +0 -1
- package/dist/testing/block-store-conformance.js +877 -138
- package/dist/testing/index.d.ts +42 -31
- package/dist/testing/index.js +100 -68
- package/dist/testing/opfs-shim.d.ts +13 -3
- package/dist/testing/opfs-shim.js +40 -6
- package/dist/testing/simulator.d.ts +0 -1
- package/dist/testing/simulator.js +43 -12
- package/dist/testing/sqllogictest.d.ts +0 -1
- package/dist/testing/sqllogictest.js +0 -1
- package/dist/transactions/index.d.ts +81 -20
- package/dist/transactions/index.js +1050 -268
- package/dist/worker-protocol/index.d.ts +3 -2
- package/dist/worker-protocol/index.js +2 -5
- package/package.json +49 -1
- 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-domains.d.ts.map +0 -1
- package/dist/engine/sql-domains.js.map +0 -1
- package/dist/engine/sql-driver.d.ts.map +0 -1
- package/dist/engine/sql-driver.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/testing/simulator.d.ts.map +0 -1
- package/dist/testing/simulator.js.map +0 -1
- package/dist/testing/sqllogictest.d.ts.map +0 -1
- package/dist/testing/sqllogictest.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,18 +1,20 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import type { DatabaseSnapshot, SnapshotLoadProgress } from "../snapshot.js";
|
|
1
|
+
import { type BlockStore, type TempRunPage } from "../types.js";
|
|
3
2
|
export interface OpfsBlockStoreOptions {
|
|
4
3
|
/** Databases live under `minnowdb/<name>` in the origin's private file system. */
|
|
5
4
|
name: string;
|
|
6
5
|
/**
|
|
7
|
-
* `"
|
|
8
|
-
*
|
|
9
|
-
* before the
|
|
6
|
+
* `"strict"` (the default) flushes the payload before flushing its publishing WAL frame,
|
|
7
|
+
* both before the operation resolves. `"relaxed"` writes the complete payload and
|
|
8
|
+
* WAL frame before resolving but lets the operating system schedule their final flush; a
|
|
9
|
+
* power loss may roll back a fully consistent suffix.
|
|
10
10
|
*/
|
|
11
11
|
durability?: "relaxed" | "strict";
|
|
12
12
|
/** The storage root; defaults to `navigator.storage.getDirectory()`. Tests inject a shim. */
|
|
13
13
|
root?: FileSystemDirectoryHandle;
|
|
14
14
|
/** @internal Test seam: checkpoint after this many WAL entries (default 1024). */
|
|
15
15
|
checkpointEntries?: number;
|
|
16
|
+
/** @internal Test seam: cleanup-debt backpressure limit (default 64 MiB). */
|
|
17
|
+
cleanupLimitBytes?: number;
|
|
16
18
|
/** @internal Test seam: how long a follower waits for the leader (default 1000ms). */
|
|
17
19
|
rpcTimeoutMs?: number;
|
|
18
20
|
}
|
|
@@ -31,145 +33,49 @@ export interface OpfsBlockStoreOptions {
|
|
|
31
33
|
* Leadership is the write-ahead log's own exclusive sync-access handle — enforced by the
|
|
32
34
|
* browser against the actual resource, released the instant its holder dies. Elections are
|
|
33
35
|
* simply attempts to open it. Correctness never rides on a message: an operation is
|
|
34
|
-
* acknowledged only after the leader's WAL holds it
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
* surface a conflict the engine's recovery already reconciles. The channel affects how fast
|
|
40
|
-
* multi-tab work moves, never whether it is right.
|
|
36
|
+
* acknowledged only after the leader's WAL holds it. Request ids deduplicate delivery retries
|
|
37
|
+
* while the same leader serves. A dead leader costs a failover in which the next acquirer
|
|
38
|
+
* replays checkpoint-plus-WAL; an in-flight read moves to it, while an in-flight mutation fails
|
|
39
|
+
* with `OpfsUncertainOutcomeError` instead of risking a second execution after a lost reply.
|
|
40
|
+
* The channel affects how fast multi-tab work moves, never whether it is right.
|
|
41
41
|
*
|
|
42
42
|
* `setForeground(true)` marks this connection as the one the user is looking at; a background
|
|
43
43
|
* leader yields to a foreground bidder, so the tab doing the work is normally the tab holding
|
|
44
44
|
* the microsecond-fast path.
|
|
45
45
|
*/
|
|
46
|
-
export
|
|
46
|
+
export interface OpfsBlockStore extends Required<BlockStore> {
|
|
47
|
+
}
|
|
48
|
+
export declare class OpfsBlockStore {
|
|
47
49
|
#private;
|
|
50
|
+
readonly liveQueryChannelName: string;
|
|
48
51
|
private constructor();
|
|
49
52
|
static open(options: OpfsBlockStoreOptions): Promise<OpfsBlockStore>;
|
|
50
53
|
/** Marks this connection as the one the user is looking at — a leadership preference. */
|
|
51
54
|
setForeground(foreground: boolean): void;
|
|
52
|
-
addBlock(id: string, bytes: Uint8Array): Promise<void>;
|
|
53
|
-
addBlocks(blocks: readonly BlockWrite[]): Promise<void>;
|
|
54
|
-
getBlock(id: string): Promise<Uint8Array | undefined>;
|
|
55
|
-
getBlocks(ids: readonly string[]): Promise<Array<Uint8Array | undefined>>;
|
|
56
|
-
removeBlock(id: string): Promise<void>;
|
|
57
|
-
listBlockIds(): Promise<string[]>;
|
|
58
55
|
putTempRunPage(page: TempRunPage): Promise<void>;
|
|
59
56
|
putTempRunPages(pages: readonly TempRunPage[]): Promise<void>;
|
|
60
57
|
getTempRunPage(ownerId: string, runId: string, pageIndex: number): Promise<Uint8Array | undefined>;
|
|
61
58
|
removeTempRun(ownerId: string, runId: string): Promise<void>;
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
getTempOwner(ownerId: string): Promise<TempOwnerRecord | undefined>;
|
|
65
|
-
renewTempOwner(ownerId: string, expectedRevision: number, expiresAt: string): Promise<TempOwnerRecord>;
|
|
66
|
-
removeTempOwnerIfExpired(ownerId: string, expiresAtCutoff: string): Promise<boolean>;
|
|
67
|
-
listTempOwnerIdsPage(afterOwnerId: string | null, limit: number): Promise<StoragePage<string, string>>;
|
|
68
|
-
addTable(record: TableRecord): Promise<void>;
|
|
69
|
-
getTable(id: string): Promise<TableRecord | undefined>;
|
|
70
|
-
getTableByName(name: string): Promise<TableRecord | undefined>;
|
|
71
|
-
listTables(): Promise<TableRecord[]>;
|
|
72
|
-
updateTable(id: string, expectedRevision: number, update: {
|
|
73
|
-
columns?: TableColumnRecord[];
|
|
74
|
-
ftsColumns?: Record<string, FtsColumnIndexRecord> | null;
|
|
75
|
-
secondaryIndexes?: Record<string, SecondaryIndexRecord> | null;
|
|
76
|
-
expectedManifestVersion?: {
|
|
77
|
-
value: number | null;
|
|
78
|
-
};
|
|
79
|
-
uniqueKeySeed?: {
|
|
80
|
-
namespaceId: string;
|
|
81
|
-
keyTokens: readonly string[];
|
|
82
|
-
};
|
|
83
|
-
triggers?: TriggerRecord[] | null;
|
|
84
|
-
}): Promise<TableRecord>;
|
|
85
|
-
removeTable(id: string, expectedRevision: number): Promise<void>;
|
|
86
|
-
writeFtsBase(tableId: string, columnId: string, input: {
|
|
87
|
-
coversVersion: number;
|
|
88
|
-
chunks: FtsPosting[][];
|
|
89
|
-
totalTokens: number;
|
|
90
|
-
}): Promise<void>;
|
|
91
|
-
removeFtsColumn(tableId: string, columnId: string): Promise<void>;
|
|
92
|
-
beginFtsBaseBuild(tableId: string, columnId: string, buildId: string): Promise<void>;
|
|
93
|
-
writeFtsBaseBuildChunk(tableId: string, columnId: string, buildId: string, ordinal: number, chunk: FtsPosting[]): Promise<void>;
|
|
94
|
-
finishFtsBaseBuild(tableId: string, columnId: string, buildId: string, input: {
|
|
95
|
-
coversVersion: number;
|
|
96
|
-
chunkCount: number;
|
|
97
|
-
totalTokens: number;
|
|
98
|
-
}): Promise<void>;
|
|
99
|
-
abortFtsBaseBuild(tableId: string, columnId: string, buildId: string): Promise<void>;
|
|
100
|
-
readFtsCandidates(tableId: string, columnId: string, terms: readonly FtsPostingQuery[], upToVersion: number): Promise<FtsCandidates & {
|
|
101
|
-
deltaChunkCount: number;
|
|
102
|
-
totalTokens: number;
|
|
103
|
-
coversVersion: number;
|
|
104
|
-
hasBase: boolean;
|
|
105
|
-
}>;
|
|
106
|
-
readFtsPostings(tableId: string, columnId: string, upToVersion: number): Promise<{
|
|
107
|
-
postings: FtsPosting[];
|
|
108
|
-
deltaChunkCount: number;
|
|
109
|
-
coversVersion: number;
|
|
110
|
-
hasBase: boolean;
|
|
111
|
-
}>;
|
|
112
|
-
addSegment(record: SegmentRecord): Promise<void>;
|
|
113
|
-
getSegment(id: string): Promise<SegmentRecord | undefined>;
|
|
114
|
-
listSegments(tableId?: string): Promise<SegmentRecord[]>;
|
|
115
|
-
listSegmentPage(afterId: string | null, limit: number): Promise<StoragePage<SegmentRecord, string>>;
|
|
116
|
-
removeSegment(id: string): Promise<void>;
|
|
117
|
-
reserveRowIds(tableId: string, count: number): Promise<RowIdRange>;
|
|
118
|
-
reserveAutoIncrement(tableId: string, columnId: string, count: number, atLeast?: bigint): Promise<RowIdRange>;
|
|
119
|
-
getExistingUniqueKeys(tableId: string, keyTokens: readonly string[]): Promise<string[]>;
|
|
120
|
-
getCurrentManifest(): Promise<Manifest | undefined>;
|
|
121
|
-
getCurrentManifestVersion(): Promise<number | null>;
|
|
122
|
-
getCatalogProbe(): Promise<CatalogProbe>;
|
|
123
|
-
getQueryCatalogState(tableNames: readonly string[]): Promise<QueryCatalogState>;
|
|
124
|
-
getManifest(version: number): Promise<Manifest | undefined>;
|
|
125
|
-
listManifests(): Promise<Manifest[]>;
|
|
126
|
-
listManifestPage(afterVersion: number | null, limit: number): Promise<StoragePage<Manifest, number>>;
|
|
127
|
-
publishManifest(input: PublishManifestInput): Promise<Manifest>;
|
|
128
|
-
createTransaction(record: TransactionRecord): Promise<void>;
|
|
129
|
-
beginTransaction(input: BeginTransactionInput): Promise<BeginTransactionResult>;
|
|
130
|
-
getTransaction(id: string): Promise<TransactionRecord | undefined>;
|
|
131
|
-
getTransactions(ids: readonly string[]): Promise<Array<TransactionRecord | undefined>>;
|
|
132
|
-
listTransactions(): Promise<TransactionRecord[]>;
|
|
133
|
-
listTransactionPage(afterId: string | null, limit: number): Promise<StoragePage<TransactionRecord, string>>;
|
|
134
|
-
updateTransaction(id: string, expectedRevision: number, update: TransactionRecordUpdate): Promise<TransactionRecord>;
|
|
135
|
-
stageTransactionArtifacts(input: StageTransactionArtifactsInput): Promise<TransactionRecord>;
|
|
136
|
-
commitTransaction(input: CommitTransactionInput): Promise<ManifestSummary>;
|
|
137
|
-
writeTransaction(input: WriteTransactionInput): Promise<ManifestSummary>;
|
|
138
|
-
createLease(record: LeaseRecord): Promise<void>;
|
|
139
|
-
getLease(id: string): Promise<LeaseRecord | undefined>;
|
|
140
|
-
listLeases(): Promise<LeaseRecord[]>;
|
|
141
|
-
renewLease(id: string, expectedRevision: number, expiresAt: string): Promise<LeaseRecord>;
|
|
142
|
-
moveLease(id: string, expectedRevision: number, manifestVersion: number | null, expiresAt: string): Promise<LeaseRecord>;
|
|
143
|
-
removeLeaseIfExpired(id: string, expectedRevision: number, expiresAtCutoff: string): Promise<boolean>;
|
|
144
|
-
removeLease(id: string): Promise<void>;
|
|
145
|
-
createCompactionJob(record: CompactionJobRecord): Promise<void>;
|
|
146
|
-
getCompactionJob(id: string): Promise<CompactionJobRecord | undefined>;
|
|
147
|
-
listCompactionJobs(tableId?: string): Promise<CompactionJobRecord[]>;
|
|
148
|
-
listCompactionJobPage(afterId: string | null, limit: number): Promise<StoragePage<CompactionJobRecord, string>>;
|
|
149
|
-
updateCompactionJob(id: string, expectedRevision: number, update: CompactionJobRecordUpdate): Promise<CompactionJobRecord>;
|
|
150
|
-
cancelCompactionJob(id: string, expectedRevision: number, cancelledAt: string): Promise<CompactionJobRecord>;
|
|
151
|
-
removeCompactionJob(id: string): Promise<void>;
|
|
152
|
-
createGarbageCollectionJob(input: CreateGarbageCollectionJobInput): Promise<GarbageCollectionJobRecord>;
|
|
153
|
-
getGarbageCollectionJob(id: string): Promise<GarbageCollectionJobRecord | undefined>;
|
|
154
|
-
listGarbageCollectionJobs(): Promise<GarbageCollectionJobRecord[]>;
|
|
155
|
-
runGarbageCollectionStep(input: RunGarbageCollectionStepInput): Promise<GarbageCollectionStepResult>;
|
|
156
|
-
removeGarbageCollectionJob(id: string): Promise<void>;
|
|
157
|
-
removePrunedManifestRecords(): Promise<number>;
|
|
158
|
-
getLogicalStorageBytes(): Promise<number>;
|
|
159
|
-
exportSnapshot(): Promise<DatabaseSnapshot>;
|
|
160
|
-
importSnapshot(snapshot: DatabaseSnapshot, options?: {
|
|
161
|
-
onProgress?: (progress: SnapshotLoadProgress) => void;
|
|
162
|
-
}): Promise<void>;
|
|
59
|
+
/** @internal Shared implementation installed for every ordinary RPC method below. */
|
|
60
|
+
_dispatchGenerated(method: string, args: unknown[]): Promise<unknown>;
|
|
163
61
|
close(): void;
|
|
164
62
|
/** Test-only: whether this connection currently holds the database's handles. */
|
|
165
63
|
_isLeaderForTests(): boolean;
|
|
166
64
|
/** Test-only: the id that names this connection's inbox channel. */
|
|
167
65
|
_instanceIdForTests(): string;
|
|
66
|
+
/** Test-only: simulates an acknowledgement lost after the served operation settles. */
|
|
67
|
+
_dropNextRpcResultForTests(): void;
|
|
68
|
+
/** Test-only: holds newly admitted served mutations until the returned release is called. */
|
|
69
|
+
_holdServedMutationsForTests(): () => void;
|
|
70
|
+
/** Test-only: retransmits the oldest request with its stable deduplication identity. */
|
|
71
|
+
_resendOldestPendingForTests(): void;
|
|
168
72
|
/** Test-only counters that pin the connection's bounded RPC state and close-time cleanup. */
|
|
169
73
|
_residentStateForTests(): {
|
|
170
74
|
answerChannels: number;
|
|
171
75
|
dedupeEntries: number;
|
|
76
|
+
inFlightMutations: number;
|
|
172
77
|
pendingRequests: number;
|
|
78
|
+
retainedRpcBytes: number;
|
|
173
79
|
closed: boolean;
|
|
174
80
|
};
|
|
175
81
|
/** Test-only: what tab death looks like — locks release, nothing flushes, no goodbyes. */
|
|
@@ -180,4 +86,3 @@ export declare function deleteOpfsDatabase(options: {
|
|
|
180
86
|
name: string;
|
|
181
87
|
root?: FileSystemDirectoryHandle;
|
|
182
88
|
}): Promise<void>;
|
|
183
|
-
//# sourceMappingURL=store.d.ts.map
|