@workerstack/database 0.22.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.
Files changed (112) hide show
  1. package/README.md +46 -7
  2. package/package.json +3 -2
  3. package/src/cli/args.ts +4 -2
  4. package/src/cli/codegen.ts +2 -2
  5. package/src/cli/comb-config.ts +8 -3
  6. package/src/cli/file-path.ts +25 -0
  7. package/src/cli/migrate-apply.ts +5 -21
  8. package/src/cli/migrate-d1.ts +5 -1
  9. package/src/cli/migrate-json.ts +48 -0
  10. package/src/cli/migrate.ts +26 -4
  11. package/src/migrate/core/apply.ts +63 -22
  12. package/src/migrate/core/atlas-apply-runs.ts +15 -26
  13. package/src/migrate/core/cleanup.ts +22 -10
  14. package/src/migrate/core/d1-engine-child.mjs +27 -11
  15. package/src/migrate/core/d1-history.ts +23 -26
  16. package/src/migrate/core/d1-wrangler-error.ts +24 -1
  17. package/src/migrate/core/pg-replay-commit.ts +41 -38
  18. package/src/migrate/core/pg-replay-drops.ts +17 -32
  19. package/src/migrate/core/pg-replay-hidden.ts +75 -0
  20. package/src/migrate/core/pg-replay-roles.ts +2 -4
  21. package/src/migrate/core/pg-replay.ts +21 -19
  22. package/src/migrate/core/pg-server-snapshot.ts +4 -24
  23. package/src/migrate/core/proof-readers.ts +80 -0
  24. package/src/migrate/core/proof-run.ts +19 -5
  25. package/src/migrate/core/proof-scope.ts +27 -14
  26. package/src/migrate/core/sql-code.ts +36 -5
  27. package/src/migrate/core/sql-scan.ts +7 -1
  28. package/src/migrate/core/sqlite-keywords.ts +70 -0
  29. package/src/migrate/core/stopped.ts +70 -0
  30. package/src/migrate/core/trigger-write.d.mts +7 -0
  31. package/src/migrate/core/trigger-write.mjs +42 -0
  32. package/src/query/cursor-mint.ts +11 -18
  33. package/src/query/cursor-refusals.ts +22 -11
  34. package/src/query/descriptions.ts +4 -9
  35. package/src/query/filter-parse.ts +80 -22
  36. package/src/query/filter-validate.ts +10 -13
  37. package/src/query/filter.ts +40 -18
  38. package/src/query/list-extras.ts +7 -10
  39. package/src/query/list-schema.ts +0 -2
  40. package/src/query/merged.ts +3 -2
  41. package/src/query/pagination.ts +30 -6
  42. package/src/query/rounded-key.ts +5 -8
  43. package/src/query/schema-params.ts +12 -5
  44. package/src/query/select-validate.ts +7 -4
  45. package/src/query/sqlite/cursor-fit.ts +10 -2
  46. package/src/query/trusted.ts +7 -2
  47. package/types/cli/args.d.ts.map +1 -1
  48. package/types/cli/comb-config.d.ts +5 -2
  49. package/types/cli/comb-config.d.ts.map +1 -1
  50. package/types/cli/file-path.d.ts +11 -0
  51. package/types/cli/file-path.d.ts.map +1 -0
  52. package/types/cli/migrate-apply.d.ts +1 -0
  53. package/types/cli/migrate-apply.d.ts.map +1 -1
  54. package/types/cli/migrate-d1.d.ts.map +1 -1
  55. package/types/cli/migrate-json.d.ts +4 -0
  56. package/types/cli/migrate-json.d.ts.map +1 -0
  57. package/types/cli/migrate.d.ts.map +1 -1
  58. package/types/migrate/core/apply.d.ts +3 -2
  59. package/types/migrate/core/apply.d.ts.map +1 -1
  60. package/types/migrate/core/atlas-apply-runs.d.ts +6 -0
  61. package/types/migrate/core/atlas-apply-runs.d.ts.map +1 -1
  62. package/types/migrate/core/cleanup.d.ts +16 -4
  63. package/types/migrate/core/cleanup.d.ts.map +1 -1
  64. package/types/migrate/core/d1-history.d.ts.map +1 -1
  65. package/types/migrate/core/d1-wrangler-error.d.ts +11 -0
  66. package/types/migrate/core/d1-wrangler-error.d.ts.map +1 -1
  67. package/types/migrate/core/pg-replay-commit.d.ts +14 -9
  68. package/types/migrate/core/pg-replay-commit.d.ts.map +1 -1
  69. package/types/migrate/core/pg-replay-drops.d.ts +7 -12
  70. package/types/migrate/core/pg-replay-drops.d.ts.map +1 -1
  71. package/types/migrate/core/pg-replay-hidden.d.ts +36 -0
  72. package/types/migrate/core/pg-replay-hidden.d.ts.map +1 -0
  73. package/types/migrate/core/pg-replay-roles.d.ts +2 -4
  74. package/types/migrate/core/pg-replay-roles.d.ts.map +1 -1
  75. package/types/migrate/core/pg-replay.d.ts.map +1 -1
  76. package/types/migrate/core/pg-server-snapshot.d.ts +4 -11
  77. package/types/migrate/core/pg-server-snapshot.d.ts.map +1 -1
  78. package/types/migrate/core/proof-readers.d.ts +19 -0
  79. package/types/migrate/core/proof-readers.d.ts.map +1 -0
  80. package/types/migrate/core/proof-run.d.ts.map +1 -1
  81. package/types/migrate/core/proof-scope.d.ts +15 -7
  82. package/types/migrate/core/proof-scope.d.ts.map +1 -1
  83. package/types/migrate/core/sql-code.d.ts +7 -3
  84. package/types/migrate/core/sql-code.d.ts.map +1 -1
  85. package/types/migrate/core/sql-scan.d.ts.map +1 -1
  86. package/types/migrate/core/sqlite-keywords.d.ts +11 -0
  87. package/types/migrate/core/sqlite-keywords.d.ts.map +1 -0
  88. package/types/migrate/core/stopped.d.ts +23 -0
  89. package/types/migrate/core/stopped.d.ts.map +1 -0
  90. package/types/query/cursor-mint.d.ts.map +1 -1
  91. package/types/query/cursor-refusals.d.ts +17 -1
  92. package/types/query/cursor-refusals.d.ts.map +1 -1
  93. package/types/query/descriptions.d.ts +1 -1
  94. package/types/query/descriptions.d.ts.map +1 -1
  95. package/types/query/filter-parse.d.ts +15 -4
  96. package/types/query/filter-parse.d.ts.map +1 -1
  97. package/types/query/filter-validate.d.ts +1 -1
  98. package/types/query/filter-validate.d.ts.map +1 -1
  99. package/types/query/filter.d.ts +9 -1
  100. package/types/query/filter.d.ts.map +1 -1
  101. package/types/query/list-extras.d.ts.map +1 -1
  102. package/types/query/list-schema.d.ts.map +1 -1
  103. package/types/query/merged.d.ts.map +1 -1
  104. package/types/query/pagination.d.ts +13 -1
  105. package/types/query/pagination.d.ts.map +1 -1
  106. package/types/query/rounded-key.d.ts +2 -11
  107. package/types/query/rounded-key.d.ts.map +1 -1
  108. package/types/query/schema-params.d.ts.map +1 -1
  109. package/types/query/select-validate.d.ts.map +1 -1
  110. package/types/query/sqlite/cursor-fit.d.ts.map +1 -1
  111. package/types/query/trusted.d.ts +1 -1
  112. package/types/query/trusted.d.ts.map +1 -1
@@ -2,11 +2,13 @@
2
2
  * The replay's transactions and the reads around them (pg-replay.ts): a file's or comb's own
3
3
  * statement's transaction, refused before its COMMIT when this backend's counts show it wrote past
4
4
  * its database, and the server's shared catalogs read as committed around it and around
5
- * every bare statement, a change there the file's when it is to an object the file names;
5
+ * every bare statement, a change there the file's when it is to the replay's own database, or to an
6
+ * object the file names beside a statement that can run code comb cannot read;
6
7
  * a `txmode none` file's statement in a transaction of its own first, bare only when
7
8
  * Postgres runs it outside a block alone.
8
9
  */
9
10
  import { type Run } from "./pg-replay-roles.ts";
11
+ import { type Hidden } from "./pg-replay-hidden.ts";
10
12
  import { type Snapshot } from "./pg-server-snapshot.ts";
11
13
  import { type Own } from "./pg-server-writes.ts";
12
14
  /**
@@ -16,23 +18,26 @@ import { type Own } from "./pg-server-writes.ts";
16
18
  */
17
19
  declare function begin(run: Run): Promise<void>;
18
20
  /**
19
- * Where a replayed transaction or bare statement is: its file's name and the names it spells, the
20
- * statement, if bare, and what a refusal stops; told each role the transaction adds that the replay
21
- * adopts
21
+ * Where a replayed transaction or bare statement is: its file's name and the names it spells, what
22
+ * its statements so far can run that comb cannot read (`hidden`), the statement, if bare, and what a
23
+ * refusal stops; told each role the transaction adds that the replay adopts
22
24
  */
23
25
  type At = {
24
26
  adopted?: ((role: string) => void) | undefined;
27
+ hidden: Hidden;
25
28
  name: string;
26
29
  names: ReadonlySet<string>;
27
30
  sent: string | undefined;
28
31
  stops: string;
29
32
  };
30
33
  /**
31
- * The server's shared catalogs read as committed against the last read: a change since to an object
32
- * the file `name` names (`names`), while `sent` or the whole file ran, is refused, and a role or
33
- * database it added is the cleanup's; a change to any other is another session's. The
34
- * replay's own database is the file's whatever it spells, as only this replay runs in it, and is
35
- * the cleanup's too. `read` is that read when the caller took it
34
+ * The server's shared catalogs read as committed against the last read: a change since to the
35
+ * replay's own database, or to what it holds, is the file's, as only this replay runs in it, and the
36
+ * cleanup drops it. A change to an object the file names is the file's when its statements so far
37
+ * can run code comb cannot read (pg-replay-hidden.ts), the one way a change past the database gets by
38
+ * the counts, and is refused, but no cleanup drops it: Postgres keeps no creator for a role or a
39
+ * database, and another session may have made it. A change to any other object, or beside statements
40
+ * that run only what their parse says, is another session's. `read` is that read when the caller took it
36
41
  */
37
42
  declare function window(run: Run, at: At, read?: Snapshot): Promise<void>;
38
43
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"pg-replay-commit.d.ts","sourceRoot":"","sources":["../../../src/migrate/core/pg-replay-commit.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAoB,KAAK,GAAG,EAAE,MAAM,sBAAsB,CAAA;AACjE,OAAO,EAAS,KAAK,QAAQ,EAA8C,MAAM,yBAAyB,CAAA;AAC1G,OAAO,EAIN,KAAK,GAAG,EAIR,MAAM,uBAAuB,CAAA;AAG9B;;;;GAIG;AACH,iBAAe,KAAK,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAI5C;AAED;;;;GAIG;AACH,KAAK,EAAE,GAAG;IACT,OAAO,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,CAAA;IAC9C,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;IAC1B,IAAI,EAAE,MAAM,GAAG,SAAS,CAAA;IACxB,KAAK,EAAE,MAAM,CAAA;CACb,CAAA;AAKD;;;;;;GAMG;AACH,iBAAe,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAEtE;AAsDD;;;;;;GAMG;AACH,iBAAS,KAAK,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,GA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AE,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAGtE;AA4CD;;;;;;GAMG;AACH,iBAAS,KAAK,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,GAAG,CAQxD;AAYD;;;;GAIG;AACH,iBAAe,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CA4BrD;AAKD;;;;;;GAMG;AACH,iBAAe,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAWjF;AAED,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAA"}
@@ -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
- /** What a drop that failed left on devUrl's server, a database, role or slot by name, and whether a later sweep takes it */
8
- type Left = {
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: Left, drop: () => Promise<unknown>): Promise<void>;
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 slots a refused window added, which a drop waits on,
56
- * the database's subscriptions and slots, which keep it from its drop, the database made no
57
- * template and dropped, forcing out a backend that came in since, each role it made, and that
58
- * window's roles and idle databases, which no sweep takes
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,4HAA4H;AAC5H,KAAK,IAAI,GAAG;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAA;AAE5C,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ot 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, Strays } from "./pg-server-snapshot.ts";
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`), and the roles, databases and replication slots a refused window
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>;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B,EACC,KAAK,EACL,IAAI,EACJ,KAAK,EACL,GAAG,MAAM,EACT,EAAE,IAAI,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG;IAC5B,KAAK,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,CAAA;IACjD,OAAO,CAAC,EAAE,MAAM,CAAC,SAAS,CAAC,GAAG,SAAS,CAAA;IACvC,IAAI,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAA;IAC5B,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;CAC7B,GACC,OAAO,CAAC,CAAC,CAAC,CAqCZ;AAED;;;;;;GAMG;AACH,iBAAe,aAAa,CAAC,CAAC,EAC7B,MAAM,EAAE,QAAQ,EAChB,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,aAAa,CAAC,CAAC,CAAC,EACvD,IAAI,GAAE,MAAM,OAAO,CAAC,OAAO,CAA+B,GACxD,OAAO,CAAC;IAAE,OAAO,EAAE,WAAW,CAAC;IAAC,SAAS,EAAE,CAAC,CAAA;CAAE,CAAC,CAWjD;AAED,OAAO,EAAE,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, and a change is a file's only
6
- * when one is a name the file spells (namesIn in sql-code.ts). A replay's own rows are left out, but
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 { added, prepareSnapshot, type Snapshot, snapshot, snapshotChanges, type Strays, subscriptionsIn };
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;;;;;;;;;GASG;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,CA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,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":"AAiBA,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;AAMpH,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;AAwKD;;;;;;;;GAQG;AACH,iBAAe,YAAY,CAC1B,IAAI,EAAE,UAAU,EAChB,KAAK,EAAE,aAAa,CAAC;IAAE,IAAI,EAAE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O,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, compared folded, never as a substring)
7
- * and, for a virtual table, each string and quoted name among its module's arguments, whole. A table's FK parents
8
- * are the other tables it references; a reader is a view, a trigger or a virtual table, and reads what it references.
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). Then to a fixpoint each index and trigger
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, and each string and quoted name among
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;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;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,CAAA;CAAE,GAAG,SAAS,CAMrF;AAED,kFAAkF;AAClF,QAAA,MAAM,SAAS,WAAY,UA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AU,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 bare word and each quoted name unquoted, and each
54
- * word of a string, which SQLite reads as a name where one stands (`FROM 'post'`) and a module as its option's
55
- * (`content='post'`), folded by asciiFold; never a word of a comment
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;AAG1C,wEAAwE;AACxE,QAAA,MAAM,KAAK,EAAE,MAAqG,CAAA;AAClH,uCA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M,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"}
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;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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":"AAOA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAE3C,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,E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AAG,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 { FilterLimits } from "./filter.ts";
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,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE/C,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,QAA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gB,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 null when there is none or any part of it cannot be read: a
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;AAuJD;;;;GAIG;AACH,iBAAS,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,SAAS,GAAG,IAAI,CAKvE;AAED,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,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":"","s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AA"}
@@ -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,mBA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