@workerstack/database 0.21.0 → 0.22.1
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 +243 -40
- package/docs/meta-contract.md +55 -1
- package/package.json +3 -7
- package/src/cli/args.ts +4 -2
- package/src/cli/codegen.ts +2 -2
- package/src/cli/comb-config.ts +8 -3
- package/src/cli/file-path.ts +25 -0
- package/src/cli/migrate-apply.ts +5 -21
- package/src/cli/migrate-d1.ts +5 -1
- package/src/cli/migrate-json.ts +48 -0
- package/src/cli/migrate.ts +26 -4
- package/src/codegen/analyzer-types.ts +6 -1
- package/src/codegen/annotations.ts +66 -9
- package/src/codegen/format-constraints.ts +114 -0
- package/src/codegen/generators/dtos/entity-file.ts +2 -1
- package/src/codegen/generators/dtos/example-meta.ts +22 -2
- package/src/codegen/generators/dtos/field-schema.ts +31 -8
- package/src/codegen/generators/dtos/ip-patterns.ts +25 -11
- package/src/codegen/generators/dtos/number-range.ts +22 -3
- package/src/codegen/generators/dtos/schema-aliases.ts +5 -3
- package/src/codegen/generators/dtos/text-format.ts +63 -0
- package/src/codegen/generators/dtos/text-schema.ts +49 -2
- package/src/codegen/generators/manifest.ts +9 -1
- package/src/codegen/runtime/read-comb.ts +71 -3
- package/src/codegen/runtime/read-tables.ts +31 -19
- package/src/codegen/runtime/snapshot-types.ts +3 -1
- package/src/codegen/runtime/to-meta.ts +6 -3
- package/src/formats/catalog.ts +255 -0
- package/src/formats/iana-time-zone.ts +117 -0
- package/src/formats/iso3166-1.ts +78 -0
- package/src/formats/iso4217.ts +42 -0
- package/src/formats/iso639-1.ts +41 -0
- package/src/formats/uts35.ts +143 -0
- package/src/index.ts +5 -0
- package/src/meta/column.ts +22 -9
- package/src/migrate/core/apply.ts +63 -22
- package/src/migrate/core/atlas-apply-runs.ts +15 -26
- package/src/migrate/core/cleanup.ts +22 -10
- package/src/migrate/core/d1-engine-child.mjs +27 -11
- package/src/migrate/core/d1-history.ts +23 -26
- package/src/migrate/core/d1-wrangler-error.ts +24 -1
- package/src/migrate/core/pg-replay-commit.ts +41 -38
- package/src/migrate/core/pg-replay-drops.ts +17 -32
- package/src/migrate/core/pg-replay-hidden.ts +75 -0
- package/src/migrate/core/pg-replay-roles.ts +2 -4
- package/src/migrate/core/pg-replay.ts +21 -19
- package/src/migrate/core/pg-server-snapshot.ts +4 -24
- package/src/migrate/core/proof-readers.ts +80 -0
- package/src/migrate/core/proof-run.ts +19 -5
- package/src/migrate/core/proof-scope.ts +27 -14
- package/src/migrate/core/sql-code.ts +36 -5
- package/src/migrate/core/sql-scan.ts +7 -1
- package/src/migrate/core/sqlite-keywords.ts +70 -0
- package/src/migrate/core/stopped.ts +70 -0
- package/src/migrate/core/trigger-write.d.mts +7 -0
- package/src/migrate/core/trigger-write.mjs +42 -0
- package/src/pg/columns.ts +6 -4
- package/src/query/cursor-mint.ts +11 -18
- package/src/query/cursor-refusals.ts +22 -11
- package/src/query/descriptions.ts +4 -9
- package/src/query/filter-parse.ts +80 -22
- package/src/query/filter-validate.ts +10 -13
- package/src/query/filter.ts +40 -18
- package/src/query/list-extras.ts +7 -10
- package/src/query/list-schema.ts +0 -2
- package/src/query/merged.ts +3 -2
- package/src/query/pagination.ts +30 -6
- package/src/query/rounded-key.ts +5 -8
- package/src/query/schema-params.ts +12 -5
- package/src/query/select-validate.ts +7 -4
- package/src/query/sqlite/cursor-fit.ts +10 -2
- package/src/query/trusted.ts +7 -2
- package/src/sqlite/columns.ts +6 -4
- package/src/sqlite/constraints.ts +120 -6
- package/types/cli/args.d.ts.map +1 -1
- package/types/cli/comb-config.d.ts +5 -2
- package/types/cli/comb-config.d.ts.map +1 -1
- package/types/cli/file-path.d.ts +11 -0
- package/types/cli/file-path.d.ts.map +1 -0
- package/types/cli/migrate-apply.d.ts +1 -0
- package/types/cli/migrate-apply.d.ts.map +1 -1
- package/types/cli/migrate-d1.d.ts.map +1 -1
- package/types/cli/migrate-json.d.ts +4 -0
- package/types/cli/migrate-json.d.ts.map +1 -0
- package/types/cli/migrate.d.ts.map +1 -1
- package/types/codegen/analyzer-types.d.ts +6 -1
- package/types/codegen/analyzer-types.d.ts.map +1 -1
- package/types/codegen/annotations.d.ts +12 -7
- package/types/codegen/annotations.d.ts.map +1 -1
- package/types/codegen/format-constraints.d.ts +22 -0
- package/types/codegen/format-constraints.d.ts.map +1 -0
- package/types/codegen/generators/dtos/entity-file.d.ts.map +1 -1
- package/types/codegen/generators/dtos/example-meta.d.ts.map +1 -1
- package/types/codegen/generators/dtos/field-schema.d.ts.map +1 -1
- package/types/codegen/generators/dtos/ip-patterns.d.ts +7 -0
- package/types/codegen/generators/dtos/ip-patterns.d.ts.map +1 -1
- package/types/codegen/generators/dtos/number-range.d.ts +8 -0
- package/types/codegen/generators/dtos/number-range.d.ts.map +1 -1
- package/types/codegen/generators/dtos/schema-aliases.d.ts +1 -1
- package/types/codegen/generators/dtos/schema-aliases.d.ts.map +1 -1
- package/types/codegen/generators/dtos/text-format.d.ts +31 -0
- package/types/codegen/generators/dtos/text-format.d.ts.map +1 -0
- package/types/codegen/generators/dtos/text-schema.d.ts +8 -1
- package/types/codegen/generators/dtos/text-schema.d.ts.map +1 -1
- package/types/codegen/generators/manifest.d.ts +5 -0
- package/types/codegen/generators/manifest.d.ts.map +1 -1
- package/types/codegen/runtime/read-comb.d.ts +17 -3
- package/types/codegen/runtime/read-comb.d.ts.map +1 -1
- package/types/codegen/runtime/read-tables.d.ts.map +1 -1
- package/types/codegen/runtime/snapshot-types.d.ts +3 -1
- package/types/codegen/runtime/snapshot-types.d.ts.map +1 -1
- package/types/codegen/runtime/to-meta.d.ts.map +1 -1
- package/types/formats/catalog.d.ts +51 -0
- package/types/formats/catalog.d.ts.map +1 -0
- package/types/formats/iana-time-zone.d.ts +7 -0
- package/types/formats/iana-time-zone.d.ts.map +1 -0
- package/types/formats/iso3166-1.d.ts +12 -0
- package/types/formats/iso3166-1.d.ts.map +1 -0
- package/types/formats/iso4217.d.ts +7 -0
- package/types/formats/iso4217.d.ts.map +1 -0
- package/types/formats/iso639-1.d.ts +6 -0
- package/types/formats/iso639-1.d.ts.map +1 -0
- package/types/formats/uts35.d.ts +13 -0
- package/types/formats/uts35.d.ts.map +1 -0
- package/types/index.d.ts +5 -0
- package/types/index.d.ts.map +1 -1
- package/types/meta/column.d.ts +7 -1
- package/types/meta/column.d.ts.map +1 -1
- package/types/migrate/core/apply.d.ts +3 -2
- package/types/migrate/core/apply.d.ts.map +1 -1
- package/types/migrate/core/atlas-apply-runs.d.ts +6 -0
- package/types/migrate/core/atlas-apply-runs.d.ts.map +1 -1
- package/types/migrate/core/cleanup.d.ts +16 -4
- package/types/migrate/core/cleanup.d.ts.map +1 -1
- package/types/migrate/core/d1-history.d.ts.map +1 -1
- package/types/migrate/core/d1-wrangler-error.d.ts +11 -0
- package/types/migrate/core/d1-wrangler-error.d.ts.map +1 -1
- package/types/migrate/core/pg-replay-commit.d.ts +14 -9
- package/types/migrate/core/pg-replay-commit.d.ts.map +1 -1
- package/types/migrate/core/pg-replay-drops.d.ts +7 -12
- package/types/migrate/core/pg-replay-drops.d.ts.map +1 -1
- package/types/migrate/core/pg-replay-hidden.d.ts +36 -0
- package/types/migrate/core/pg-replay-hidden.d.ts.map +1 -0
- package/types/migrate/core/pg-replay-roles.d.ts +2 -4
- package/types/migrate/core/pg-replay-roles.d.ts.map +1 -1
- package/types/migrate/core/pg-replay.d.ts.map +1 -1
- package/types/migrate/core/pg-server-snapshot.d.ts +4 -11
- package/types/migrate/core/pg-server-snapshot.d.ts.map +1 -1
- package/types/migrate/core/proof-readers.d.ts +19 -0
- package/types/migrate/core/proof-readers.d.ts.map +1 -0
- package/types/migrate/core/proof-run.d.ts.map +1 -1
- package/types/migrate/core/proof-scope.d.ts +15 -7
- package/types/migrate/core/proof-scope.d.ts.map +1 -1
- package/types/migrate/core/sql-code.d.ts +7 -3
- package/types/migrate/core/sql-code.d.ts.map +1 -1
- package/types/migrate/core/sql-scan.d.ts.map +1 -1
- package/types/migrate/core/sqlite-keywords.d.ts +11 -0
- package/types/migrate/core/sqlite-keywords.d.ts.map +1 -0
- package/types/migrate/core/stopped.d.ts +23 -0
- package/types/migrate/core/stopped.d.ts.map +1 -0
- package/types/pg/columns.d.ts +3 -3
- package/types/pg/columns.d.ts.map +1 -1
- package/types/query/cursor-mint.d.ts.map +1 -1
- package/types/query/cursor-refusals.d.ts +17 -1
- package/types/query/cursor-refusals.d.ts.map +1 -1
- package/types/query/descriptions.d.ts +1 -1
- package/types/query/descriptions.d.ts.map +1 -1
- package/types/query/filter-parse.d.ts +15 -4
- package/types/query/filter-parse.d.ts.map +1 -1
- package/types/query/filter-validate.d.ts +1 -1
- package/types/query/filter-validate.d.ts.map +1 -1
- package/types/query/filter.d.ts +9 -1
- package/types/query/filter.d.ts.map +1 -1
- package/types/query/list-extras.d.ts.map +1 -1
- package/types/query/list-schema.d.ts.map +1 -1
- package/types/query/merged.d.ts.map +1 -1
- package/types/query/pagination.d.ts +13 -1
- package/types/query/pagination.d.ts.map +1 -1
- package/types/query/rounded-key.d.ts +2 -11
- package/types/query/rounded-key.d.ts.map +1 -1
- package/types/query/schema-params.d.ts.map +1 -1
- package/types/query/select-validate.d.ts.map +1 -1
- package/types/query/sqlite/cursor-fit.d.ts.map +1 -1
- package/types/query/trusted.d.ts +1 -1
- package/types/query/trusted.d.ts.map +1 -1
- package/types/sqlite/columns.d.ts +3 -3
- package/types/sqlite/columns.d.ts.map +1 -1
- package/types/sqlite/constraints.d.ts +117 -5
- package/types/sqlite/constraints.d.ts.map +1 -1
- package/src/sqlite/patterns.ts +0 -19
- package/types/sqlite/patterns.d.ts +0 -19
- package/types/sqlite/patterns.d.ts.map +0 -1
|
@@ -4,15 +4,10 @@ import { type Sql } from "./pg-replay-database.ts";
|
|
|
4
4
|
import type { Run } from "./pg-replay-roles.ts";
|
|
5
5
|
/** `step` run, its failure passed: one whose failure leaves something has it said by the drop that then fails (dropOr) */
|
|
6
6
|
declare function settle(step: () => Promise<unknown>): Promise<void>;
|
|
7
|
-
/**
|
|
8
|
-
type
|
|
9
|
-
swept: boolean;
|
|
10
|
-
what: string;
|
|
11
|
-
};
|
|
12
|
-
/** How a drop that failed is said: what it `left`, with dev's error */
|
|
13
|
-
type Leave = (left: Left, error: unknown) => void;
|
|
7
|
+
/** How a drop that failed is said: what it left on devUrl's server, a database, role or slot by name, with dev's error */
|
|
8
|
+
type Leave = (left: string, error: unknown) => void;
|
|
14
9
|
/** `drop` run, a failure `leave`d: cleaning up never replaces the replay's verdict, and never leaves something unsaid */
|
|
15
|
-
declare function dropOr(leave: Leave, left:
|
|
10
|
+
declare function dropOr(leave: Leave, left: string, drop: () => Promise<unknown>): Promise<void>;
|
|
16
11
|
/** How the drops reach devUrl's server: a session in `database`, which a subscription's drop needs, and how a failed drop is said */
|
|
17
12
|
type Drops = {
|
|
18
13
|
into: (database: string) => Sql;
|
|
@@ -52,10 +47,10 @@ declare function sweep(admin: Sql, now: number, drops: Drops): Promise<void>;
|
|
|
52
47
|
declare function sweepDev(target: PgTarget, print: (line: string) => void, load?: () => Promise<Connect>): Promise<void>;
|
|
53
48
|
/**
|
|
54
49
|
* `run`'s cleanup, each drop that fails `leave`d: its connection closed, a query in flight with it,
|
|
55
|
-
* any backend still in its database ended, the
|
|
56
|
-
* the database
|
|
57
|
-
*
|
|
58
|
-
*
|
|
50
|
+
* any backend still in its database ended, the database's subscriptions and slots, which keep it
|
|
51
|
+
* from its drop, the database made no template and dropped, forcing out a backend that came in
|
|
52
|
+
* since, and each role it made or adopted. It drops nothing else a refused window saw, as Postgres
|
|
53
|
+
* keeps no creator for a role, a database or a slot, and another session may have made it
|
|
59
54
|
*/
|
|
60
55
|
declare function cleanUp(run: Run, drops: Drops): Promise<void>;
|
|
61
56
|
export { cleanUp, type Drops, dropMade, dropOr, dropRole, dropSlot, type Leave, leaving, settle, sweep, sweepDev };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pg-replay-drops.d.ts","sourceRoot":"","sources":["../../../src/migrate/core/pg-replay-drops.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAE,KAAK,OAAO,EAAE,SAAS,EAAgB,MAAM,sBAAsB,CAAA;AAC5E,OAAO,EAAqB,KAAK,GAAG,EAAE,MAAM,yBAAyB,CAAA;AACrE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAG/C,0HAA0H;AAC1H,iBAAe,MAAM,CAAC,IAAI,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAMjE;AAED,
|
|
1
|
+
{"version":3,"file":"pg-replay-drops.d.ts","sourceRoot":"","sources":["../../../src/migrate/core/pg-replay-drops.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAE,KAAK,OAAO,EAAE,SAAS,EAAgB,MAAM,sBAAsB,CAAA;AAC5E,OAAO,EAAqB,KAAK,GAAG,EAAE,MAAM,yBAAyB,CAAA;AACrE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAG/C,0HAA0H;AAC1H,iBAAe,MAAM,CAAC,IAAI,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAMjE;AAED,0HAA0H;AAC1H,KAAK,KAAK,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAA;AAEnD,yHAAyH;AACzH,iBAAe,MAAM,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAO7F;AAED,qIAAqI;AACrI,KAAK,KAAK,GAAG;IAAE,IAAI,EAAE,CAAC,QAAQ,EAA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,EAAE,CAAA"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether the statements a replay's window covers can run code comb cannot read, the only way one
|
|
3
|
+
* makes a change past its database that this backend's counts miss (pg-replay-commit.ts): a DO
|
|
4
|
+
* block, a CALL, an EXECUTE, or a call of a function outside pg_catalog, dblink's among them. A
|
|
5
|
+
* statement whose tree holds none of those runs only what its parse says, and BEYOND and SERVER_CALLS
|
|
6
|
+
* (pg-outside-transaction.ts, pg-server-calls.ts) leave out every such statement that reaches past
|
|
7
|
+
* the database, so a change the server's read shows beside it is another session's. A function
|
|
8
|
+
* called by a bare name is pg_catalog's only where the replay's database holds no other of that name,
|
|
9
|
+
* as an overload in a schema on the search path can take the call, and the file makes none of it.
|
|
10
|
+
* Code Postgres runs for a statement on its own, a trigger, a default, an operator or a cast that
|
|
11
|
+
* calls a function an earlier file defines, is no call in the tree, so it is not read here; what it
|
|
12
|
+
* writes in the replay's transaction its counts still see.
|
|
13
|
+
*/
|
|
14
|
+
import type { Sql } from "./pg-replay-database.ts";
|
|
15
|
+
/**
|
|
16
|
+
* What the statements so far can run that comb cannot read: `code` when one surely can, the
|
|
17
|
+
* functions they call by a bare name (`calls`), which may be pg_catalog's, and those the file makes
|
|
18
|
+
* (`made`). A file's every later window counts what one ran, as a change a DO block makes in the
|
|
19
|
+
* file's own block commits at its COMMIT
|
|
20
|
+
*/
|
|
21
|
+
type Hidden = {
|
|
22
|
+
calls: Set<string>;
|
|
23
|
+
code: boolean;
|
|
24
|
+
made: Set<string>;
|
|
25
|
+
};
|
|
26
|
+
/** Nothing run yet */
|
|
27
|
+
declare const nothingHidden: () => Hidden;
|
|
28
|
+
/** A statement the replay runs, read `into`: one the parser cannot read may run anything */
|
|
29
|
+
declare function readStatement(tree: unknown, into: Hidden): void;
|
|
30
|
+
/**
|
|
31
|
+
* Whether what `hidden` holds can run code comb cannot read, a bare name resolved on `sql`, the
|
|
32
|
+
* replay's connection, which sees what its open transaction made
|
|
33
|
+
*/
|
|
34
|
+
declare function runsHidden(sql: Sql, { calls, code, made }: Hidden): Promise<boolean>;
|
|
35
|
+
export { type Hidden, nothingHidden, readStatement, runsHidden };
|
|
36
|
+
//# sourceMappingURL=pg-replay-hidden.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pg-replay-hidden.d.ts","sourceRoot":"","sources":["../../../src/migrate/core/pg-replay-hidden.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAA;AAElD;;;;;GAKG;AACH,KAAK,MAAM,GAAG;IAAE,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAAC,IAAI,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CAAE,CAAA;AAEtE,sBAAsB;AACtB,QAAA,MAAM,aAAa,QAAO,MAA8D,CAAA;AA0BxF,4FAA4F;AAC5F,iBAAS,aAAa,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAGxD;AASD;;;GAGG;AACH,iBAAe,UAAU,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAKnF;AAED,OAAO,EAAE,KAAK,MAAM,EAAE,aAAa,EAAE,aAAa,EAAE,UAAU,EAAE,CAAA"}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { type Sql } from "./pg-replay-database.ts";
|
|
2
2
|
import { type Rows, type Writes } from "./pg-server-writes.ts";
|
|
3
|
-
import type { Snapshot
|
|
3
|
+
import type { Snapshot } from "./pg-server-snapshot.ts";
|
|
4
4
|
/**
|
|
5
5
|
* One replay's state: its connection, the server as committed (`admin`), its database, the backend
|
|
6
6
|
* that owns it, its role (`role`, which CURRENT_USER and its kin name in a file), whether that role
|
|
7
7
|
* is a superuser, which reads pg_authid, whether it has CREATEROLE (`createrole`), and the roles it made; the
|
|
8
8
|
* open transaction's own writes, comb's CREATE ROLEs', with the rows they left; the shared catalogs
|
|
9
|
-
* as last read committed (`seen`)
|
|
10
|
-
* added (`strays`), which the cleanup drops
|
|
9
|
+
* as last read committed (`seen`)
|
|
11
10
|
*/
|
|
12
11
|
type Run = {
|
|
13
12
|
admin: Sql;
|
|
@@ -22,7 +21,6 @@ type Run = {
|
|
|
22
21
|
role: string;
|
|
23
22
|
seen: Snapshot;
|
|
24
23
|
sql: Sql;
|
|
25
|
-
strays: Strays;
|
|
26
24
|
/** the tablespaces it left out the CREATE of, which a statement then runs in pg_default instead */
|
|
27
25
|
tablespaces: Set<string>;
|
|
28
26
|
superuser: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pg-replay-roles.d.ts","sourceRoot":"","sources":["../../../src/migrate/core/pg-replay-roles.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAmB,KAAK,GAAG,EAAO,MAAM,yBAAyB,CAAA;AACxE,OAAO,EAAiC,KAAK,IAAI,EAAe,KAAK,MAAM,EAAe,MAAM,uBAAuB,CAAA;AACvH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"pg-replay-roles.d.ts","sourceRoot":"","sources":["../../../src/migrate/core/pg-replay-roles.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAmB,KAAK,GAAG,EAAO,MAAM,yBAAyB,CAAA;AACxE,OAAO,EAAiC,KAAK,IAAI,EAAe,KAAK,MAAM,EAAe,MAAM,uBAAuB,CAAA;AACvH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAGvD;;;;;;GAMG;AACH,KAAK,GAAG,GAAG;IACV,KAAK,EAAE,GAAG,CAAA;IACV,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,UAAU,EAAE,OAAO,CAAA;IACnB,QAAQ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O,CAAC,CAyBlB;AAED;;;GAGG;AACH,iBAAe,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,CAiBhF;AAED;;;;GAIG;AACH,iBAAe,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAc1E;AAED;;;GAGG;AACH,iBAAe,KAAK,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAMtE;AAKD,6GAA6G;AAC7G,iBAAe,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAEjF;AAED,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,GAAG,EAAE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pg-replay.d.ts","sourceRoot":"","sources":["../../../src/migrate/core/pg-replay.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pg-replay.d.ts","sourceRoot":"","sources":["../../../src/migrate/core/pg-replay.ts"],"names":[],"mappings":"AA6CA,OAAO,EAAE,KAAK,QAAQ,EAAqB,MAAM,mBAAmB,CAAA;AAKpE,OAAO,EAAE,KAAK,OAAO,EAAwC,MAAM,sBAAsB,CAAA;AACzF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAErD,OAAO,EAAoE,KAAK,GAAG,EAAE,MAAM,yBAAyB,CAAA;AAKpH,OAAO,EAAe,KAAK,MAAM,EAAgC,MAAM,0BAA0B,CAAA;AAUjG,0CAA0C;AAC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AE,KAAK,WAAW,EAAE,KAAK,EAAE,aAAa,EAAE,CAAA"}
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
* The server's shared catalogs read as committed, in one query: what a bare
|
|
3
3
|
* statement changed, which no transaction counts, and what a second connection committed, which this
|
|
4
4
|
* backend's counts never see (pg-server-writes.ts). The read is the server's, another session's work
|
|
5
|
-
* in it too, so each row carries the names of the objects it is about
|
|
6
|
-
*
|
|
5
|
+
* in it too, so each row carries the names of the objects it is about: a change is a file's when it
|
|
6
|
+
* is to the replay's own database, or to a name the file spells (namesIn in sql-code.ts) beside a
|
|
7
|
+
* statement that can run code comb cannot read (pg-replay-hidden.ts). A replay's own rows are left out, but
|
|
7
8
|
* for the fields of its own database's row that keep the cleanup from dropping it, which only that
|
|
8
9
|
* replay changes. Beside the catalogs, the server's replication slots, which no catalog
|
|
9
10
|
* holds.
|
|
@@ -33,15 +34,7 @@ declare function snapshot(admin: Sql): Promise<Snapshot>;
|
|
|
33
34
|
* name in `names`, the names a file spells, when given
|
|
34
35
|
*/
|
|
35
36
|
declare function snapshotChanges(before: Snapshot, after: Snapshot, names?: ReadonlySet<string>): string[];
|
|
36
|
-
/** What the cleanup drops, by the noun its subject starts with */
|
|
37
|
-
type Strays = {
|
|
38
|
-
databases: string[];
|
|
39
|
-
roles: string[];
|
|
40
|
-
slots: string[];
|
|
41
|
-
};
|
|
42
|
-
/** The roles, databases and replication slots named in `names` that `after` holds and `before` does not */
|
|
43
|
-
declare function added(before: Snapshot, after: Snapshot, names: ReadonlySet<string>): Strays;
|
|
44
37
|
/** The subscriptions `after` holds in `database` and `before` does not, by subject: its drop takes them */
|
|
45
38
|
declare const subscriptionsIn: (before: Snapshot, after: Snapshot, database: string) => string[];
|
|
46
|
-
export {
|
|
39
|
+
export { prepareSnapshot, type Snapshot, snapshot, snapshotChanges, subscriptionsIn };
|
|
47
40
|
//# sourceMappingURL=pg-server-snapshot.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pg-server-snapshot.d.ts","sourceRoot":"","sources":["../../../src/migrate/core/pg-server-snapshot.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"pg-server-snapshot.d.ts","sourceRoot":"","sources":["../../../src/migrate/core/pg-server-snapshot.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAA;AA6ElD;;;GAGG;AACH,KAAK,QAAQ,GAAG,GAAG,CAAC,MAAM,EAAE;IAAE,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,CAAC,CAAA;AAEvF;;;;GAIG;AACH,iBAAe,eAAe,CAC7B,KAAK,EAAE,GAAG,EACV,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,OAAO,CAAA;CAAE,GAC/D,OAAO,CAAC,IAAI,CAAC,CAEf;AAED,gIAAgI;AAChI,iBAAe,QAAQ,CAAC,KAAK,EAAE,GAAG,GAAG,OAAO,CAAC,QAAQ,CAAC,CAQrD;AAWD;;;GAGG;AACH,iBAAS,eAAe,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,MAAM,EAAE,CAajG;AAED,2GAA2G;AAC3G,QAAA,MAAM,eAAe,WAAY,QAAQ,SAAS,QAAQ,YAAY,MAAM,KAAG,MAAM,EAKvD,CAAA;AAE9B,OAAO,EAAE,eAAe,EAAE,KAAK,QAAQ,EAAE,QAAQ,EAAE,eAAe,EAAE,eAAe,EAAE,CAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a file leaves unable to run: SQLite's DROP TABLE and DROP VIEW check no view or trigger that names what they
|
|
3
|
+
* drop, and SQLite, D1 and libsql resolve those names only when a statement runs. So a file can apply and leave every
|
|
4
|
+
* read of a view, or every write a trigger fires on, failing. After a file applies to the proof's copy, each view and
|
|
5
|
+
* trigger that survives it and names an object the file dropped or changed is compiled: a view's read, a trigger's
|
|
6
|
+
* own write on its table or view (trigger-write.mjs). SQLite resolves a name only by name, and the copy holds every
|
|
7
|
+
* reader that names a table a file reaches (proof-scope.ts), so this finds every reader the file breaks.
|
|
8
|
+
*/
|
|
9
|
+
import type { LocalDb } from "../drivers/local-db.ts";
|
|
10
|
+
import type { LiveObject } from "./proof-copy.ts";
|
|
11
|
+
/** The copy's schema, each object by type and folded name */
|
|
12
|
+
declare function schemaOf(db: LocalDb): Map<string, LiveObject>;
|
|
13
|
+
/**
|
|
14
|
+
* Throws when a file that turned the copy's schema `before` into `db`'s leaves a view or trigger unable to run,
|
|
15
|
+
* naming it and SQLite's error: no approval overrides, since every read or write through it would fail
|
|
16
|
+
*/
|
|
17
|
+
declare function refuseBrokenReaders(db: LocalDb, before: ReadonlyMap<string, LiveObject>): void;
|
|
18
|
+
export { refuseBrokenReaders, schemaOf };
|
|
19
|
+
//# sourceMappingURL=proof-readers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proof-readers.d.ts","sourceRoot":"","sources":["../../../src/migrate/core/proof-readers.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAKjD,6DAA6D;AAC7D,iBAAS,QAAQ,CAAC,EAAE,EAAE,OAAO,GAAG,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAatD;AA8BD;;;GAGG;AACH,iBAAS,mBAAmB,CAAC,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,CAAC,MAAM,EAAE,UAAU,CAAC,GAAG,IAAI,CAevF;AAED,OAAO,EAAE,mBAAmB,EAAE,QAAQ,EAAE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proof-run.d.ts","sourceRoot":"","sources":["../../../src/migrate/core/proof-run.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"proof-run.d.ts","sourceRoot":"","sources":["../../../src/migrate/core/proof-run.ts"],"names":[],"mappings":"AAkBA,OAAO,EAA6B,KAAK,aAAa,EAAE,MAAM,wBAAwB,CAAA;AACtF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAG7C,OAAO,EAAwD,KAAK,UAAU,EAAe,MAAM,iBAAiB,CAAA;AAOpH,4CAA4C;AAC5C,KAAK,KAAK,GAAG;IACZ,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,4EAA4E;IAC5E,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,+EAA+E;IAC/E,QAAQ,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IAC/C,MAAM,EAAE,MAAM,EAAE,CAAA;CAChB,CAAA;AAoLD;;;;;;;;GAQG;AACH,iBAAe,YAAY,CAC1B,IAAI,EAAE,UAAU,EAChB,KAAK,EAAE,aAAa,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC,EACnD,EAAE,MAAkB,EAAE,IAAI,EAAE,GAAE;IAAE,MAAM,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;IAAC,IAAI,CAAC,EAAE,SAAS,UAAU,EAAE,GAAG,SAAS,CAAA;CAAO,GACjH,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAuD7B;AAKD,OAAO,EAAE,KAAK,KAAK,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -3,15 +3,17 @@
|
|
|
3
3
|
* can observe, created, and the tables whose rows they can observe, seeded, so the copy refuses what the whole
|
|
4
4
|
* schema would and costs what the files reach.
|
|
5
5
|
*
|
|
6
|
-
* - An object's references are every name its text spells (sql-code's lexer,
|
|
7
|
-
*
|
|
8
|
-
*
|
|
6
|
+
* - An object's references are every name its text spells where SQLite's grammar takes a name (sql-code's lexer,
|
|
7
|
+
* compared folded, never as a substring: the `TABLE` of `CREATE TABLE` is no name) and, for a virtual table, each
|
|
8
|
+
* word, string and quoted name among its module's arguments, whole. A table's FK parents are the other tables it
|
|
9
|
+
* references; a reader is a view, a trigger or a virtual table, and reads what it references.
|
|
9
10
|
* - N: each live object whose name a file spells, and the history table; S is N's tables, which a file creates,
|
|
10
11
|
* alters, drops, renames or writes.
|
|
11
12
|
* - Rows go to S, each table a reader reached from S references (to a fixpoint), D (their FK descendants: a cascade
|
|
12
13
|
* reaches them) and A (the FK ancestors of all those: their keys must be met).
|
|
13
14
|
* - The copy creates N, the seeded tables, and each reader that references an S table (SQLite checks views and
|
|
14
|
-
* triggers on DROP COLUMN and RENAME COLUMN, and a rename rewrites them)
|
|
15
|
+
* triggers on DROP COLUMN and RENAME COLUMN, and a rename rewrites them) or a view of N (a file that drops the
|
|
16
|
+
* view leaves the reader unable to run, which the proof compiles it to see). Then to a fixpoint each index and trigger
|
|
15
17
|
* on a created table or view (a view's INSTEAD OF triggers carry out a write through it), each table and view a
|
|
16
18
|
* created reader references, and each created table's FK ancestors, which a write to it compiles checks against.
|
|
17
19
|
* - Reflection reads the schema itself: a name with SQLite's reserved `sqlite_` prefix (its catalogs, sqlite_sequence,
|
|
@@ -27,15 +29,21 @@
|
|
|
27
29
|
import type { LiveObject } from "./proof-copy.ts";
|
|
28
30
|
declare const isVirtual: (object: LiveObject) => boolean;
|
|
29
31
|
/**
|
|
30
|
-
* Virtual table `object`'s module, the name after USING however it is written,
|
|
31
|
-
* the module's arguments, which the module may read as a table's name (fts5vocab, content=)
|
|
32
|
+
* Virtual table `object`'s module, the name after USING however it is written, each string and quoted name among
|
|
33
|
+
* the module's arguments, which the module may read as a table's name (fts5vocab, content=), and each bare word there
|
|
32
34
|
*/
|
|
33
35
|
declare function virtualOf(object: LiveObject): {
|
|
34
36
|
args: string[];
|
|
35
37
|
module: string;
|
|
38
|
+
words: string[];
|
|
36
39
|
} | undefined;
|
|
37
40
|
/** The folded names of the shadow tables virtual table `object`'s module makes */
|
|
38
41
|
declare const shadowsOf: (object: LiveObject) => string[];
|
|
42
|
+
/**
|
|
43
|
+
* Every name `object` references, folded (see the module's comment). A virtual table's module reads its own arguments,
|
|
44
|
+
* not SQL, so each bare word among them may name a table, `group` in `content=group` among them
|
|
45
|
+
*/
|
|
46
|
+
declare const referencesOf: (object: LiveObject) => Set<string>;
|
|
39
47
|
/** What a copy scoped to pending files holds: the live objects it creates, in their order, and the tables it seeds, folded */
|
|
40
48
|
type Scope = {
|
|
41
49
|
objects: LiveObject[];
|
|
@@ -48,5 +56,5 @@ type Scope = {
|
|
|
48
56
|
declare function observable(objects: readonly LiveObject[], files: ReadonlyArray<{
|
|
49
57
|
sql: string;
|
|
50
58
|
}>, history?: string | undefined): Scope;
|
|
51
|
-
export { isVirtual, observable, type Scope, shadowsOf, virtualOf };
|
|
59
|
+
export { isVirtual, observable, referencesOf, type Scope, shadowsOf, virtualOf };
|
|
52
60
|
//# sourceMappingURL=proof-scope.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proof-scope.d.ts","sourceRoot":"","sources":["../../../src/migrate/core/proof-scope.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"proof-scope.d.ts","sourceRoot":"","sources":["../../../src/migrate/core/proof-scope.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAgBjD,QAAA,MAAM,SAAS,WAAY,UAAU,KAAG,OAAsD,CAAA;AAyB9F;;;GAGG;AACH,iBAAS,SAAS,CAAC,MAAM,EAAE,UAAU,GAAG;IAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,EAAE,CAAA;CAAE,GAAG,SAAS,CAUtG;AAED,kFAAkF;AAClF,QAAA,MAAM,SAAS,WAAY,UAAU,KAAG,MAAM,EAC8D,CAAA;AAE5G;;;GAGG;AACH,QAAA,MAAM,YAAY,WAAY,UAAU,KAAG,GAAG,CAAC,MAAM,CAC0D,CAAA;AAyB/G,8HAA8H;AAC9H,KAAK,KAAK,GAAG;IAAE,OAAO,EAAE,UAAU,EAAE,CAAC;IAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CAAE,CAAA;AA6E3D;;;GAGG;AACH,iBAAS,UAAU,CAClB,OAAO,EAAE,SAAS,UAAU,EAAE,EAC9B,KAAK,EAAE,aAAa,CAAC;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC,EACrC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,GAC1B,KAAK,CAgDP;AAED,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE,KAAK,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,CAAA"}
|
|
@@ -50,9 +50,13 @@ declare function pragmaOf(code: string): Pragma | undefined;
|
|
|
50
50
|
/** A whole name as SQLite resolves it, each part folded, with the schema it was written with (`main."Post"` is `main.post`) */
|
|
51
51
|
declare const qualifiedKey: (name: string) => string;
|
|
52
52
|
/**
|
|
53
|
-
* Every name SQLite code can spell, as SQLite resolves one: each
|
|
54
|
-
*
|
|
55
|
-
*
|
|
53
|
+
* Every name SQLite code can spell, as SQLite resolves one: each quoted name unquoted, each word of a string, which
|
|
54
|
+
* SQLite reads as a name where one stands (`FROM 'post'`) and a module as its option's (`content='post'`), and each
|
|
55
|
+
* bare word that can be one, all folded by asciiFold; never a word of a comment. A bare keyword is no name
|
|
56
|
+
* where SQLite's grammar takes none: `TABLE`, `CREATE`, `NULL` and the rest of NEVER_NAMES whenever it is bare, and
|
|
57
|
+
* `KEY` after `PRIMARY` or `FOREIGN`, which no name can follow. So a table named `table` is named by `"table"` and
|
|
58
|
+
* not by the `CREATE TABLE` of every file. Any other bare word may be a name and is read as one: a name read
|
|
59
|
+
* where there is none only widens what a proof copies, a name missed would narrow it
|
|
56
60
|
*/
|
|
57
61
|
declare function sqliteNames(sql: string): Set<string>;
|
|
58
62
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sql-code.d.ts","sourceRoot":"","sources":["../../../src/migrate/core/sql-code.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"sql-code.d.ts","sourceRoot":"","sources":["../../../src/migrate/core/sql-code.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAI1C,wEAAwE;AACxE,QAAA,MAAM,KAAK,EAAE,MAAqG,CAAA;AAClH,uCAAuC;AACvC,QAAA,MAAM,KAAK,EAAE,MAA2C,CAAA;AAWxD,kEAAkE;AAClE,QAAA,MAAM,OAAO,SAAU,MAAM,KAAG,MAAmF,CAAA;AAEnH,wEAAwE;AACxE,QAAA,MAAM,QAAQ,SAAU,MAAM,KAAG,MAAmD,CAAA;AAEpF;;;GAGG;AACH,KAAK,MAAM,GAAG,QAAQ,GAAG;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAAA;AAE3C,6DAA6D;AAC7D,QAAA,MAAM,QAAQ,YAAa,OAAO,sBAAsB,MAAwD,CAAA;AAEhH,0CAA0C;AAC1C,QAAA,MAAM,SAAS,WAAY,MAAM,KAAG,OAAwD,CAAA;AAE5F;;;;;GAKG;AACH,iBAAS,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAA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1
|
+
{"version":3,"file":"sql-scan.d.ts","sourceRoot":"","sources":["../../../src/migrate/core/sql-scan.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAiF1C;;;;;GAKG;AACH,iBAAS,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE,OAAkB,GAAG,MAAM,EAAE,CAc9E;AAKD;;;;;;;GAOG;AACH,iBAAS,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,UAAQ,GAAG,MAAM,CAEvD;AAED;;;;GAIG;AACH,iBAAS,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEzC;AAkBD,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,kBAAkB,EAAE,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The words SQLite reads only as keywords when they stand bare in code: no table, column, index, view,
|
|
3
|
+
* trigger or alias can be named by one unless it is quoted. The other keywords (`key`, `end`, `action`, `left`,
|
|
4
|
+
* `if`) SQLite takes as a name where its grammar wants one, so a bare one may be a name and is read as one.
|
|
5
|
+
* The list is the engine's: tests/sqlite-keywords.test.ts holds every word here to SQLite's refusal as each kind of
|
|
6
|
+
* name, in node:sqlite's SQLite and libsql's. `nothing` and `returning` are left out, as an SQLite before 3.24 and
|
|
7
|
+
* 3.35 reads them as plain names.
|
|
8
|
+
*/
|
|
9
|
+
declare const NEVER_NAMES: ReadonlySet<string>;
|
|
10
|
+
export { NEVER_NAMES };
|
|
11
|
+
//# sourceMappingURL=sqlite-keywords.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sqlite-keywords.d.ts","sourceRoot":"","sources":["../../../src/migrate/core/sqlite-keywords.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,QAAA,MAAM,WAAW,EAAE,WAAW,CAAC,MAAM,CAyDnC,CAAA;AAEF,OAAO,EAAE,WAAW,EAAE,CAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Refused } from "./refused.ts";
|
|
2
|
+
/** The files a stop found applied by the run, and left pending */
|
|
3
|
+
type Found = {
|
|
4
|
+
applied: string[];
|
|
5
|
+
pending: string[];
|
|
6
|
+
};
|
|
7
|
+
/** A run a signal stopped: the signal, and as a Refused the files it applied, left, or may have applied */
|
|
8
|
+
export declare class Stopped extends Refused {
|
|
9
|
+
readonly signal: NodeJS.Signals;
|
|
10
|
+
constructor(signal: NodeJS.Signals, message: string, files: ConstructorParameters<typeof Refused>[1]);
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* `work`, with a step held while it runs that, on a signal, says on `print` which of `names` the run
|
|
14
|
+
* applied and which it did not, as `read` finds them once the work in flight has ended (cleanup.ts
|
|
15
|
+
* runs a child's own step before this one), and returns the report. The process then ends by the signal.
|
|
16
|
+
*/
|
|
17
|
+
export declare function whileStoppable<T>({ names, print, read }: {
|
|
18
|
+
names: readonly string[];
|
|
19
|
+
print: (line: string) => void;
|
|
20
|
+
read: () => Promise<Found>;
|
|
21
|
+
}, work: () => Promise<T>): Promise<T>;
|
|
22
|
+
export {};
|
|
23
|
+
//# sourceMappingURL=stopped.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stopped.d.ts","sourceRoot":"","sources":["../../../src/migrate/core/stopped.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC,kEAAkE;AAClE,KAAK,KAAK,GAAG;IAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,CAAA;AAErD,2GAA2G;AAC3G,qBAAa,OAAQ,SAAQ,OAAO;IACnC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,OAAO,CAAA;IAE/B,YAAY,MAAM,EAAE,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,qBAAqB,CAAC,OAAO,OAAO,CAAC,CAAC,CAAC,CAAC,EAInG;CACD;AA2BD;;;;GAIG;AACH,wBAAsB,cAAc,CAAC,CAAC,EACrC,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;IAAE,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAAC,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAAC,IAAI,EAAE,MAAM,OAAO,CAAC,KAAK,CAAC,CAAA;CAAE,EAC/G,IAAI,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GACpB,OAAO,CAAC,CAAC,CAAC,CAWZ"}
|
package/types/pg/columns.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type PgBigInt53Builder, type PgBooleanBuilder, type PgDoublePrecisionBuilder, type PgIntegerBuilder, type PgJsonbBuilder, type PgSerialBuilder, type PgTextBuilder, type Set$Type, type SetHasDefault, type SetIsPrimaryKey, type SetNotNull } from "drizzle-orm/pg-core";
|
|
2
|
-
import type { EnumOptions, IntegerConstraints, JsonConstraints, TextConstraints, TimestampConstraints } from "../sqlite/constraints.ts";
|
|
2
|
+
import type { EnumOptions, IntegerConstraints, JsonConstraints, RealConstraints, RefConstraints, TextConstraints, TimestampConstraints } from "../sqlite/constraints.ts";
|
|
3
3
|
import type * as z from "zod";
|
|
4
4
|
/** A Postgres text column builder */
|
|
5
5
|
type Text = PgTextBuilder<[string, ...string[]]>;
|
|
@@ -46,9 +46,9 @@ export type PgColumns = {
|
|
|
46
46
|
*/
|
|
47
47
|
json: <TSchema extends z.ZodTypeAny = z.ZodTypeAny>(name: string, _schema: TSchema, _constraints?: JsonConstraints) => Set$Type<PgJsonbBuilder, z.infer<TSchema>>;
|
|
48
48
|
/** a floating-point number, stored as double precision */
|
|
49
|
-
real: (name: string, _constraints?:
|
|
49
|
+
real: (name: string, _constraints?: RealConstraints) => PgDoublePrecisionBuilder;
|
|
50
50
|
/** a text foreign key; chain `.references()` to name the column it points at */
|
|
51
|
-
ref: (name: string, _constraints?:
|
|
51
|
+
ref: (name: string, _constraints?: RefConstraints) => Text;
|
|
52
52
|
/** the auto-incrementing 4-byte `serial` primary key `id`, filled by the database */
|
|
53
53
|
serialId: () => SetIsPrimaryKey<PgSerialBuilder>;
|
|
54
54
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"columns.d.ts","sourceRoot":"","sources":["../../src/pg/columns.ts"],"names":[],"mappings":"AAMA,OAAO,EAMN,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,wBAAwB,EAC7B,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,aAAa,EAElB,KAAK,QAAQ,EACb,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,UAAU,EAEf,MAAM,qBAAqB,CAAA;AAI5B,OAAO,KAAK,EACX,WAAW,EACX,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,oBAAoB,EACpB,MAAM,0BAA0B,CAAA;AACjC,OAAO,KAAK,KAAK,CAAC,MAAM,KAAK,CAAA;AAW7B,qCAAqC;AACrC,KAAK,IAAI,GAAG,aAAa,CAAC,CAAC,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC,CAAC,CAAA;AAEhD,0FAA0F;AAC1F,KAAK,aAAa,GAAG,WAAW,GAAG,YAAY,CAAA;AAC/C,6FAA6F;AAC7F,KAAK,aAAa,GAAG,WAAW,GAAG,YAAY,CAAA;AAC/C,yFAAyF;AACzF,KAAK,aAAa,GAAG,WAAW,GAAG,YAAY,CAAA;AAE/C;;;;GAIG;AACH,MAAM,MAAM,SAAS,GAAG;IACvB,8DAA8D;IAC9D,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,gBAAgB,CAAA;IAC3C;;;;OAIG;IACH,SAAS,EAAE,CAAC,IAAI,EAAE,aAAa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AC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAA;CAAE,GAC1F,MAAM,CAER;AAGD;;;GAGG;AACH,iBAAS,YAAY,CACpB,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC5B,IAAI,EAAE,SAAS,SAAS,EAAE,EAC1B,OAAO,EAAE,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC,CAAC,CAAC,GAAG;IAC1C,uFAAuF;IACvF,KAAK,CAAC,EAAE,WAAW,GAAG,SAAS,CAAA;CAC/B,GACC,MAAM,MAAM,CA2Cd;AAmCD,OAAO,EAAE,KAAK,WAAW,EAAE,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,UAAU,EAAE,CAAA"}
|
|
@@ -1,4 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What no cursor resumes after, refused by name when a cursor is minted: a computed sort, a tiebreak
|
|
3
|
+
* id a JS number rounds, and a row without a sort value or its id, or with one no cursor carries.
|
|
4
|
+
* UnmintableRow tells a refusal of a row's own value from one of the list's wiring.
|
|
5
|
+
*/
|
|
6
|
+
import { CombError } from "../error.ts";
|
|
1
7
|
import type { SortField } from "./types.ts";
|
|
8
|
+
/**
|
|
9
|
+
* A 500 naming a row's value no cursor holds: a key too long for the cap, an Invalid Date or a rounded
|
|
10
|
+
* number as read, a value the cursor would not read back as itself, a class its column's mode reads as
|
|
11
|
+
* another. A page by cursor answers it on the page that serves the row; a page by number serves the row
|
|
12
|
+
* and, when its next cursor would be minted from it, answers `nextCursor: null` with `hasMore` still
|
|
13
|
+
* true. Any other mint refusal is the list's wiring or config, and every page answers it
|
|
14
|
+
*/
|
|
15
|
+
declare class UnmintableRow extends CombError {
|
|
16
|
+
constructor(cause: string);
|
|
17
|
+
}
|
|
2
18
|
/** Whether `value` is an integer a JS number rounds: past ±(2^53 − 1), a lossy read of the row's key */
|
|
3
19
|
declare const lossy: (value: unknown) => value is number;
|
|
4
20
|
/**
|
|
@@ -21,5 +37,5 @@ declare function refuseComputedSort(parsedSort: readonly SortField[]): void;
|
|
|
21
37
|
* the next page refused as invalid
|
|
22
38
|
*/
|
|
23
39
|
declare function refuseUncarried(record: Record<string, unknown>, parsedSort: readonly SortField[], idField: string): void;
|
|
24
|
-
export { lossy, NO_KEYSET_CAUSE, refuseComputedSort, refuseRoundedId, refuseUncarried };
|
|
40
|
+
export { lossy, NO_KEYSET_CAUSE, refuseComputedSort, refuseRoundedId, refuseUncarried, UnmintableRow };
|
|
25
41
|
//# sourceMappingURL=cursor-refusals.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cursor-refusals.d.ts","sourceRoot":"","sources":["../../src/query/cursor-refusals.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cursor-refusals.d.ts","sourceRoot":"","sources":["../../src/query/cursor-refusals.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAGvC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAE3C;;;;;;GAMG;AACH,cAAM,aAAc,SAAQ,SAAS;IACpC,YAAY,KAAK,EAAE,MAAM,EAExB;CACD;AAED,wGAAwG;AACxG,QAAA,MAAM,KAAK,UAAW,OAAO,KAAG,KAAK,IAAI,MAC4C,CAAA;AAErF;;;GAGG;AACH,iBAAS,eAAe,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAQ/E;AAED,6HAA6H;AAC7H,QAAA,MAAM,eAAe,4EAA4E,CAAA;AAEjG;;;;GAIG;AACH,iBAAS,kBAAkB,CAAC,UAAU,EAAE,SAAS,SAAS,EAAE,GAAG,IAAI,CAOlE;AAcD;;;;;GAKG;AACH,iBAAS,eAAe,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,UAAU,EAAE,SAAS,SAAS,EAAE,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAoBjH;AAED,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,kBAAkB,EAAE,eAAe,EAAE,eAAe,EAAE,aAAa,EAAE,CAAA"}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* same config that validates the request, so the text cannot drift from what
|
|
8
8
|
* the parser accepts — and stays when a publisher strips `x-*` extensions.
|
|
9
9
|
*/
|
|
10
|
-
import type
|
|
10
|
+
import { type FilterLimits } from "./filter.ts";
|
|
11
11
|
import type { FieldsConfig } from "./schema-types.ts";
|
|
12
12
|
import type { FieldType, FilterOperator } from "./types.ts";
|
|
13
13
|
/** The OpenAPI description of the `cursor` param */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"descriptions.d.ts","sourceRoot":"","sources":["../../src/query/descriptions.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"descriptions.d.ts","sourceRoot":"","sources":["../../src/query/descriptions.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,KAAK,YAAY,EAAgB,MAAM,aAAa,CAAA;AAE7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAE3D,oDAAoD;AACpD,QAAA,MAAM,kBAAkB,6JACmI,CAAA;AAE3J,kDAAkD;AAClD,QAAA,MAAM,gBAAgB,yUACiT,CAAA;AACvU,+CAA+C;AAC/C,QAAA,MAAM,aAAa,EAAE,MAAM,EAAW,CAAA;AAEtC,kDAAkD;AAClD,QAAA,MAAM,gBAAgB,oGAC4E,CAAA;AAClG,+CAA+C;AAC/C,QAAA,MAAM,aAAa,EAAE,MAAM,EAAuB,CAAA;AAElD,sHAAsH;AACtH,QAAA,MAAM,kBAAkB,oNAC0L,CAAA;AAElN,oEAAoE;AACpE,MAAM,MAAM,SAAS,GAAG;IACvB,8BAA8B;IAC9B,WAAW,EAAE,MAAM,CAAA;IACnB,+BAA+B;IAC/B,QAAQ,EAAE,MAAM,EAAE,CAAA;CAClB,CAAA;AAOD,uGAAuG;AACvG,iBAAS,cAAc,CACtB,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,MAAM,GACd;IACF,8BAA8B;IAC9B,WAAW,EAAE,MAAM,CAAA;IACnB,yCAAyC;IACzC,QAAQ,EAAE,MAAM,EAAE,CAAA;CAClB,CAKA;AAED;;;GAGG;AACH,iBAAS,eAAe,CAAC,MAAM,EAAE,YAAY,GAAG,SAAS,CAsBxD;AAkBD;;;GAGG;AACH,iBAAS,eAAe,CACvB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,EACjC,YAAY,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,SAAS,cAAc,EAAE,EAC5D,MAAM,EAAE,YAAY,GAClB,SAAS,CAkBX;AAED,yHAAyH;AACzH,iBAAS,cAAc,CACtB,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,WAAW,EAAE,MAAM,GACjB,SAAS,GAAG;IACd,gGAAgG;IAChG,OAAO,EAAE,MAAM,CAAA;CACf,CAcA;AAED,8FAA8F;AAC9F,iBAAS,eAAe,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS,CAK/E;AAED,OAAO,EACN,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,eAAe,GACf,CAAA"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*
|
|
5
5
|
* - `field.op.value`: one condition; `,` joins conditions with AND
|
|
6
6
|
* - `or(...)`, `and(...)`: groups, nestable
|
|
7
|
-
* - `in.(a,b)`, `nin.(a,b)`: lists
|
|
7
|
+
* - `in.(a,b)`, `nin.(a,b)`: lists; `in.()` is the one empty list, and a comma beside no member is malformed
|
|
8
8
|
* - `"..."`: a quoted value may hold `,` `(` `)` and `.`; `\"` and `\\` escape inside it
|
|
9
9
|
* - `@name`: a computed field
|
|
10
10
|
*/
|
|
@@ -12,10 +12,21 @@ import type { FilterAST, FilterOperator } from "./types.ts";
|
|
|
12
12
|
/** Every operator the filter grammar parses; `validateFilter` holds each field to its type's */
|
|
13
13
|
declare const FILTER_OPERATORS: readonly [FilterOperator, ...FilterOperator[]];
|
|
14
14
|
/**
|
|
15
|
-
* The AST of a filter string, or
|
|
15
|
+
* The AST of a non-blank filter string, or why it cannot be read, in words for a caller to show: a
|
|
16
16
|
* filter the parser does not fully understand is refused, never reduced to "no filter", which
|
|
17
|
-
* would widen the result to the whole table on a typo.
|
|
17
|
+
* would widen the result to the whole table on a typo. A group nested past `maxDepth`, or past
|
|
18
|
+
* FILTER_MAX_DEPTH whatever `maxDepth` is, is refused where it opens.
|
|
19
|
+
*/
|
|
20
|
+
declare function readFilter(input: string, maxDepth: number): {
|
|
21
|
+
ast: FilterAST;
|
|
22
|
+
} | {
|
|
23
|
+
error: string;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* The AST of a filter string, or null when there is none or any part of it cannot be read, or it
|
|
27
|
+
* nests past FILTER_MAX_DEPTH: a filter the parser does not fully understand is refused, never
|
|
28
|
+
* reduced to "no filter", which would widen the result to the whole table on a typo.
|
|
18
29
|
*/
|
|
19
30
|
declare function parseFilter(input: string | null | undefined): FilterAST | null;
|
|
20
|
-
export { FILTER_OPERATORS, parseFilter };
|
|
31
|
+
export { FILTER_OPERATORS, parseFilter, readFilter };
|
|
21
32
|
//# sourceMappingURL=filter-parse.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter-parse.d.ts","sourceRoot":"","sources":["../../src/query/filter-parse.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EAAE,SAAS,EAAgC,cAAc,EAAE,MAAM,YAAY,CAAA;AAGzF,gGAAgG;AAChG,QAAA,MAAM,gBAAgB,EAAE,SAAS,CAAC,cAAc,EAAE,GAAG,cAAc,EAAE,CAcpE,CAAA;
|
|
1
|
+
{"version":3,"file":"filter-parse.d.ts","sourceRoot":"","sources":["../../src/query/filter-parse.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EAAE,SAAS,EAAgC,cAAc,EAAE,MAAM,YAAY,CAAA;AAGzF,gGAAgG;AAChG,QAAA,MAAM,gBAAgB,EAAE,SAAS,CAAC,cAAc,EAAE,GAAG,cAAc,EAAE,CAcpE,CAAA;AAsMD;;;;;GAKG;AACH,iBAAS,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG;IAAE,GAAG,EAAE,SAAS,CAAA;CAAE,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAI3F;AAED;;;;GAIG;AACH,iBAAS,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,SAAS,GAAG,IAAI,CAIvE;AAED,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,UAAU,EAAE,CAAA"}
|
|
@@ -32,7 +32,7 @@ type FilterValidationResult = {
|
|
|
32
32
|
type FilterLimits = {
|
|
33
33
|
/** Conditions in the whole filter, every group counted */
|
|
34
34
|
maxConditions: number;
|
|
35
|
-
/** Nested or()/and() groups below the top level */
|
|
35
|
+
/** Nested or()/and() groups below the top level; the parser reads no more than 256, whatever this is */
|
|
36
36
|
maxDepth: number;
|
|
37
37
|
/** Members of one in/nin list */
|
|
38
38
|
maxInValues: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter-validate.d.ts","sourceRoot":"","sources":["../../src/query/filter-validate.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAgC,cAAc,EAA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CAiB/B;AAED,OAAO,EACN,aAAa,EACb,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,sBAAsB,GAC3B,CAAA"}
|
package/types/query/filter.d.ts
CHANGED
|
@@ -6,6 +6,14 @@ import { FILTER_OPERATORS, parseFilter } from "./filter-parse.ts";
|
|
|
6
6
|
import { parseFilterNumber } from "./filter-typed.ts";
|
|
7
7
|
import { FILTER_LIMITS, OPERATORS_BY_TYPE, type FilterField, type FilterFieldSpec, type FilterLimits, type FilterValidationResult, type LimitsGiven, validateFilter } from "./filter-validate.ts";
|
|
8
8
|
import type { SortField } from "./types.ts";
|
|
9
|
+
/**
|
|
10
|
+
* A regular expression taking every `order` parseOrder reads over the fields in `sort`, up to
|
|
11
|
+
* `maxSortKeys` entries: the empty value, which reads as the default order, and each entry the field
|
|
12
|
+
* and the suffixes orderEntries reads off it. A field named twice is refused, so no order holds more
|
|
13
|
+
* entries than `sort` has fields; which field repeats needs a lookahead, which RE2 lacks, so the
|
|
14
|
+
* pattern leaves that to the description
|
|
15
|
+
*/
|
|
16
|
+
declare function orderPattern(sort: readonly string[], maxSortKeys: number): string;
|
|
9
17
|
/**
|
|
10
18
|
* Parse PostgREST-style `order` string into SortField array.
|
|
11
19
|
*
|
|
@@ -36,5 +44,5 @@ declare function namedTwice(fields: readonly SortField[]): string[];
|
|
|
36
44
|
* has whitespace around it, which the published pattern refuses too
|
|
37
45
|
*/
|
|
38
46
|
declare function orderEntries(input: string | null | undefined): Array<SortField | string>;
|
|
39
|
-
export { FILTER_LIMITS, FILTER_OPERATORS, OPERATORS_BY_TYPE, parseFilter, parseFilterNumber, namedTwice, orderEntries, parseOrder, validateFilter, type FilterField, type FilterFieldSpec, type FilterLimits, type FilterValidationResult, type LimitsGiven, };
|
|
47
|
+
export { FILTER_LIMITS, FILTER_OPERATORS, OPERATORS_BY_TYPE, parseFilter, parseFilterNumber, namedTwice, orderEntries, orderPattern, parseOrder, validateFilter, type FilterField, type FilterFieldSpec, type FilterLimits, type FilterValidationResult, type LimitsGiven, };
|
|
40
48
|
//# sourceMappingURL=filter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../../src/query/filter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AACrD,OAAO,EACN,aAAa,EACb,iBAAiB,EACjB,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,sBAAsB,EAC3B,KAAK,WAAW,EAChB,cAAc,EACd,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EAAiB,SAAS,EAAE,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../../src/query/filter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AACrD,OAAO,EACN,aAAa,EACb,iBAAiB,EACjB,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,sBAAsB,EAC3B,KAAK,WAAW,EAChB,cAAc,EACd,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EAAiB,SAAS,EAAE,MAAM,YAAY,CAAA;AA0B1D;;;;;;GAMG;AACH,iBAAS,YAAY,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,CAI1E;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,iBAAS,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,SAAS,EAAE,GAAG,IAAI,CAIxE;AAED,0DAA0D;AAC1D,iBAAS,UAAU,CAAC,MAAM,EAAE,SAAS,SAAS,EAAE,GAAG,MAAM,EAAE,CAK1D;AAED;;;GAGG;AACH,iBAAS,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,KAAK,CAAC,SAAS,GAAG,MAAM,CAAC,CA0BjF;AAED,OAAO,EACN,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EACjB,WAAW,EACX,iBAAiB,EACjB,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,cAAc,EACd,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,sBAAsB,EAC3B,KAAK,WAAW,GAChB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-extras.d.ts","sourceRoot":"","sources":["../../src/query/list-extras.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"list-extras.d.ts","sourceRoot":"","sources":["../../src/query/list-extras.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAG3C,qGAAqG;AACrG,QAAA,MAAM,OAAO,EAAG,SAAkB,CAAA;AAKlC,QAAA,MAAM,YAAY,EAAE,MAA6B,CAAA;AAkBjD;;;GAGG;AACH,KAAK,QAAQ,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAA;AAKtH,wGAAwG;AACxG,QAAA,MAAM,SAAS,UAAW,OAAO,KAAG,OACqC,CAAA;AAoBzE;;;GAGG;AACH,iBAAS,aAAa,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM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CAAC,CAAC,SAAS,iBAAiB,CAAC,CAAC,CAAC,EAAE,UAAU,SAAS,MAAM,IAAI,CAAC,CAAC,OAAO,CAC1F,gBAAgB,EAChB,CAAC,CAAC,YAAY,CAAC,OAAO,CAAC,eAAe,CAAC,UAAU,CAAC,GAAG;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC,CACpH,CAAA;AAuFD;;;;GAIG;AACH,iBAAS,qBAAqB,CAC7B,CAAC,SAAS,iBAAiB,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,EACrD,KAAK,CAAC,WAAW,SAAS,SAAS,MAAM,EAAE,GAAG,SAAS,MAAM,EAAE,EAC9D,MAAM,EAAE,eAAe,CAAC,CAAC,EAAE,WAAW,CAAC,GAAG,eAAe,CAAC,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC,CAuDlF;AAED,OAAO,EAAE,qBAAqB,EAAE,KAAK,eAAe,EAAE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"merged.d.ts","sourceRoot":"","sources":["../../src/query/merged.ts"],"names":[],"mappings":"AAeA,OAAO,EAGN,KAAK,cAAc,EACnB,KAAK,OAAO,
|
|
1
|
+
{"version":3,"file":"merged.d.ts","sourceRoot":"","sources":["../../src/query/merged.ts"],"names":[],"mappings":"AAeA,OAAO,EAGN,KAAK,cAAc,EACnB,KAAK,OAAO,EAEZ,KAAK,kBAAkB,EAEvB,MAAM,iBAAiB,CAAA;AAiLxB;;;;;GAKG;AACH,iBAAS,cAAc,CAAC,CAAC,SAAS,MAAM,EACvC,YAAY,EAAE,aAAa,CAAC,SAAS,CAAC,EAAE,CAAC,EACzC,KAAK,EAAE;IACN,0DAA0D;IAC1D,UAAU,EAAE,cAAc,GAAG;QAC5B,8GAA8G;QAC9G,MAAM,EAAE,IAAI,CAAA;KACZ,CAAA;CACD,GACC,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,kBAAkB,CAAC,CAsClD;AAED,OAAO,EAAE,cAAc,EAAE,CAAA"}
|