@workglow/storage 0.2.31 → 0.2.32
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/dist/browser.js +977 -48
- package/dist/browser.js.map +23 -13
- package/dist/bun.js +1030 -53
- package/dist/bun.js.map +24 -14
- package/dist/common.d.ts +7 -0
- package/dist/common.d.ts.map +1 -1
- package/dist/migrations/IMigration.d.ts +57 -0
- package/dist/migrations/IMigration.d.ts.map +1 -0
- package/dist/migrations/MigrationRunner.d.ts +44 -0
- package/dist/migrations/MigrationRunner.d.ts.map +1 -0
- package/dist/migrations/TabularMigration.d.ts +85 -0
- package/dist/migrations/TabularMigration.d.ts.map +1 -0
- package/dist/migrations/TabularMigrationOrchestrator.d.ts +34 -0
- package/dist/migrations/TabularMigrationOrchestrator.d.ts.map +1 -0
- package/dist/migrations/index.d.ts +11 -0
- package/dist/migrations/index.d.ts.map +1 -0
- package/dist/migrations/runBackfill.d.ts +19 -0
- package/dist/migrations/runBackfill.d.ts.map +1 -0
- package/dist/node.js +1030 -53
- package/dist/node.js.map +24 -14
- package/dist/sql/Dialect.d.ts +26 -0
- package/dist/sql/Dialect.d.ts.map +1 -0
- package/dist/sql/PredicateBuilder.d.ts +30 -0
- package/dist/sql/PredicateBuilder.d.ts.map +1 -0
- package/dist/sql/PrefixDdl.d.ts +79 -0
- package/dist/sql/PrefixDdl.d.ts.map +1 -0
- package/dist/sql/index.d.ts +9 -0
- package/dist/sql/index.d.ts.map +1 -0
- package/dist/tabular/BaseSqlTabularStorage.d.ts +63 -2
- package/dist/tabular/BaseSqlTabularStorage.d.ts.map +1 -1
- package/dist/tabular/BaseTabularStorage.d.ts +111 -6
- package/dist/tabular/BaseTabularStorage.d.ts.map +1 -1
- package/dist/tabular/CachedTabularStorage.d.ts +38 -0
- package/dist/tabular/CachedTabularStorage.d.ts.map +1 -1
- package/dist/tabular/Cursor.d.ts +79 -0
- package/dist/tabular/Cursor.d.ts.map +1 -0
- package/dist/tabular/FsFolderTabularStorage.d.ts +5 -1
- package/dist/tabular/FsFolderTabularStorage.d.ts.map +1 -1
- package/dist/tabular/HuggingFaceTabularStorage.d.ts +26 -2
- package/dist/tabular/HuggingFaceTabularStorage.d.ts.map +1 -1
- package/dist/tabular/ITabularStorage.d.ts +203 -3
- package/dist/tabular/ITabularStorage.d.ts.map +1 -1
- package/dist/tabular/InMemoryTabularMigrationApplier.d.ts +39 -0
- package/dist/tabular/InMemoryTabularMigrationApplier.d.ts.map +1 -0
- package/dist/tabular/InMemoryTabularStorage.d.ts +6 -2
- package/dist/tabular/InMemoryTabularStorage.d.ts.map +1 -1
- package/dist/tabular/SharedInMemoryTabularStorage.d.ts +4 -1
- package/dist/tabular/SharedInMemoryTabularStorage.d.ts.map +1 -1
- package/dist/tabular/SqlTabularMigrationApplier.d.ts +53 -0
- package/dist/tabular/SqlTabularMigrationApplier.d.ts.map +1 -0
- package/dist/tabular/StorageError.d.ts.map +1 -1
- package/dist/tabular/TelemetryTabularStorage.d.ts +11 -1
- package/dist/tabular/TelemetryTabularStorage.d.ts.map +1 -1
- package/dist/tabular/sqlMigrationDdl.d.ts +11 -0
- package/dist/tabular/sqlMigrationDdl.d.ts.map +1 -0
- package/dist/vector/IVectorStorage.d.ts +61 -1
- package/dist/vector/IVectorStorage.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/tabular/README.md +73 -0
- package/src/vector/README.md +79 -0
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { DataPortSchemaObject, FromSchema, TypedArraySchemaOptions } from "@workglow/util/schema";
|
|
7
|
+
import { type ITabularMigration, type ITabularMigrationApplier } from "../migrations";
|
|
7
8
|
import { BaseTabularStorage, ClientProvidedKeysOption, KeyGenerationStrategy } from "./BaseTabularStorage";
|
|
8
9
|
import { AnyTabularStorage, AutoGeneratedKeys, CoveringIndexQueryOptions, DeleteSearchCriteria, InsertEntity, QueryOptions, SearchCriteria, SimplifyPrimaryKey, TabularChangePayload, TabularSubscribeOptions } from "./ITabularStorage";
|
|
9
10
|
export declare const FS_FOLDER_TABULAR_REPOSITORY: import("@workglow/util").ServiceToken<AnyTabularStorage>;
|
|
@@ -28,12 +29,15 @@ export declare class FsFolderTabularStorage<Schema extends DataPortSchemaObject,
|
|
|
28
29
|
* @param primaryKeyNames - Array of property names that form the primary key
|
|
29
30
|
* @param indexes - Note: indexes are not supported in this implementation.
|
|
30
31
|
* @param clientProvidedKeys - How to handle client-provided values for auto-generated keys
|
|
32
|
+
* @param tabularMigrations - Optional declarative migrations to run on setup
|
|
31
33
|
*/
|
|
32
|
-
constructor(folderPath: string, schema: Schema, primaryKeyNames: PrimaryKeyNames, indexes?: readonly (keyof NoInfer<Entity> | readonly (keyof NoInfer<Entity>)[])[], clientProvidedKeys?: ClientProvidedKeysOption);
|
|
34
|
+
constructor(folderPath: string, schema: Schema, primaryKeyNames: PrimaryKeyNames, indexes?: readonly (keyof NoInfer<Entity> | readonly (keyof NoInfer<Entity>)[])[], clientProvidedKeys?: ClientProvidedKeysOption, tabularMigrations?: ReadonlyArray<ITabularMigration>);
|
|
33
35
|
/**
|
|
34
36
|
* Sets up the directory for the repository (creates directory)
|
|
35
37
|
*/
|
|
36
38
|
setupDirectory(): Promise<void>;
|
|
39
|
+
setupDatabase(): Promise<void>;
|
|
40
|
+
getMigrationApplier(): ITabularMigrationApplier | null;
|
|
37
41
|
/**
|
|
38
42
|
* Generates a key value for auto-generated keys
|
|
39
43
|
* @param columnName - Name of the column to generate a key for
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FsFolderTabularStorage.d.ts","sourceRoot":"","sources":["../../src/tabular/FsFolderTabularStorage.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAUH,OAAO,EAAE,oBAAoB,EAAE,UAAU,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"FsFolderTabularStorage.d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G,SAAS,CAAC,CAiD1E;YAMa,WAAW;IAOzB;;;OAGG;IACG,KAAK,CACT,SAAS,EAAE,cAAc,CAAC,MAAM,CAAC,EACjC,QAAQ,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC,GAC9B,OAAO,CAAC,MAAM,EAAE,GAAG,SAAS,CAAC,CAE/B;IAED;;;OAGG;IACY,UAAU,CAAC,CAAC,SAAS,MAAM,MAAM,GAAG,MAAM,EACvD,SAAS,EAAE,cAAc,CAAC,MAAM,CAAC,EACjC,QAAQ,EAAE,yBAAyB,CAAC,MAAM,EAAE,CAAC,CAAC,GAC7C,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,CAE5B;IAED;;;;;;OAMG;IACG,YAAY,CAAC,SAAS,EAAE,oBAAoB,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAEzE;IAED;;;OAGG;IACH,OAAO,CAAC,iBAAiB;IAiCzB;;;;;;;OAOG;IACM,kBAAkB,CACzB,QAAQ,EAAE,CAAC,MAAM,EAAE,oBAAoB,CAAC,MAAM,CAAC,KAAK,IAAI,EACxD,OAAO,CAAC,EAAE,uBAAuB,GAChC,MAAM,IAAI,CAMZ;IAED;;OAEG;IACM,OAAO,IAAI,IAAI,CAMvB;CACF"}
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { DataPortSchemaObject, FromSchema, TypedArraySchemaOptions } from "@workglow/util/schema";
|
|
7
7
|
import { BaseTabularStorage } from "./BaseTabularStorage";
|
|
8
|
-
import { AnyTabularStorage, AutoGeneratedKeys, DeleteSearchCriteria, InsertEntity, QueryOptions, SearchCriteria, SimplifyPrimaryKey, TabularChangePayload, TabularSubscribeOptions } from "./ITabularStorage";
|
|
8
|
+
import { AnyTabularStorage, AutoGeneratedKeys, DeleteSearchCriteria, InsertEntity, Page, PageRequest, QueryOptions, SearchCriteria, SimplifyPrimaryKey, TabularChangePayload, TabularSubscribeOptions } from "./ITabularStorage";
|
|
9
|
+
import { type ITabularMigration, type ITabularMigrationApplier } from "../migrations";
|
|
9
10
|
export declare const HF_TABULAR_REPOSITORY: import("@workglow/util").ServiceToken<AnyTabularStorage>;
|
|
10
11
|
/**
|
|
11
12
|
* Options for HuggingFaceTabularStorage
|
|
@@ -39,8 +40,9 @@ export declare class HuggingFaceTabularStorage<Schema extends DataPortSchemaObje
|
|
|
39
40
|
* @param schema - Schema defining the structure of the entity
|
|
40
41
|
* @param primaryKeyNames - Array of property names that form the primary key
|
|
41
42
|
* @param options - Optional configuration including token, baseUrl, and indexes
|
|
43
|
+
* @param tabularMigrations - Optional declarative migrations to run on setup
|
|
42
44
|
*/
|
|
43
|
-
constructor(dataset: string, config: string, split: string, schema: Schema, primaryKeyNames: PrimaryKeyNames, options?: HuggingFaceTabularStorageOptions);
|
|
45
|
+
constructor(dataset: string, config: string, split: string, schema: Schema, primaryKeyNames: PrimaryKeyNames, options?: HuggingFaceTabularStorageOptions, tabularMigrations?: ReadonlyArray<ITabularMigration>);
|
|
44
46
|
/**
|
|
45
47
|
* Factory method to create a HuggingFaceTabularStorage instance with auto-detected schema.
|
|
46
48
|
* Fetches the dataset features and converts them to a JSON Schema.
|
|
@@ -56,6 +58,14 @@ export declare class HuggingFaceTabularStorage<Schema extends DataPortSchemaObje
|
|
|
56
58
|
* Sets up the database by validating the dataset exists and schema matches
|
|
57
59
|
*/
|
|
58
60
|
setupDatabase(): Promise<void>;
|
|
61
|
+
/**
|
|
62
|
+
* Returns an in-memory applier for HF tabular storage. NOTE: HF datasets
|
|
63
|
+
* are read-only; backfill ops will throw because `put` is unsupported.
|
|
64
|
+
* DDL ops are no-ops (records are JS objects). Migrations on HF storages
|
|
65
|
+
* are useful only for advancing bookkeeping in lockstep with a producer
|
|
66
|
+
* that re-publishes datasets.
|
|
67
|
+
*/
|
|
68
|
+
getMigrationApplier(): ITabularMigrationApplier | null;
|
|
59
69
|
/**
|
|
60
70
|
* Retrieves a value by its key using the /filter endpoint
|
|
61
71
|
*/
|
|
@@ -71,6 +81,20 @@ export declare class HuggingFaceTabularStorage<Schema extends DataPortSchemaObje
|
|
|
71
81
|
* @returns Array of entities or undefined if no records found
|
|
72
82
|
*/
|
|
73
83
|
getBulk(offset: number, limit: number): Promise<Entity[] | undefined>;
|
|
84
|
+
/**
|
|
85
|
+
* HuggingFace datasets are read-only, so the concurrency-stability that
|
|
86
|
+
* keyset pagination provides is unnecessary. The HF API also doesn't
|
|
87
|
+
* expose tuple comparisons, so we drive cursor pagination from the
|
|
88
|
+
* `/rows` endpoint's offset and encode the next offset in the cursor.
|
|
89
|
+
*
|
|
90
|
+
* The HF `/rows` endpoint caps each fetch at 100 rows, but the
|
|
91
|
+
* {@link ITabularStorage.getPage} contract lets callers ask for any
|
|
92
|
+
* positive limit. Loop in 100-row chunks until we either fill the
|
|
93
|
+
* caller's `limit` or hit the end of the dataset, so a `getPage({ limit:
|
|
94
|
+
* 200 })` doesn't silently return only 100 rows with a `nextCursor` of
|
|
95
|
+
* `undefined` (which would terminate iteration despite more data).
|
|
96
|
+
*/
|
|
97
|
+
getPage(request?: PageRequest<Entity>): Promise<Page<Entity>>;
|
|
74
98
|
/**
|
|
75
99
|
* Returns the number of rows in the dataset using the /size endpoint
|
|
76
100
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HuggingFaceTabularStorage.d.ts","sourceRoot":"","sources":["../../src/tabular/HuggingFaceTabularStorage.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,oBAAoB,EAAE,UAAU,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAClG,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,YAAY,EAEZ,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,oBAAoB,EACpB,uBAAuB,EACxB,MAAM,mBAAmB,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AI,CAEvB;YAKa,QAAQ;IAyBtB;;OAEG;IACH,OAAO,CAAC,WAAW;CAGpB"}
|
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { EventParameters } from "@workglow/util";
|
|
7
7
|
import { DataPortSchemaObject, FromSchema, TypedArraySchemaOptions } from "@workglow/util/schema";
|
|
8
|
+
import type { PageCursor } from "./Cursor";
|
|
9
|
+
export type { PageCursor } from "./Cursor";
|
|
8
10
|
export type ValueOptionType = string | number | bigint | boolean | null | Uint8Array;
|
|
9
11
|
/**
|
|
10
12
|
* Type definitions for tabular repository events
|
|
@@ -78,6 +80,28 @@ export interface OrderBy<Entity> {
|
|
|
78
80
|
export interface QueryOptions<Entity> {
|
|
79
81
|
readonly orderBy?: ReadonlyArray<OrderBy<Entity>>;
|
|
80
82
|
readonly limit?: number;
|
|
83
|
+
/**
|
|
84
|
+
* @deprecated Offset-based paging is unstable when rows are inserted or
|
|
85
|
+
* deleted between page fetches (entries can be skipped or duplicated).
|
|
86
|
+
* Use {@link ITabularStorage.getPage} / {@link ITabularStorage.queryPage}
|
|
87
|
+
* with a {@link PageCursor} instead.
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
* ```ts
|
|
91
|
+
* // Before (offset paging):
|
|
92
|
+
* const rows = await storage.getAll({ orderBy, limit: 50, offset: 100 });
|
|
93
|
+
*
|
|
94
|
+
* // After (cursor paging — also stable under concurrent writes):
|
|
95
|
+
* let cursor: PageCursor | undefined;
|
|
96
|
+
* for (let i = 0; i < 2; i++) {
|
|
97
|
+
* const skip = await storage.getPage({ orderBy, limit: 50, cursor });
|
|
98
|
+
* cursor = skip.nextCursor;
|
|
99
|
+
* if (!cursor) break;
|
|
100
|
+
* }
|
|
101
|
+
* const page = await storage.getPage({ orderBy, limit: 50, cursor });
|
|
102
|
+
* const rows = page.items;
|
|
103
|
+
* ```
|
|
104
|
+
*/
|
|
81
105
|
readonly offset?: number;
|
|
82
106
|
}
|
|
83
107
|
export interface CoveringIndexQueryOptions<Entity, K extends keyof Entity & string> {
|
|
@@ -86,6 +110,61 @@ export interface CoveringIndexQueryOptions<Entity, K extends keyof Entity & stri
|
|
|
86
110
|
readonly limit?: number;
|
|
87
111
|
readonly offset?: number;
|
|
88
112
|
}
|
|
113
|
+
/**
|
|
114
|
+
* Request for a cursor-paginated read.
|
|
115
|
+
*
|
|
116
|
+
* Pagination is keyset-based: the next page resumes after the row encoded
|
|
117
|
+
* in `cursor`, with the primary key acting as the stable tiebreaker.
|
|
118
|
+
* This is stable under concurrent inserts and deletes — unlike offset-based
|
|
119
|
+
* paging, which can skip or duplicate rows when the underlying data
|
|
120
|
+
* shifts between calls.
|
|
121
|
+
*
|
|
122
|
+
* If `orderBy` is omitted, rows are returned in primary-key order ascending.
|
|
123
|
+
* If `orderBy` is provided, the effective ordering is `[...orderBy, ...primaryKey]`
|
|
124
|
+
* so iteration remains deterministic when sort columns contain duplicates.
|
|
125
|
+
*/
|
|
126
|
+
export interface PageRequest<Entity> {
|
|
127
|
+
readonly orderBy?: ReadonlyArray<OrderBy<Entity>>;
|
|
128
|
+
/** Maximum number of rows to return. Defaults to 100. */
|
|
129
|
+
readonly limit?: number;
|
|
130
|
+
/** Opaque cursor returned by a previous call; omit to start from the beginning. */
|
|
131
|
+
readonly cursor?: PageCursor;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* A page of results from a cursor-paginated read.
|
|
135
|
+
*
|
|
136
|
+
* `nextCursor` is `undefined` when there are no more rows to fetch.
|
|
137
|
+
* When `nextCursor` is present, callers should pass it back via
|
|
138
|
+
* {@link PageRequest.cursor} to fetch the next page.
|
|
139
|
+
*
|
|
140
|
+
* **Termination contract.** A defined `nextCursor` does NOT guarantee
|
|
141
|
+
* additional rows exist — concurrent deletes can produce an empty page
|
|
142
|
+
* mid-iteration even though `nextCursor` was set. Loops MUST therefore
|
|
143
|
+
* terminate on either condition, not just on `nextCursor`:
|
|
144
|
+
*
|
|
145
|
+
* ```ts
|
|
146
|
+
* // CORRECT — terminates on both `nextCursor` and empty `items`:
|
|
147
|
+
* let cursor: PageCursor | undefined;
|
|
148
|
+
* do {
|
|
149
|
+
* const page = await storage.getPage({ limit: 100, cursor });
|
|
150
|
+
* for (const row of page.items) handle(row);
|
|
151
|
+
* if (page.items.length === 0) break;
|
|
152
|
+
* cursor = page.nextCursor;
|
|
153
|
+
* } while (cursor);
|
|
154
|
+
*
|
|
155
|
+
* // WRONG — can spin forever if a concurrent delete empties the next page
|
|
156
|
+
* // while leaving rows further along the cursor that get deleted in turn:
|
|
157
|
+
* while (page.nextCursor) { page = await storage.getPage({ cursor: page.nextCursor }); }
|
|
158
|
+
* ```
|
|
159
|
+
*
|
|
160
|
+
* The bundled async generators ({@link ITabularStorage.records},
|
|
161
|
+
* {@link ITabularStorage.pages}) honour this contract; reach for them
|
|
162
|
+
* instead of writing the loop manually.
|
|
163
|
+
*/
|
|
164
|
+
export interface Page<Entity> {
|
|
165
|
+
readonly items: ReadonlyArray<Entity>;
|
|
166
|
+
readonly nextCursor: PageCursor | undefined;
|
|
167
|
+
}
|
|
89
168
|
/**
|
|
90
169
|
* Type guard to check if a value is a SearchCondition
|
|
91
170
|
*/
|
|
@@ -120,6 +199,26 @@ export type InsertEntity<Entity, AutoGenKeys> = Omit<Entity, AutoGenKeys & keyof
|
|
|
120
199
|
*/
|
|
121
200
|
export interface ITabularStorage<Schema extends DataPortSchemaObject, PrimaryKeyNames extends ReadonlyArray<keyof Schema["properties"]>, Entity = FromSchema<Schema, TypedArraySchemaOptions>, PrimaryKey = SimplifyPrimaryKey<Entity, PrimaryKeyNames>, InsertType = InsertEntity<Entity, AutoGeneratedKeys<Schema>>> {
|
|
122
201
|
put(value: InsertType): Promise<Entity>;
|
|
202
|
+
/**
|
|
203
|
+
* Stores multiple entities in a single bulk operation.
|
|
204
|
+
*
|
|
205
|
+
* **Ordering guarantee:** the returned array is in the same order as the
|
|
206
|
+
* input — `result[i]` always corresponds to `values[i]`. Callers may rely on
|
|
207
|
+
* this to align bulk inserts with parallel arrays (e.g. chunks paired with
|
|
208
|
+
* embeddings). Backends are responsible for preserving the order even when
|
|
209
|
+
* the underlying engine does not formally guarantee it (see each backend's
|
|
210
|
+
* implementation).
|
|
211
|
+
*
|
|
212
|
+
* **Caveat for integer auto-generated keys on remote backends.** Supplying
|
|
213
|
+
* inputs that omit a backend-assigned integer-autoincrement primary key
|
|
214
|
+
* leaves the wrapper with no key to match a returned row to a request row
|
|
215
|
+
* (UUIDs are filled in client-side, so they don't have this problem). Such
|
|
216
|
+
* inputs fall back to the server's response order, which Postgres does not
|
|
217
|
+
* formally contract for `INSERT ... RETURNING`. The fallback is reliable in
|
|
218
|
+
* practice but if `result[i] === values[i]` matters for correctness, supply
|
|
219
|
+
* the primary key on every input — for example by minting it client-side
|
|
220
|
+
* — or split the call into per-row `put`s.
|
|
221
|
+
*/
|
|
123
222
|
putBulk(values: InsertType[]): Promise<Entity[]>;
|
|
124
223
|
get(key: PrimaryKey): Promise<Entity | undefined>;
|
|
125
224
|
delete(key: PrimaryKey | Entity): Promise<void>;
|
|
@@ -155,8 +254,29 @@ export interface ITabularStorage<Schema extends DataPortSchemaObject, PrimaryKey
|
|
|
155
254
|
* @param offset - Number of records to skip
|
|
156
255
|
* @param limit - Maximum number of records to return
|
|
157
256
|
* @returns Array of entities or undefined if no records found
|
|
257
|
+
* @deprecated Offset-based paging is unstable under concurrent writes.
|
|
258
|
+
* Use {@link getPage} for stable, keyset-based pagination.
|
|
158
259
|
*/
|
|
159
260
|
getBulk(offset: number, limit: number): Promise<Entity[] | undefined>;
|
|
261
|
+
/**
|
|
262
|
+
* Fetches a page of records using cursor-based (keyset) pagination.
|
|
263
|
+
*
|
|
264
|
+
* Stable under concurrent inserts and deletes: the cursor encodes the
|
|
265
|
+
* last seen primary key so the next page resumes from a precise position
|
|
266
|
+
* rather than a numeric offset that shifts as rows are added or removed.
|
|
267
|
+
*
|
|
268
|
+
* @param request - Optional ordering, limit, and cursor.
|
|
269
|
+
* @returns A {@link Page} with the rows for this page and a `nextCursor`
|
|
270
|
+
* to use for the next call (or `undefined` when iteration is complete).
|
|
271
|
+
*/
|
|
272
|
+
getPage(request?: PageRequest<Entity>): Promise<Page<Entity>>;
|
|
273
|
+
/**
|
|
274
|
+
* Cursor-paginated form of {@link query}.
|
|
275
|
+
*
|
|
276
|
+
* @param criteria - Object with column names as keys and values or SearchConditions
|
|
277
|
+
* @param request - Optional ordering, limit, and cursor.
|
|
278
|
+
*/
|
|
279
|
+
queryPage(criteria: SearchCriteria<Entity>, request?: PageRequest<Entity>): Promise<Page<Entity>>;
|
|
160
280
|
/**
|
|
161
281
|
* Async generator that yields records one at a time.
|
|
162
282
|
* @param pageSize - Number of records to fetch per page (default: 100)
|
|
@@ -178,6 +298,15 @@ export interface ITabularStorage<Schema extends DataPortSchemaObject, PrimaryKey
|
|
|
178
298
|
* Queries entries matching the specified search criteria with optional ordering, limit, and offset.
|
|
179
299
|
* Uses optimized index paths when possible, falls back to full scan otherwise.
|
|
180
300
|
*
|
|
301
|
+
* Implementation contract for third-party backends: when binding a
|
|
302
|
+
* `SearchCondition` value into the underlying datastore, run it
|
|
303
|
+
* through the same conversion path as a row value going *into* the
|
|
304
|
+
* store (e.g. `jsToSqlValue` for SQL backends — Date → ISO string,
|
|
305
|
+
* etc.). The cursor pagination machinery in {@link getPage} relies
|
|
306
|
+
* on this round-trip to compare a row's stored representation
|
|
307
|
+
* against a cursor's decoded value; any backend that skips the
|
|
308
|
+
* conversion would silently mis-page on Date or other rich types.
|
|
309
|
+
*
|
|
181
310
|
* @param criteria - Object with column names as keys and values or SearchConditions
|
|
182
311
|
* @param options - Optional ordering, limit, and offset options
|
|
183
312
|
* @returns Array of matching entities or undefined if no matches found
|
|
@@ -201,8 +330,78 @@ export interface ITabularStorage<Schema extends DataPortSchemaObject, PrimaryKey
|
|
|
201
330
|
*/
|
|
202
331
|
subscribeToChanges(callback: (change: TabularChangePayload<Entity>) => void, options?: TabularSubscribeOptions): () => void;
|
|
203
332
|
/**
|
|
204
|
-
*
|
|
205
|
-
*
|
|
333
|
+
* Runs `fn` inside a single transaction. If `fn` throws, all writes performed
|
|
334
|
+
* inside it are rolled back; otherwise they commit atomically. Mutation
|
|
335
|
+
* events (e.g. `put`) emitted inside `fn` are buffered and delivered after
|
|
336
|
+
* the transaction commits, so listeners never observe rows that are about
|
|
337
|
+
* to roll back.
|
|
338
|
+
*
|
|
339
|
+
* Backends differ in how strong the guarantee is:
|
|
340
|
+
* - **SQLite**: real `BEGIN` / `COMMIT` / `ROLLBACK`.
|
|
341
|
+
* - **PostgreSQL**: real `BEGIN` / `COMMIT` / `ROLLBACK`. On a real
|
|
342
|
+
* `pg.Pool` (anything exposing `connect()`) the implementation
|
|
343
|
+
* dedicates a client via `pool.connect()` and runs the transaction on
|
|
344
|
+
* that client, leaving the parent's pool free for external traffic
|
|
345
|
+
* in parallel. On single-connection wrappers (PGLitePool, raw PGlite)
|
|
346
|
+
* the transaction runs on the shared session and concurrent calls on
|
|
347
|
+
* the same instance are serialized behind a per-instance mutex so
|
|
348
|
+
* they cannot slip into the open transaction.
|
|
349
|
+
* - **Supabase, in-memory, file system, IndexedDB**: best-effort. The
|
|
350
|
+
* callback runs to completion and rejection propagates, but partial
|
|
351
|
+
* writes are not rolled back because the backend does not expose a
|
|
352
|
+
* transaction surface usable by this API.
|
|
353
|
+
*
|
|
354
|
+
* **Concurrency contract:**
|
|
355
|
+
* - On backends with native transaction support (SQLite, PostgreSQL),
|
|
356
|
+
* concurrent calls on the same storage instance are isolated from the
|
|
357
|
+
* open transaction: SQLite and the single-connection Postgres path
|
|
358
|
+
* serialize them through a per-instance mutex; the real-pool Postgres
|
|
359
|
+
* path runs them on independent pool clients in parallel. Either way,
|
|
360
|
+
* unrelated writes never accidentally commit or roll back along with
|
|
361
|
+
* `fn`.
|
|
362
|
+
* - On best-effort backends concurrent writes have no atomicity barrier
|
|
363
|
+
* to begin with — the contract on those backends is "runs `fn`", not
|
|
364
|
+
* "isolates `fn`".
|
|
365
|
+
*
|
|
366
|
+
* The `tx` handle passed to `fn` is **not** the same object as `this` for
|
|
367
|
+
* backends with native transaction support — it is a Proxy that routes
|
|
368
|
+
* writes through the transaction-bound resources (the dedicated client on
|
|
369
|
+
* real `pg.Pool`, the bypass-mutex internal methods on SQLite/PGlite) and
|
|
370
|
+
* routes events through the transaction's deferred-emit queue. Callers
|
|
371
|
+
* MUST use `tx` for everything inside `fn`. Capturing the outer `this` and
|
|
372
|
+
* calling methods on it from inside `fn` will deadlock against the held
|
|
373
|
+
* mutex (single-connection backends) or run on the wrong connection
|
|
374
|
+
* (`pg.Pool`), and is unsupported.
|
|
375
|
+
*
|
|
376
|
+
* **Nested calls.** Calls made through the `tx` handle always throw —
|
|
377
|
+
* `tx.withTransaction(...)` is a hard error on every backend. Calls made
|
|
378
|
+
* through the *original* (captured `this`) handle behave per backend:
|
|
379
|
+
* - **SQLite, single-connection Postgres** (PGlite, PGLitePool): throw,
|
|
380
|
+
* because the backend has no autonomous `BEGIN` and reusing the open
|
|
381
|
+
* transaction implicitly would be ambiguous.
|
|
382
|
+
* - **Real `pg.Pool` Postgres**: acquire an *independent* client and run
|
|
383
|
+
* as an *independent* transaction with its own commit/rollback boundary.
|
|
384
|
+
* This is the natural Postgres concurrency model on a pool — nothing
|
|
385
|
+
* ties the two transactions together. If you want the inner work to
|
|
386
|
+
* roll back when the outer throws, do not use a captured `this`; use
|
|
387
|
+
* `tx` (which throws) and a SAVEPOINT instead.
|
|
388
|
+
*
|
|
389
|
+
* Use SAVEPOINT directly if you need nested rollback boundaries within a
|
|
390
|
+
* single logical transaction.
|
|
391
|
+
*/
|
|
392
|
+
withTransaction<T>(fn: (tx: this) => Promise<T>): Promise<T>;
|
|
393
|
+
/**
|
|
394
|
+
* Creates the underlying table/object store. Idempotent: a second call on
|
|
395
|
+
* an already-set-up storage adapts the schema to any new indexes if the
|
|
396
|
+
* backend supports it (SQL `CREATE INDEX IF NOT EXISTS`, IndexedDB
|
|
397
|
+
* version bump for new indexes), and is a no-op otherwise.
|
|
398
|
+
*
|
|
399
|
+
* When the storage was constructed with `tabularMigrations`, this method
|
|
400
|
+
* also applies any pending migrations through the unified tabular
|
|
401
|
+
* migration runner (see `TabularMigrationOrchestrator`). Otherwise it is
|
|
402
|
+
* a pure DDL setup primitive — tabular schemas are derived from the JSON
|
|
403
|
+
* Schema passed at construction rather than from versioned migrations.
|
|
404
|
+
*
|
|
206
405
|
* @returns Promise that resolves when setup is complete
|
|
207
406
|
*/
|
|
208
407
|
setupDatabase(): Promise<void>;
|
|
@@ -210,7 +409,8 @@ export interface ITabularStorage<Schema extends DataPortSchemaObject, PrimaryKey
|
|
|
210
409
|
[Symbol.dispose](): void;
|
|
211
410
|
[Symbol.asyncDispose](): Promise<void>;
|
|
212
411
|
}
|
|
213
|
-
export type AnyTabularStorage = Omit<ITabularStorage<any, any, any, any, any>, "queryIndex"> & {
|
|
412
|
+
export type AnyTabularStorage = Omit<ITabularStorage<any, any, any, any, any>, "queryIndex" | "withTransaction"> & {
|
|
214
413
|
queryIndex(criteria: any, options: any): Promise<any[]>;
|
|
414
|
+
withTransaction<T>(fn: (tx: any) => Promise<T>): Promise<T>;
|
|
215
415
|
};
|
|
216
416
|
//# sourceMappingURL=ITabularStorage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ITabularStorage.d.ts","sourceRoot":"","sources":["../../src/tabular/ITabularStorage.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,oBAAoB,EAAE,UAAU,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"ITabularStorage.d.ts","sourceRoot":"","sources":["../../src/tabular/ITabularStorage.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;A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AAC,MAAM,EAAE,oBAAoB,CAAC,MAAM,CAAC,KAAK,IAAI,EACxD,OAAO,CAAC,EAAE,uBAAuB,GAChC,MAAM,IAAI,CAAC;IAEd;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2DG;IACH,eAAe,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IAE7D;;;;;;;;;;;;;OAaG;IACH,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAG/B,OAAO,IAAI,IAAI,CAAC;IAChB,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC;IACzB,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxC;AAED,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAClC,eAAe,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EACxC,YAAY,GAAG,iBAAiB,CACjC,GAAG;IACF,UAAU,CAAC,QAAQ,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;IACxD,eAAe,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,GAAG,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;CAC7D,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Steven Roussey <sroussey@gmail.com>
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { type ITabularMigrationApplier, type TabularMigrationOp } from "../migrations";
|
|
7
|
+
import { type AnyTabularStorage } from "./ITabularStorage";
|
|
8
|
+
/**
|
|
9
|
+
* Applier for schemaless tabular backends (InMemory / Shared / FsFolder /
|
|
10
|
+
* HuggingFace). DDL ops are no-ops because records are plain JS objects;
|
|
11
|
+
* `backfill` runs through the storage's normal `getPage`/`put`/`delete`
|
|
12
|
+
* API. Bookkeeping is held in the in-memory `applied` map by default;
|
|
13
|
+
* subclasses (e.g. for FsFolder) may override `persist()` / `load()` to
|
|
14
|
+
* make it durable.
|
|
15
|
+
*
|
|
16
|
+
* `tableExists` is a heuristic: returns true when the storage already
|
|
17
|
+
* holds rows. Combined with the empty `applied` set, this makes a
|
|
18
|
+
* brand-new InMemory storage take the orchestrator's fresh-DB fast path
|
|
19
|
+
* (mark-all-applied without running ops); a storage that was rehydrated
|
|
20
|
+
* from a dump will look like an existing-DB and have its migrations
|
|
21
|
+
* actually run, matching dev/prod parity expectations.
|
|
22
|
+
*/
|
|
23
|
+
export declare class InMemoryTabularMigrationApplier implements ITabularMigrationApplier {
|
|
24
|
+
protected readonly storage: AnyTabularStorage;
|
|
25
|
+
protected readonly storeName: string;
|
|
26
|
+
protected applied: Map<string, Set<number>>;
|
|
27
|
+
constructor(storage: AnyTabularStorage, storeName: string);
|
|
28
|
+
ensureBookkeeping(): Promise<void>;
|
|
29
|
+
appliedVersions(component: string): Promise<Set<number>>;
|
|
30
|
+
tableExists(): Promise<boolean>;
|
|
31
|
+
markAllApplied(component: string, versions: ReadonlyArray<{
|
|
32
|
+
version: number;
|
|
33
|
+
description: string | undefined;
|
|
34
|
+
}>): Promise<void>;
|
|
35
|
+
applyMigration(component: string, version: number, _description: string | undefined, ops: ReadonlyArray<TabularMigrationOp>, onProgress?: (fraction: number) => void): Promise<void>;
|
|
36
|
+
/** Subclasses (e.g. FsFolder) override to flush bookkeeping to disk. */
|
|
37
|
+
protected persist(): Promise<void>;
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=InMemoryTabularMigrationApplier.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":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
5
5
|
*/
|
|
6
6
|
import { DataPortSchemaObject, FromSchema, TypedArraySchemaOptions } from "@workglow/util/schema";
|
|
7
7
|
import { BaseTabularStorage, ClientProvidedKeysOption, KeyGenerationStrategy } from "./BaseTabularStorage";
|
|
8
|
+
import { type ITabularMigration, type ITabularMigrationApplier } from "../migrations";
|
|
8
9
|
import { AnyTabularStorage, AutoGeneratedKeys, CoveringIndexQueryOptions, DeleteSearchCriteria, InsertEntity, QueryOptions, SearchCriteria, SimplifyPrimaryKey, TabularChangePayload, TabularSubscribeOptions } from "./ITabularStorage";
|
|
9
10
|
export declare const MEMORY_TABULAR_REPOSITORY: import("@workglow/util").ServiceToken<AnyTabularStorage>;
|
|
10
11
|
/**
|
|
@@ -28,12 +29,15 @@ export declare class InMemoryTabularStorage<Schema extends DataPortSchemaObject,
|
|
|
28
29
|
* @param indexes - Array of columns or column arrays to make searchable. Each string or single column creates a single-column index,
|
|
29
30
|
* while each array creates a compound index with columns in the specified order.
|
|
30
31
|
* @param clientProvidedKeys - How to handle client-provided values for auto-generated keys
|
|
32
|
+
* @param tabularMigrations - Optional declarative migrations to run on setup
|
|
33
|
+
* @param migrationName - Optional name used for the migration component identifier
|
|
31
34
|
*/
|
|
32
|
-
constructor(schema: Schema, primaryKeyNames: PrimaryKeyNames, indexes?: readonly (keyof NoInfer<Entity> | readonly (keyof NoInfer<Entity>)[])[], clientProvidedKeys?: ClientProvidedKeysOption);
|
|
35
|
+
constructor(schema: Schema, primaryKeyNames: PrimaryKeyNames, indexes?: readonly (keyof NoInfer<Entity> | readonly (keyof NoInfer<Entity>)[])[], clientProvidedKeys?: ClientProvidedKeysOption, tabularMigrations?: ReadonlyArray<ITabularMigration>, migrationName?: string);
|
|
33
36
|
/**
|
|
34
|
-
* Sets up the database for the repository (no-op for in-memory)
|
|
37
|
+
* Sets up the database for the repository (no-op for in-memory unless migrations are declared)
|
|
35
38
|
*/
|
|
36
39
|
setupDatabase(): Promise<void>;
|
|
40
|
+
getMigrationApplier(): ITabularMigrationApplier | null;
|
|
37
41
|
/**
|
|
38
42
|
* Generates a key value for auto-generated keys
|
|
39
43
|
* @param columnName - Name of the column to generate a key for
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InMemoryTabularStorage.d.ts","sourceRoot":"","sources":["../../src/tabular/InMemoryTabularStorage.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,oBAAoB,EAAE,UAAU,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAElG,OAAO,EACL,kBAAkB,EAClB,wBAAwB,EACxB,qBAAqB,EACtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,yBAAyB,EACzB,oBAAoB,EACpB,YAAY,EAEZ,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,oBAAoB,EACpB,uBAAuB,EACxB,MAAM,mBAAmB,CAAC;AAG3B,eAAO,MAAM,yBAAyB,0DAErC,CAAC;AAEF;;;;;;GAMG;AACH,qBAAa,sBAAsB,CACjC,MAAM,SAAS,oBAAoB,EACnC,eAAe,SAAS,aAAa,CAAC,MAAM,MAAM,CAAC,YAAY,CAAC,CAAC,EAEjE,MAAM,GAAG,UAAU,CAAC,MAAM,EAAE,uBAAuB,CAAC,EACpD,UAAU,GAAG,kBAAkB,CAAC,MAAM,EAAE,eAAe,CAAC,EACxD,KAAK,GAAG,IAAI,CAAC,MAAM,EAAE,eAAe,CAAC,MAAM,CAAC,GAAG,MAAM,MAAM,CAAC,EAC5D,UAAU,SAAS,YAAY,CAAC,MAAM,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAC,GAAG,YAAY,CAC/E,MAAM,EACN,iBAAiB,CAAC,MAAM,CAAC,CAC1B,CACD,SAAQ,kBAAkB,CAAC,MAAM,EAAE,eAAe,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,CAAC;IAC1F,oEAAoE;IACpE,MAAM,sBAA6B;IAC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,EAAE,GAAG,SAAS,CAAC,CA4B1E;IAED;;;OAGG;IACG,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC,CAE5B;IAED;;;;;OAKG;IACG,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,GAAG,SAAS,CAAC,CAgB1E;IAED;;;;;OAKG;IACG,YAAY,CAAC,QAAQ,EAAE,oBAAoB,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAqDxE;IAED;;;;;;OAMG;IACG,KAAK,CACT,QAAQ,EAAE,cAAc,CAAC,MAAM,CAAC,EAChC,OAAO,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC,GAC7B,OAAO,CAAC,MAAM,EAAE,GAAG,SAAS,CAAC,CAkE/B;IAED;;;;OAIG;IACY,UAAU,CAAC,CAAC,SAAS,MAAM,MAAM,GAAG,MAAM,EACvD,QAAQ,EAAE,cAAc,CAAC,MAAM,CAAC,EAChC,OAAO,EAAE,yBAAyB,CAAC,MAAM,EAAE,CAAC,CAAC,GAC5C,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,CAiC5B;IAED;;;;;;;OAOG;IACa,kBAAkB,CAChC,QAAQ,EAAE,CAAC,MAAM,EAAE,oBAAoB,CAAC,MAAM,CAAC,KAAK,IAAI,EACxD,OAAO,CAAC,EAAE,uBAAuB,GAChC,MAAM,IAAI,CAsBZ;IAED;;OAEG;IACa,OAAO,IAAI,IAAI,CAE9B;CACF"}
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
import { DataPortSchemaObject, FromSchema, TypedArraySchemaOptions } from "@workglow/util/schema";
|
|
7
7
|
import { BaseTabularStorage, ClientProvidedKeysOption } from "./BaseTabularStorage";
|
|
8
8
|
import { AnyTabularStorage, AutoGeneratedKeys, CoveringIndexQueryOptions, DeleteSearchCriteria, InsertEntity, QueryOptions, SearchCriteria, SimplifyPrimaryKey, TabularSubscribeOptions } from "./ITabularStorage";
|
|
9
|
+
import { type ITabularMigration, type ITabularMigrationApplier } from "../migrations";
|
|
9
10
|
export declare const SHARED_IN_MEMORY_TABULAR_REPOSITORY: import("@workglow/util").ServiceToken<AnyTabularStorage>;
|
|
10
11
|
/**
|
|
11
12
|
* A tabular repository implementation that shares data across browser tabs/windows
|
|
@@ -30,8 +31,9 @@ export declare class SharedInMemoryTabularStorage<Schema extends DataPortSchemaO
|
|
|
30
31
|
* @param indexes - Array of columns or column arrays to make searchable. Each string or single column creates a single-column index,
|
|
31
32
|
* while each array creates a compound index with columns in the specified order.
|
|
32
33
|
* @param clientProvidedKeys - How to handle client-provided values for auto-generated keys
|
|
34
|
+
* @param tabularMigrations - Optional declarative migrations to run on setup
|
|
33
35
|
*/
|
|
34
|
-
constructor(channelName: string | undefined, schema: Schema, primaryKeyNames: PrimaryKeyNames, indexes?: readonly (keyof NoInfer<Entity> | readonly (keyof NoInfer<Entity>)[])[], clientProvidedKeys?: ClientProvidedKeysOption);
|
|
36
|
+
constructor(channelName: string | undefined, schema: Schema, primaryKeyNames: PrimaryKeyNames, indexes?: readonly (keyof NoInfer<Entity> | readonly (keyof NoInfer<Entity>)[])[], clientProvidedKeys?: ClientProvidedKeysOption, tabularMigrations?: ReadonlyArray<ITabularMigration>);
|
|
35
37
|
/**
|
|
36
38
|
* Checks if BroadcastChannel is available in the current environment
|
|
37
39
|
*/
|
|
@@ -59,6 +61,7 @@ export declare class SharedInMemoryTabularStorage<Schema extends DataPortSchemaO
|
|
|
59
61
|
* Sets up the database for the repository (syncs from other tabs)
|
|
60
62
|
*/
|
|
61
63
|
setupDatabase(): Promise<void>;
|
|
64
|
+
getMigrationApplier(): ITabularMigrationApplier | null;
|
|
62
65
|
/**
|
|
63
66
|
* Stores a key-value pair in the repository
|
|
64
67
|
* @param value - The combined object to store
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SharedInMemoryTabularStorage.d.ts","sourceRoot":"","sources":["../../src/tabular/SharedInMemoryTabularStorage.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,oBAAoB,EAAE,UAAU,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAElG,OAAO,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AACpF,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,yBAAyB,EACzB,oBAAoB,EACpB,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,uBAAuB,EACxB,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"SharedInMemoryTabularStorage.d.ts","sourceRoot":"","sources":["../../src/tabular/SharedInMemoryTabularStorage.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,oBAAoB,EAAE,UAAU,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAElG,OAAO,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AACpF,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,yBAAyB,EACzB,oBAAoB,EACpB,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,uBAAuB,EACxB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAGtF,eAAO,MAAM,mCAAmC,0DAE/C,CAAC;AAiBF;;;;;;;GAOG;AACH,qBAAa,4BAA4B,CACvC,MAAM,SAAS,oBAAoB,EACnC,eAAe,SAAS,aAAa,CAAC,MAAM,MAAM,CAAC,YAAY,CAAC,CAAC,EAEjE,MAAM,GAAG,UAAU,CAAC,MAAM,EAAE,uBAAuB,CAAC,EACpD,UAAU,GAAG,kBAAkB,CAAC,MAAM,EAAE,eAAe,CAAC,EACxD,KAAK,GAAG,IAAI,CAAC,MAAM,EAAE,eAAe,CAAC,MAA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EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,EAC/B,OAAO,CAAC,EAAE,uBAAuB,GAChC,MAAM,IAAI,CAEZ;IAED;;OAEG;IACa,OAAO,IAAI,IAAI,CAM9B;CACF"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Steven Roussey <sroussey@gmail.com>
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import type { JsonSchema } from "@workglow/util/schema";
|
|
7
|
+
import { type ITabularMigrationApplier, type TabularMigrationOp } from "../migrations";
|
|
8
|
+
import { type AnyTabularStorage } from "./ITabularStorage";
|
|
9
|
+
/**
|
|
10
|
+
* SQL-flavored {@link ITabularMigrationApplier}. Subclasses (one per dialect)
|
|
11
|
+
* provide the connection-level primitives (`exec`, `tableExists`,
|
|
12
|
+
* `withTransaction`) and the JSON-Schema-to-SQL mapper. The applier handles
|
|
13
|
+
* op translation, atomicity, and bookkeeping.
|
|
14
|
+
*
|
|
15
|
+
* `applyMigration` runs all ops + the bookkeeping INSERT inside a single
|
|
16
|
+
* `withTransaction` so DDL, backfill writes, and applied-version recording
|
|
17
|
+
* commit (or roll back) together on backends that support real transactions.
|
|
18
|
+
*/
|
|
19
|
+
export declare abstract class SqlTabularMigrationApplier implements ITabularMigrationApplier {
|
|
20
|
+
protected abstract dialectName(): "sqlite" | "postgres";
|
|
21
|
+
protected abstract table(): string;
|
|
22
|
+
protected abstract storage(): AnyTabularStorage;
|
|
23
|
+
protected abstract mapTypeToSQL(typeDef: JsonSchema): string;
|
|
24
|
+
protected abstract isNullableSchema(typeDef: JsonSchema): boolean;
|
|
25
|
+
protected abstract executeSql(sql: string): Promise<void>;
|
|
26
|
+
protected abstract executeSqlTx(sql: string, tx: AnyTabularStorage): Promise<void>;
|
|
27
|
+
protected abstract recordAppliedTx(component: string, version: number, description: string | undefined, tx: AnyTabularStorage): Promise<void>;
|
|
28
|
+
protected abstract recordApplied(component: string, version: number, description: string | undefined): Promise<void>;
|
|
29
|
+
protected abstract queryAppliedVersions(component: string): Promise<Set<number>>;
|
|
30
|
+
protected abstract probeTableExists(): Promise<boolean>;
|
|
31
|
+
ensureBookkeeping(): Promise<void>;
|
|
32
|
+
appliedVersions(component: string): Promise<Set<number>>;
|
|
33
|
+
tableExists(): Promise<boolean>;
|
|
34
|
+
markAllApplied(component: string, versions: ReadonlyArray<{
|
|
35
|
+
version: number;
|
|
36
|
+
description: string | undefined;
|
|
37
|
+
}>): Promise<void>;
|
|
38
|
+
applyMigration(component: string, version: number, description: string | undefined, ops: ReadonlyArray<TabularMigrationOp>, onProgress?: (fraction: number) => void): Promise<void>;
|
|
39
|
+
protected applyOp(op: TabularMigrationOp, tx: AnyTabularStorage): Promise<void>;
|
|
40
|
+
/**
|
|
41
|
+
* Renders a JS literal as SQL. Strings are quoted with `'` doubling;
|
|
42
|
+
* numbers / booleans / null are rendered raw. NaN / ±Infinity throw
|
|
43
|
+
* rather than silently splicing as `"NaN"` / `"Infinity"` (neither is
|
|
44
|
+
* valid SQL). Objects throw — defaults must be finite primitives.
|
|
45
|
+
*/
|
|
46
|
+
protected literalSql(value: unknown): string;
|
|
47
|
+
/**
|
|
48
|
+
* DDL for the bookkeeping table. Same shape used by the existing
|
|
49
|
+
* per-driver runners.
|
|
50
|
+
*/
|
|
51
|
+
protected bookkeepingDdl(): string;
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=SqlTabularMigrationApplier.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SqlTabularMigrationApplier.d.ts","sourceRoot":"","sources":["../../src/tabular/SqlTabularMigrationApplier.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,kBAAkB,EAGxB,MAAM,eAAe,CAA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B;IACnE,gBAAyB,IAAI,EAAE,MAAM,CAA+B;IACpE,cAEC;CACF;AAED,qBAAa,wBAAyB,SAAQ,sBAAsB;IAClE,gBAAyB,IAAI,EAAE,MAAM,CAA8B;IACnE,YAAY,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"StorageError.d.ts","sourceRoot":"","sources":["../../src/tabular/StorageError.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,qBAAa,YAAa,SAAQ,SAAS;IACzC,gBAAyB,IAAI,EAAE,MAAM,CAAkB;CACxD;AAED,qBAAa,sBAAuB,SAAQ,YAAY;IACtD,gBAAyB,IAAI,EAAE,MAAM,CAA4B;CAClE;AAED,qBAAa,yBAA0B,SAAQ,sBAAsB;IACnE,gBAAyB,IAAI,EAAE,MAAM,CAA+B;IACpE,cAEC;CACF;AAED,qBAAa,wBAAyB,SAAQ,sBAAsB;IAClE,gBAAyB,IAAI,EAAE,MAAM,CAA8B;IACnE,YAAY,KAAK,EAAE,MAAM,EAOxB;CACF;AAED,qBAAa,yBAA0B,SAAQ,sBAAsB;IACnE,gBAAyB,IAAI,EAAE,MAAM,CAA+B;IACpE,YAAY,MAAM,EAAE,MAAM,EAEzB;CACF;AAED,qBAAa,uBAAwB,SAAQ,YAAY;IACvD,gBAAyB,IAAI,EAAE,MAAM,CAA6B;IAClE,YAAY,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAE7C;CACF"}
|