@prisma/orm-family-sql 8.0.0-rc.1-dev.46 → 8.0.0-rc.10-dev.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 +2 -6
- package/dist/{ast-Lbl4VwqP.mjs → ast-5tg0fGPQ.mjs} +2 -58
- package/dist/ast-5tg0fGPQ.mjs.map +1 -0
- package/dist/{ast-HFcfQZr-.d.mts → ast-DuLukI6f.d.mts} +4 -36
- package/dist/ast-DuLukI6f.d.mts.map +1 -0
- package/dist/{authored-check-naming-Hf9990DV.mjs → authored-check-naming-BEvfamnI.mjs} +2 -2
- package/dist/{authored-check-naming-Hf9990DV.mjs.map → authored-check-naming-BEvfamnI.mjs.map} +1 -1
- package/dist/{authoring-type-constructors-Blqoa2Ua-DqvNCOb2.mjs → authoring-type-constructors-BD-XuavC-CJV-TxFh.mjs} +10 -4
- package/dist/authoring-type-constructors-BD-XuavC-CJV-TxFh.mjs.map +1 -0
- package/dist/builder.d.mts +3 -3
- package/dist/builder__runtime.d.mts +26 -9
- package/dist/builder__runtime.d.mts.map +1 -1
- package/dist/builder__runtime.mjs +18 -9
- package/dist/builder__runtime.mjs.map +1 -1
- package/dist/builder__types.d.mts +3 -3
- package/dist/{codec-descriptor-registry-N0dhtKaH.mjs → codec-descriptor-registry-ECZ4ohtG.mjs} +2 -2
- package/dist/{codec-descriptor-registry-N0dhtKaH.mjs.map → codec-descriptor-registry-ECZ4ohtG.mjs.map} +1 -1
- package/dist/{config-types-gAm54C_v.mjs → config-types-BNJgLUUQ.mjs} +2 -2
- package/dist/{config-types-gAm54C_v.mjs.map → config-types-BNJgLUUQ.mjs.map} +1 -1
- package/dist/{config-types-D9fdKG3g.d.mts → config-types-Bd3ud-mX.d.mts} +3 -3
- package/dist/{config-types-D9fdKG3g.d.mts.map → config-types-Bd3ud-mX.d.mts.map} +1 -1
- package/dist/{contract-builder-D4a5dT7j.mjs → contract-builder-BOmEsrRi.mjs} +24 -5
- package/dist/contract-builder-BOmEsrRi.mjs.map +1 -0
- package/dist/{contract-builder-CG_tGDbB.d.mts → contract-builder-De_sioHE.d.mts} +15 -3
- package/dist/contract-builder-De_sioHE.d.mts.map +1 -0
- package/dist/contract-emitter.mjs +1 -1
- package/dist/contract-psl.d.mts +1 -1
- package/dist/contract-psl.mjs +1 -1
- package/dist/contract-psl__attribute-specs.d.mts +77 -0
- package/dist/contract-psl__attribute-specs.d.mts.map +1 -0
- package/dist/contract-psl__attribute-specs.mjs +2 -0
- package/dist/contract-psl__provider.d.mts +1 -1
- package/dist/contract-psl__provider.mjs +3 -3
- package/dist/contract-psl__provider.mjs.map +1 -1
- package/dist/contract-ts.d.mts +3 -3
- package/dist/contract-ts.mjs +3 -3
- package/dist/contract-ts__config-types.d.mts +1 -1
- package/dist/contract-ts__config-types.mjs +1 -1
- package/dist/contract-ts__contract-builder.d.mts +2 -2
- package/dist/contract-ts__contract-builder.mjs +2 -2
- package/dist/contract.d.mts +3 -3
- package/dist/contract.mjs +6 -6
- package/dist/contract__authored-check-naming.mjs +1 -1
- package/dist/contract__foreign-key-materialization.mjs +1 -1
- package/dist/contract__index-naming.mjs +1 -1
- package/dist/contract__types.d.mts +2 -2
- package/dist/contract__types.mjs +2 -2
- package/dist/contract__validators.d.mts +2 -2
- package/dist/contract__validators.mjs +2 -2
- package/dist/{control-D3cB5YQp.mjs → control-BIIMOKMy.mjs} +11 -9
- package/dist/control-BIIMOKMy.mjs.map +1 -0
- package/dist/{control-adapter-C99J7aEF-B7eQd7vD.d.mts → control-adapter-C99J7aEF-GODO43Ai.d.mts} +5 -5
- package/dist/{control-adapter-C99J7aEF-B7eQd7vD.d.mts.map → control-adapter-C99J7aEF-GODO43Ai.d.mts.map} +1 -1
- package/dist/control-adapter-DzTFiMaG.d.mts +1 -0
- package/dist/{control-DTLJ1WtZ.d.mts → control-b-6t8eI_.d.mts} +138 -19
- package/dist/control-b-6t8eI_.d.mts.map +1 -0
- package/dist/{db-D18PrXKW-DvTv4JFn.d.mts → db-BhQdL6Za-DubRGJvv.d.mts} +86 -62
- package/dist/{db-D18PrXKW-DvTv4JFn.d.mts.map → db-BhQdL6Za-DubRGJvv.d.mts.map} +1 -1
- package/dist/{ddl-types-CXx4vPz6-BsgrnSUY.d.mts → ddl-types-CXx4vPz6-Dko-GTTj.d.mts} +3 -3
- package/dist/{ddl-types-CXx4vPz6-BsgrnSUY.d.mts.map → ddl-types-CXx4vPz6-Dko-GTTj.d.mts.map} +1 -1
- package/dist/{derived-checks-DFMRmiAu-DGfB8aS4.mjs → derived-checks-DGjY5t7S-B3txNm7X.mjs} +48 -15
- package/dist/derived-checks-DGjY5t7S-B3txNm7X.mjs.map +1 -0
- package/dist/{derived-checks-DPdD01O0-DGqOFjs6.d.mts → derived-checks-DPdD01O0-DNBs1ZDA.d.mts} +2 -2
- package/dist/{derived-checks-DPdD01O0-DGqOFjs6.d.mts.map → derived-checks-DPdD01O0-DNBs1ZDA.d.mts.map} +1 -1
- package/dist/{diff-DbTNVm2f.d.mts → diff-CN1ou7vM.d.mts} +5 -5
- package/dist/{diff-DbTNVm2f.d.mts.map → diff-CN1ou7vM.d.mts.map} +1 -1
- package/dist/{dist-ZK6oeI5e.mjs → dist-D5__KJs-.mjs} +2 -1
- package/dist/dist-D5__KJs-.mjs.map +1 -0
- package/dist/{expression-CX5mTA-z.mjs → expression-B2Ox7zKM.mjs} +6 -2
- package/dist/expression-B2Ox7zKM.mjs.map +1 -0
- package/dist/{expression-FJK6Ar-d.d.mts → expression-mku9I7Ue.d.mts} +16 -7
- package/dist/{expression-FJK6Ar-d.d.mts.map → expression-mku9I7Ue.d.mts.map} +1 -1
- package/dist/family.d.mts +10 -10
- package/dist/family.mjs +8 -8
- package/dist/family__control-adapter.d.mts +2 -2
- package/dist/family__control.d.mts +4 -4
- package/dist/family__control.mjs +4 -4
- package/dist/family__diff.d.mts +2 -2
- package/dist/family__diff.mjs +1 -1
- package/dist/family__ir.d.mts +1 -1
- package/dist/family__ir.mjs +1 -1
- package/dist/family__migration.d.mts +1 -1
- package/dist/family__pack.d.mts +72 -0
- package/dist/family__pack.d.mts.map +1 -1
- package/dist/family__pack.mjs +4 -2
- package/dist/family__pack.mjs.map +1 -1
- package/dist/family__psl-infer.mjs +1 -1
- package/dist/family__runtime.d.mts +1 -1
- package/dist/family__runtime.mjs +1 -1
- package/dist/family__verify.mjs +1 -1
- package/dist/{foreign-key-materialization-Cu7-7LHl.mjs → foreign-key-materialization-0TrwfShD.mjs} +2 -2
- package/dist/{foreign-key-materialization-Cu7-7LHl.mjs.map → foreign-key-materialization-0TrwfShD.mjs.map} +1 -1
- package/dist/{index-C5I8D-MB.d.mts → index-CLAshwKN.d.mts} +2 -2
- package/dist/{index-C5I8D-MB.d.mts.map → index-CLAshwKN.d.mts.map} +1 -1
- package/dist/{index-C-vQOMY_.d.mts → index-DzBzeTAy.d.mts} +10 -10
- package/dist/{index-C-vQOMY_.d.mts.map → index-DzBzeTAy.d.mts.map} +1 -1
- package/dist/{index-naming-DREt6js7-CRH27yUv.mjs → index-naming-fQMLqyC4-4FzPVtCR.mjs} +4 -4
- package/dist/index-naming-fQMLqyC4-4FzPVtCR.mjs.map +1 -0
- package/dist/{interpreter-DyiUUAWh-DYdjIpiE.mjs → interpreter-CZ_iVQV4-CJ6COgSE.mjs} +123 -302
- package/dist/interpreter-CZ_iVQV4-CJ6COgSE.mjs.map +1 -0
- package/dist/ir-I-xciGUH.mjs.map +1 -1
- package/dist/{ir-Bghjt-FG.d.mts → ir-R9GE8gsm.d.mts} +2 -2
- package/dist/{ir-Bghjt-FG.d.mts.map → ir-R9GE8gsm.d.mts.map} +1 -1
- package/dist/{middleware-AhTz1BOW-th-Suxuf.d.mts → middleware-AhTz1BOW-CtQWS4mb.d.mts} +2 -2
- package/dist/{middleware-AhTz1BOW-th-Suxuf.d.mts.map → middleware-AhTz1BOW-CtQWS4mb.d.mts.map} +1 -1
- package/dist/middleware-Cev-ZFyS.d.mts +1 -0
- package/dist/{migration-CjDRZNep.d.mts → migration-Bhce5i_m.d.mts} +3 -3
- package/dist/{migration-CjDRZNep.d.mts.map → migration-Bhce5i_m.d.mts.map} +1 -1
- package/dist/operations.d.mts +1 -1
- package/dist/orm-client.d.mts +131 -95
- package/dist/orm-client.d.mts.map +1 -1
- package/dist/orm-client.mjs +1021 -942
- package/dist/orm-client.mjs.map +1 -1
- package/dist/plan-C7VP7jOh.d.mts +2 -0
- package/dist/{plan-CDxduYaN-pLIyyJaB.d.mts → plan-CDxduYaN-B2kMLIQQ.d.mts} +3 -3
- package/dist/{plan-CDxduYaN-pLIyyJaB.d.mts.map → plan-CDxduYaN-B2kMLIQQ.d.mts.map} +1 -1
- package/dist/{prepared-statement-9QpkE6JG-C430V3MO.d.mts → prepared-statement-9QpkE6JG-B9xqBu5T.d.mts} +16 -16
- package/dist/{prepared-statement-9QpkE6JG-C430V3MO.d.mts.map → prepared-statement-9QpkE6JG-B9xqBu5T.d.mts.map} +1 -1
- package/dist/{psl-infer-Dk5kgKre.mjs → psl-infer-TBwKfKgU.mjs} +2 -2
- package/dist/{psl-infer-Dk5kgKre.mjs.map → psl-infer-TBwKfKgU.mjs.map} +1 -1
- package/dist/query-lane-context-CGdMIEuv.d.mts +1 -0
- package/dist/{query-lane-context-Qa-eddrE-kuZ8Z86-.d.mts → query-lane-context-Qa-eddrE-BQV6J9nV.d.mts} +4 -4
- package/dist/{query-lane-context-Qa-eddrE-kuZ8Z86-.d.mts.map → query-lane-context-Qa-eddrE-BQV6J9nV.d.mts.map} +1 -1
- package/dist/relational-core.d.mts +12 -12
- package/dist/relational-core.mjs +3 -3
- package/dist/relational-core__aggregate-descriptor-registry.d.mts +1 -1
- package/dist/relational-core__ast.d.mts +4 -4
- package/dist/relational-core__ast.mjs +2 -2
- package/dist/relational-core__codec-descriptor-registry.d.mts +3 -3
- package/dist/relational-core__codec-descriptor-registry.mjs +1 -1
- package/dist/relational-core__contract-free.d.mts +3 -3
- package/dist/relational-core__expression.d.mts +1 -1
- package/dist/relational-core__expression.mjs +1 -1
- package/dist/relational-core__middleware.d.mts +2 -2
- package/dist/relational-core__plan.d.mts +3 -3
- package/dist/relational-core__query-lane-context.d.mts +2 -2
- package/dist/relational-core__types.d.mts +2 -2
- package/dist/{runtime-DpKF2Yu2.d.mts → runtime-CzCx0TKe.d.mts} +3 -3
- package/dist/{runtime-DpKF2Yu2.d.mts.map → runtime-CzCx0TKe.d.mts.map} +1 -1
- package/dist/{runtime-tIHpGCcG.mjs → runtime-PknWErjr.mjs} +2 -2
- package/dist/{runtime-tIHpGCcG.mjs.map → runtime-PknWErjr.mjs.map} +1 -1
- package/dist/runtime.d.mts +4 -4
- package/dist/runtime.mjs +2 -2
- package/dist/runtime__internal__prepared-query.d.mts +1 -1
- package/dist/{schema-differ-DpG_gnur-DFAtGezx.d.mts → schema-differ-DpG_gnur-BICVtTHY.d.mts} +2 -2
- package/dist/{schema-differ-DpG_gnur-DFAtGezx.d.mts.map → schema-differ-DpG_gnur-BICVtTHY.d.mts.map} +1 -1
- package/dist/schema-ir.mjs +1 -1
- package/dist/schema-ir__types.mjs +1 -1
- package/dist/{schema-verify-C_PEdlAr-Dxxjm6EM.mjs → schema-verify-C_PEdlAr-CmXrFuW1.mjs} +2 -2
- package/dist/{schema-verify-C_PEdlAr-Dxxjm6EM.mjs.map → schema-verify-C_PEdlAr-CmXrFuW1.mjs.map} +1 -1
- package/dist/sql-attribute-specs-CG0yitvD-CG-0eW98.mjs +275 -0
- package/dist/sql-attribute-specs-CG0yitvD-CG-0eW98.mjs.map +1 -0
- package/dist/{sql-contract-serializer-2oBWuxTe-DKZTf2n8.mjs → sql-contract-serializer-Bxu4a5oQ-D0lKpb4a.mjs} +24 -5
- package/dist/sql-contract-serializer-Bxu4a5oQ-D0lKpb4a.mjs.map +1 -0
- package/dist/{sql-execution-plan--jKyLpe5-CMGhgO0M.d.mts → sql-execution-plan--jKyLpe5-Bcz9QM2s.d.mts} +2 -2
- package/dist/{sql-execution-plan--jKyLpe5-CMGhgO0M.d.mts.map → sql-execution-plan--jKyLpe5-Bcz9QM2s.d.mts.map} +1 -1
- package/dist/{timestamp-now-generator-DRXygu32-DN9Qb1uI.mjs → timestamp-now-generator-BZnBo7IC-DbN5Apqe.mjs} +27 -19
- package/dist/timestamp-now-generator-BZnBo7IC-DbN5Apqe.mjs.map +1 -0
- package/dist/{types-4YenawkP-CwaaZSid.mjs → types-BvupgHcG-c8QDupnu.mjs} +13 -6
- package/dist/types-BvupgHcG-c8QDupnu.mjs.map +1 -0
- package/dist/{types-UcHa2cTe.d.mts → types-C36_3E6_.d.mts} +3 -2
- package/dist/types-C36_3E6_.d.mts.map +1 -0
- package/dist/{types-CyxGtOOh-BggSa6Fe.d.mts → types-CyxGtOOh-BJnoWm0f.d.mts} +8 -8
- package/dist/{types-CyxGtOOh-BggSa6Fe.d.mts.map → types-CyxGtOOh-BJnoWm0f.d.mts.map} +1 -1
- package/dist/{types-CUsJrvEl.mjs → types-D0B65hip.mjs} +3 -2
- package/dist/types-D0B65hip.mjs.map +1 -0
- package/dist/types-DvsoMNLs.d.mts +1 -0
- package/dist/{types-IqZMLrFC-DcH8v_u3.d.mts → types-IqZMLrFC-BIRftuU7.d.mts} +4 -4
- package/dist/{types-IqZMLrFC-DcH8v_u3.d.mts.map → types-IqZMLrFC-BIRftuU7.d.mts.map} +1 -1
- package/dist/{types-v3qxLLxo-DCeKv7yY.d.mts → types-v3qxLLxo-Clw_yBAh.d.mts} +2 -2
- package/dist/{types-v3qxLLxo-DCeKv7yY.d.mts.map → types-v3qxLLxo-Clw_yBAh.d.mts.map} +1 -1
- package/dist/{validators-Belo8QqM.d.mts → validators-CbqMxQfW.d.mts} +23 -4
- package/dist/validators-CbqMxQfW.d.mts.map +1 -0
- package/dist/{validators-CrWD6bSP.mjs → validators-DD98VrpC.mjs} +0 -0
- package/dist/validators-DD98VrpC.mjs.map +1 -0
- package/dist/{verify-u0UTdZgD-DSAaz9rW.mjs → verify-ChiDeTk8-HEewdjrM.mjs} +3 -3
- package/dist/verify-ChiDeTk8-HEewdjrM.mjs.map +1 -0
- package/package.json +20 -21
- package/dist/ast-HFcfQZr-.d.mts.map +0 -1
- package/dist/ast-Lbl4VwqP.mjs.map +0 -1
- package/dist/authoring-type-constructors-Blqoa2Ua-DqvNCOb2.mjs.map +0 -1
- package/dist/contract-builder-CG_tGDbB.d.mts.map +0 -1
- package/dist/contract-builder-D4a5dT7j.mjs.map +0 -1
- package/dist/control-D3cB5YQp.mjs.map +0 -1
- package/dist/control-DTLJ1WtZ.d.mts.map +0 -1
- package/dist/control-adapter-MZJQiwcE.d.mts +0 -1
- package/dist/derived-checks-DFMRmiAu-DGfB8aS4.mjs.map +0 -1
- package/dist/dist-ZK6oeI5e.mjs.map +0 -1
- package/dist/expression-CX5mTA-z.mjs.map +0 -1
- package/dist/index-naming-DREt6js7-CRH27yUv.mjs.map +0 -1
- package/dist/interpreter-DyiUUAWh-DYdjIpiE.mjs.map +0 -1
- package/dist/lane-query-builder.d.mts +0 -236
- package/dist/lane-query-builder.d.mts.map +0 -1
- package/dist/lane-query-builder.mjs +0 -67
- package/dist/lane-query-builder.mjs.map +0 -1
- package/dist/middleware--TtoxUiW.d.mts +0 -1
- package/dist/plan-BHLdb0Z7.d.mts +0 -2
- package/dist/query-lane-context-XMvk7fmY.d.mts +0 -1
- package/dist/sql-contract-serializer-2oBWuxTe-DKZTf2n8.mjs.map +0 -1
- package/dist/timestamp-now-generator-DRXygu32-DN9Qb1uI.mjs.map +0 -1
- package/dist/types-4YenawkP-CwaaZSid.mjs.map +0 -1
- package/dist/types-B0msOnBM.d.mts +0 -1
- package/dist/types-CUsJrvEl.mjs.map +0 -1
- package/dist/types-UcHa2cTe.d.mts.map +0 -1
- package/dist/validators-Belo8QqM.d.mts.map +0 -1
- package/dist/validators-CrWD6bSP.mjs.map +0 -1
- package/dist/verify-u0UTdZgD-DSAaz9rW.mjs.map +0 -1
|
@@ -1,236 +0,0 @@
|
|
|
1
|
-
import { r as StorageTable } from "./storage-table-DSeWszOL-CI-cItEK.mjs";
|
|
2
|
-
import { c as SqlStorage } from "./sql-storage-8LqxeLAY-DH4DdUXx.mjs";
|
|
3
|
-
import { h as ExtractStorageColumnTypes } from "./types-BDUG29Df-LE85dIXP.mjs";
|
|
4
|
-
import { n as StorageColumnTypeAcrossNamespaces } from "./types-UcHa2cTe.mjs";
|
|
5
|
-
import { Brand, Contract, StorageHashBase } from "@prisma/orm-framework/contract/types";
|
|
6
|
-
import "@standard-schema/spec";
|
|
7
|
-
//#region ../../../2-sql/4-lanes/query-builder/dist/index.d.mts
|
|
8
|
-
//#region src/type-errors.d.ts
|
|
9
|
-
/**
|
|
10
|
-
* An error message type, prefixed with `[error]`.
|
|
11
|
-
*
|
|
12
|
-
* @template TMessage The error message.
|
|
13
|
-
*/
|
|
14
|
-
type ErrorMessage = `[error] ${string}`;
|
|
15
|
-
/**
|
|
16
|
-
* An error type indicating that the previous function call had bad input.
|
|
17
|
-
* To be used as a return type.
|
|
18
|
-
*
|
|
19
|
-
* @template TMessage The error message.
|
|
20
|
-
*/
|
|
21
|
-
type PreviousFunctionReceivedBadInputError<TMessage extends ErrorMessage> = Brand<TMessage>;
|
|
22
|
-
//#endregion
|
|
23
|
-
//#region src/column-reference.d.ts
|
|
24
|
-
/**
|
|
25
|
-
* An object representing a reference to a column in a table in the database.
|
|
26
|
-
*
|
|
27
|
-
* @template TColumnName The name of the column.
|
|
28
|
-
* @template TTableName The name of the table this column belongs to.
|
|
29
|
-
* @template THash The contract storage hash belonging to the database this column is in.
|
|
30
|
-
*/
|
|
31
|
-
type ColumnReference<TColumnName extends string = string, TTableName extends string = string, THash extends StorageHashBase<string> = StorageHashBase<string>> = {
|
|
32
|
-
readonly '~name': TColumnName;
|
|
33
|
-
readonly '~table': TTableName;
|
|
34
|
-
} & Brand<'[info] this column reference belongs to the following table reference:', `${TTableName}@${THash}`>;
|
|
35
|
-
/**
|
|
36
|
-
* An error type indicating that the provided column reference is out of the contract's scope.
|
|
37
|
-
* To be used in reference creators, e.g. `createRef()`.
|
|
38
|
-
*
|
|
39
|
-
* @template TMessage The error message.
|
|
40
|
-
*/
|
|
41
|
-
type ColumnReferenceOutOfContractError<TMessage extends ErrorMessage> = Brand<TMessage>;
|
|
42
|
-
/**
|
|
43
|
-
* A type representing a reference to all columns in the current query context.
|
|
44
|
-
*/
|
|
45
|
-
type Asterisk = {
|
|
46
|
-
readonly '~name': '*';
|
|
47
|
-
readonly '~table': null;
|
|
48
|
-
} & Brand<'[info] referencing all columns in the current query context'>;
|
|
49
|
-
/**
|
|
50
|
-
* A type representing a reference to all columns in a specific table.
|
|
51
|
-
*
|
|
52
|
-
* @template TTableName The name of the table whose columns are being referenced.
|
|
53
|
-
* @template THash The contract storage hash belonging to the database this column is in.
|
|
54
|
-
*/
|
|
55
|
-
type TableAsterisk<TTableName extends string = string, THash extends StorageHashBase<string> = StorageHashBase<string>> = {
|
|
56
|
-
readonly '~name': '*';
|
|
57
|
-
readonly '~table': TTableName;
|
|
58
|
-
} & Brand<'[info] referencing all columns that belong to the following table reference:', `${TTableName}@${THash}`>;
|
|
59
|
-
//#endregion
|
|
60
|
-
//#region ../sql-builder/dist/db-D18PrXKW.d.mts
|
|
61
|
-
//#endregion
|
|
62
|
-
//#region src/types/db.d.ts
|
|
63
|
-
type CapabilitiesBase = Record<string, Record<string, boolean>>;
|
|
64
|
-
type NamespaceEntries = Readonly<Record<string, Readonly<Record<string, unknown>>>>;
|
|
65
|
-
type NamespaceDomain = Readonly<Record<string, {
|
|
66
|
-
readonly models: Readonly<Record<string, unknown>>;
|
|
67
|
-
}>>;
|
|
68
|
-
type TableProxyContract = {
|
|
69
|
-
readonly domain: {
|
|
70
|
-
readonly namespaces: NamespaceDomain;
|
|
71
|
-
};
|
|
72
|
-
readonly storage: {
|
|
73
|
-
readonly namespaces: Readonly<Record<string, {
|
|
74
|
-
readonly entries: NamespaceEntries;
|
|
75
|
-
}>>;
|
|
76
|
-
};
|
|
77
|
-
readonly capabilities: CapabilitiesBase;
|
|
78
|
-
};
|
|
79
|
-
type TablesInNamespace<NS extends {
|
|
80
|
-
readonly entries: NamespaceEntries;
|
|
81
|
-
}> = NS['entries']['table'] extends Readonly<Record<string, StorageTable>> ? NS['entries']['table'] : Readonly<Record<string, StorageTable>>;
|
|
82
|
-
type UnboundTables$1<C extends TableProxyContract> = { readonly [Name in TableNamesAcrossNamespaces<C>]: TableInAnyNamespace<C, Name>; };
|
|
83
|
-
type TableNamesAcrossNamespaces<C extends TableProxyContract> = { [NSId in keyof C['storage']['namespaces']]: keyof TablesInNamespace<C['storage']['namespaces'][NSId]> & string; }[keyof C['storage']['namespaces']];
|
|
84
|
-
type TableInAnyNamespace<C extends TableProxyContract, Name extends string> = { [NSId in keyof C['storage']['namespaces']]: Name extends keyof TablesInNamespace<C['storage']['namespaces'][NSId]> ? TablesInNamespace<C['storage']['namespaces'][NSId]>[Name] : never; }[keyof C['storage']['namespaces']];
|
|
85
|
-
//#endregion
|
|
86
|
-
//#region src/type-atoms.d.ts
|
|
87
|
-
/**
|
|
88
|
-
* A utility type to drain outer generics from a type. A compiler micro-optimization.
|
|
89
|
-
*
|
|
90
|
-
* @template TThing The type to drain.
|
|
91
|
-
*/
|
|
92
|
-
type DrainOuterGeneric<TThing> = [TThing] extends [unknown] ? TThing : never;
|
|
93
|
-
/**
|
|
94
|
-
* A utility type to ensure that exactly one property of an object type is present.
|
|
95
|
-
*
|
|
96
|
-
* @template TObject The object type to check.
|
|
97
|
-
*/
|
|
98
|
-
type ExactlyOneProperty<TObject extends object> = { [K in keyof TObject]-?: IsNever<Exclude<keyof TObject, K>>; }[keyof TObject];
|
|
99
|
-
/**
|
|
100
|
-
* A utility type to merge two objects.
|
|
101
|
-
*
|
|
102
|
-
* @template TObject0 The first object.
|
|
103
|
-
* @template TObject1 The second object.
|
|
104
|
-
*/
|
|
105
|
-
type MergeObjects<TObject0 extends object, TObject1 extends object> = DrainOuterGeneric<IsNever<TObject0> extends true ? TObject1 : { readonly [K in keyof TObject0 | keyof TObject1]: K extends keyof TObject1 ? TObject1[K] : K extends keyof TObject0 ? TObject0[K] : never; }>;
|
|
106
|
-
/**
|
|
107
|
-
* A utility type to determine if a type is `never`.
|
|
108
|
-
*
|
|
109
|
-
* @template TThing The type to check.
|
|
110
|
-
*/
|
|
111
|
-
type IsNever<TThing> = [TThing] extends [never] ? true : false;
|
|
112
|
-
/**
|
|
113
|
-
* A utility type to simplify an object type for better readability.
|
|
114
|
-
*
|
|
115
|
-
* @template TObject The object type to simplify.
|
|
116
|
-
*/
|
|
117
|
-
type Simplify<TObject extends object> = DrainOuterGeneric<{ [K in keyof TObject]: TObject[K]; } & {}>;
|
|
118
|
-
//#endregion
|
|
119
|
-
//#region src/selection.d.ts
|
|
120
|
-
type UnboundTables<TContract extends Contract<SqlStorage>> = UnboundTables$1<TContract & TableProxyContract>;
|
|
121
|
-
type ExtractOutputType<TContract extends Contract<SqlStorage>, TTableName extends keyof UnboundTables<TContract> & string, TColumnName extends keyof UnboundTables<TContract>[TTableName]['columns'] & string> = StorageColumnTypeAcrossNamespaces<ExtractStorageColumnTypes<TContract>, TTableName, TColumnName>;
|
|
122
|
-
/**
|
|
123
|
-
* A type representing a selection of columns in a SQL `select` query in the
|
|
124
|
-
* most generic form.
|
|
125
|
-
*/
|
|
126
|
-
type Selection = Record<string, SelectionValue<unknown, unknown>>;
|
|
127
|
-
/**
|
|
128
|
-
* A type representing the value of a selected column in a SQL `select` query.
|
|
129
|
-
*
|
|
130
|
-
* @template TOutput The output type of the selected column.
|
|
131
|
-
* @template TDatatype The database-side datatype of the selected column.
|
|
132
|
-
*/
|
|
133
|
-
interface SelectionValue<TOutput, TDatatype extends string | unknown = unknown> {
|
|
134
|
-
readonly '~datatype': TDatatype;
|
|
135
|
-
readonly '~output': TOutput;
|
|
136
|
-
}
|
|
137
|
-
/**
|
|
138
|
-
* A utility type to convert a table's columns into a {@link Selection}.
|
|
139
|
-
*
|
|
140
|
-
* @template TContract The contract that describes the database.
|
|
141
|
-
* @template TTableName The name of the table whose columns will be included in the selection.
|
|
142
|
-
*/
|
|
143
|
-
type TableToSelection<TContract extends Contract<SqlStorage>, TTableName extends keyof UnboundTables<TContract> & string> = DrainOuterGeneric<{ readonly [ColumnName in keyof UnboundTables<TContract>[TTableName]['columns'] & string]: SelectionValue<ExtractOutputType<TContract, TTableName, ColumnName>, UnboundTables<TContract>[TTableName]['columns'][ColumnName]['nativeType']>; }>;
|
|
144
|
-
//#endregion
|
|
145
|
-
//#region src/table-reference.d.ts
|
|
146
|
-
/**
|
|
147
|
-
* An object representing a reference to a table in the database.
|
|
148
|
-
*
|
|
149
|
-
* @template TName The name of the table. `string` is all tables, a union of string literals is a set of specific tables, a single string literal is a specific table.
|
|
150
|
-
* @template THash The contract storage hash belonging to the database this table is in.
|
|
151
|
-
*/
|
|
152
|
-
type TableReference<TName extends string = string, THash extends StorageHashBase<string> = StorageHashBase<string>> = {
|
|
153
|
-
readonly '~name': TName;
|
|
154
|
-
} & Brand<'[info] this table reference belongs to the contract with the following storage hash:', THash>;
|
|
155
|
-
/**
|
|
156
|
-
* An error type indicating that the provided table reference is out of the contract's scope.
|
|
157
|
-
* To be used in reference creators, e.g. `createRef()`.
|
|
158
|
-
*
|
|
159
|
-
* @template TMessage The error message.
|
|
160
|
-
*/
|
|
161
|
-
type TableReferenceOutOfContractError<TMessage extends ErrorMessage> = Brand<TMessage>;
|
|
162
|
-
/**
|
|
163
|
-
* An error type indicating that the provided table reference is too wide.
|
|
164
|
-
* To be used as a `never` alternative in conditional types.
|
|
165
|
-
*
|
|
166
|
-
* @template TMessage The error message.
|
|
167
|
-
*/
|
|
168
|
-
type TableReferenceTooWideError<TMessage extends ErrorMessage> = Brand<TMessage>;
|
|
169
|
-
//#endregion
|
|
170
|
-
//#region src/ref.d.ts
|
|
171
|
-
/**
|
|
172
|
-
* A fluent API representing references to tables and columns in a SQL contract.
|
|
173
|
-
*
|
|
174
|
-
* @template TContract The contract that describes the database.
|
|
175
|
-
*/
|
|
176
|
-
type Ref<TContract extends Contract<SqlStorage>> = { readonly [TableName in keyof UnboundTables<TContract> & string]: TableReference<TableName, TContract['storage']['storageHash']> & { readonly [ColumnName in Exclude<keyof UnboundTables<TContract>[TableName]['columns'], keyof TableReference> & string]: ColumnReference<ColumnName, TableName, TContract['storage']['storageHash']>; } & {
|
|
177
|
-
readonly ['*']: TableAsterisk<TableName, TContract['storage']['storageHash']>;
|
|
178
|
-
} & Record<PropertyKey, ColumnReferenceOutOfContractError<`[error] reference to a non-existing column in the '${TableName}' table`>>; } & {
|
|
179
|
-
readonly ['*']: Asterisk;
|
|
180
|
-
} & Record<PropertyKey, TableReferenceOutOfContractError<`[error] reference to a non-existing table in the contract`>>;
|
|
181
|
-
/**
|
|
182
|
-
* Creates a reference object for the given SQL contract.
|
|
183
|
-
*
|
|
184
|
-
* @template TContract The contract that describes the database.
|
|
185
|
-
*/
|
|
186
|
-
declare function createRef<TContract extends Contract<SqlStorage>>(_contract: TContract): Ref<TContract>;
|
|
187
|
-
//#endregion
|
|
188
|
-
//#region src/select-builder.d.ts
|
|
189
|
-
/**
|
|
190
|
-
* A builder for SQL `select` queries.
|
|
191
|
-
*
|
|
192
|
-
* @template TContract The contract that describes the database.
|
|
193
|
-
* @template TTables The tables involved in the current `select` query.
|
|
194
|
-
* @template TSelection The current selection of the `select` query.
|
|
195
|
-
*/
|
|
196
|
-
declare class SelectBuilder<TContract extends Contract<SqlStorage>, TTables extends UnboundTables<Contract<SqlStorage>>, TSelection extends Selection = never> {
|
|
197
|
-
#private;
|
|
198
|
-
constructor(contract: TContract);
|
|
199
|
-
select(asterisk: Asterisk): ExactlyOneProperty<TTables> extends true ? SelectBuilder<TContract, TTables, MergeObjects<TSelection, TableToSelection<TContract, keyof TTables & string>>> : PreviousFunctionReceivedBadInputError<'[error] selecting all columns via `*` results in ambiguity when multiple tables are involved in the query'>;
|
|
200
|
-
select<TTableName extends keyof TTables & string>(asterisk: TableAsterisk<TTableName, TContract['storage']['storageHash']>): SelectBuilder<TContract, TTables, MergeObjects<TSelection, TableToSelection<TContract, TTableName>>>;
|
|
201
|
-
select(arg: never): PreviousFunctionReceivedBadInputError<'[error] invalid input in previous `select()` call'>;
|
|
202
|
-
build(): IsNever<TSelection> extends true ? never : Simplify<TSelection>;
|
|
203
|
-
}
|
|
204
|
-
//#endregion
|
|
205
|
-
//#region src/root.d.ts
|
|
206
|
-
/**
|
|
207
|
-
* The root of all builder.
|
|
208
|
-
*
|
|
209
|
-
* @template TContract The contract that describes the database.
|
|
210
|
-
*/
|
|
211
|
-
declare class Root<TContract extends Contract<SqlStorage>> {
|
|
212
|
-
#private;
|
|
213
|
-
constructor(contract: TContract);
|
|
214
|
-
/**
|
|
215
|
-
* SQL's `from` clause, where all `select` queries actually start from.
|
|
216
|
-
*
|
|
217
|
-
* @param table The table to select from.
|
|
218
|
-
*/
|
|
219
|
-
from(table: TableReference<never>): PreviousFunctionReceivedBadInputError<'[error] invalid table reference in previous `root.from()` call will probably cause runtime errors'>;
|
|
220
|
-
/**
|
|
221
|
-
* @template TName The name of the table to select from.
|
|
222
|
-
*/
|
|
223
|
-
from<TName extends string>(table: string extends TName ? TableReferenceTooWideError<'[error] `root.from()` call received a table reference without a specific table name'> : TableReference<TName, TContract['storage']['storageHash']>): TName extends string ? SelectBuilder<TContract, Pick<UnboundTables<TContract>, TName>> : PreviousFunctionReceivedBadInputError<'[error] invalid table reference in previous `root.from()` call will probably cause runtime errors'>;
|
|
224
|
-
from(table: TableReferenceTooWideError<'[error] `root.from()` call received a table reference without a specific table name'>): PreviousFunctionReceivedBadInputError<'[error] invalid table reference in previous `root.from()` call will probably cause runtime errors'>;
|
|
225
|
-
}
|
|
226
|
-
/**
|
|
227
|
-
* Creates a new `Root` instance.
|
|
228
|
-
*/
|
|
229
|
-
declare function createRoot(contract: never): PreviousFunctionReceivedBadInputError<'[error] root creation will likely fail at runtime given the passed contract is not valid or verified'>;
|
|
230
|
-
/**
|
|
231
|
-
* @template TContract The contract that describes the database.
|
|
232
|
-
*/
|
|
233
|
-
declare function createRoot<TContract extends Contract<SqlStorage>>(contract: TContract): Root<TContract>;
|
|
234
|
-
//#endregion
|
|
235
|
-
export { type Asterisk, type ColumnReference, type ColumnReferenceOutOfContractError, type DrainOuterGeneric, type ErrorMessage, type ExactlyOneProperty, type ExtractOutputType, type IsNever, type MergeObjects, type PreviousFunctionReceivedBadInputError, type Ref, type Root, type SelectBuilder, type Selection, type SelectionValue, type Simplify, type TableAsterisk, type TableReference, type TableReferenceOutOfContractError, type TableReferenceTooWideError, type TableToSelection, createRef, createRoot };
|
|
236
|
-
//# sourceMappingURL=lane-query-builder.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lane-query-builder.d.mts","names":[],"sources":["../../../../2-sql/4-lanes/query-builder/dist/index.d.mts"],"mappings":";;;;;;;;;;;;;KASK;;;;;;;KAOA,sCAAsC,iBAAiB,gBAAgB,MAAM;;;;;;;;;;KAU7E,gBAAgB,qCAAqC,oCAAoC,cAAc,0BAA0B;WAC3H,SAAS;WACT,UAAU;IACjB,mFAAmF,cAAc;;;;;;;KAOhG,kCAAkC,iBAAiB,gBAAgB,MAAM;;;;KAIzE;WACM;WACA;IACP;;;;;;;KAOC,cAAc,oCAAoC,cAAc,0BAA0B;WACpF;WACA,UAAU;IACjB,yFAAyF,cAAc;;;;;KAKtG,mBAAmB,eAAe;KAClC,mBAAmB,SAAS,eAAe,SAAS;KACpD,kBAAkB,SAAS;WACrB,QAAQ,SAAS;;KAEvB;WACM;aACE,YAAY;;WAEd;aACE,YAAY,SAAS;eACnB,SAAS;;;WAGb,cAAc;;KAEpB,kBAAkB;WACZ,SAAS;KACf,+BAA+B,SAAS,eAAe,iBAAiB,yBAAyB,SAAS,eAAe;KACzH,gBAAgB,UAAU,kCAAkC,QAAQ,2BAA2B,KAAK,oBAAoB,GAAG;KAC3H,2BAA2B,UAAU,yBAAyB,cAAc,mCAAmC,kBAAkB,2BA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OAAO,aAAa;;;;;;iBAMP,UAAU,kBAAkB,SAAS,aAAa,WAAW,YAAY,IAAI;;;;;;;;;;cAUhF,cAAc,kBAAkB,SAAS,aAAa,gBAAgB,cAAc,SAAS,cAAc,mBAAmB;;EAE1I,YAAY,UAAU;EACtB,OAAO,UAAU,WAAW,mBAAmB,wBAAwB,cAAc,WAAW,SAAS,aAAa,YAAY,iBAAiB,iBAAiB,sBAAsB;EAC1L,OAAO,yBAAyB,kBAAkB,UAAU,cAAc,YAAY,uCAAuC,cAAc,WAAW,SAAS,aAAa,YAAY,iBAAiB,WAAW;EACpN,OAAO,aAAa;EACpB,SAAS,QAAQ,mCAAmC,SAAS;;;;;;;;;cASjD,KAAK,kBAAkB,SAAS;;EAE5C,YAAY,UAAU;;;;;;EAMtB,KAAK,OAAO,wBAAwB;;;;EAIpC,KAAK,sBAAsB,sBAAsB,QAAQ,oHAAoH,eAAe,OAAO,uCAAuC,uBAAuB,cAAc,WAAW,KAAK,cAAc,YAAY,UAAU;EACnU,KAAK,OAAO,oHAAoH;;;;;iBAKjH,WAAW,kBAAkB;;;;iBAI7B,WAAW,kBAAkB,SAAS,aAAa,UAAU,YAAY,KAAK"}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
//#region ../../../2-sql/4-lanes/query-builder/dist/index.mjs
|
|
2
|
-
/**
|
|
3
|
-
* Creates a reference object for the given SQL contract.
|
|
4
|
-
*
|
|
5
|
-
* @template TContract The contract that describes the database.
|
|
6
|
-
*/
|
|
7
|
-
function createRef(_contract) {
|
|
8
|
-
return new Proxy({}, { get(_target, tableName) {
|
|
9
|
-
if (tableName === "*") return Object.freeze({
|
|
10
|
-
"~name": tableName,
|
|
11
|
-
"~table": null
|
|
12
|
-
});
|
|
13
|
-
return new Proxy({}, { get(_target, columnName) {
|
|
14
|
-
if (columnName === "~name") return tableName;
|
|
15
|
-
return Object.freeze({
|
|
16
|
-
"~name": columnName,
|
|
17
|
-
"~table": tableName
|
|
18
|
-
});
|
|
19
|
-
} });
|
|
20
|
-
} });
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* A builder for SQL `select` queries.
|
|
24
|
-
*
|
|
25
|
-
* @template TContract The contract that describes the database.
|
|
26
|
-
* @template TTables The tables involved in the current `select` query.
|
|
27
|
-
* @template TSelection The current selection of the `select` query.
|
|
28
|
-
*/
|
|
29
|
-
var SelectBuilder = class {
|
|
30
|
-
#contract;
|
|
31
|
-
constructor(contract) {
|
|
32
|
-
this.#contract = contract;
|
|
33
|
-
}
|
|
34
|
-
select(..._args) {
|
|
35
|
-
return this;
|
|
36
|
-
}
|
|
37
|
-
build() {
|
|
38
|
-
return {};
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
/**
|
|
42
|
-
* The root of all builder.
|
|
43
|
-
*
|
|
44
|
-
* @template TContract The contract that describes the database.
|
|
45
|
-
*/
|
|
46
|
-
var Root = class {
|
|
47
|
-
#contract;
|
|
48
|
-
constructor(contract) {
|
|
49
|
-
this.#contract = contract;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* @internal
|
|
53
|
-
*/
|
|
54
|
-
from(_table) {
|
|
55
|
-
return new SelectBuilder(this.#contract);
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
/**
|
|
59
|
-
* @internal
|
|
60
|
-
*/
|
|
61
|
-
function createRoot(contract) {
|
|
62
|
-
return new Root(contract);
|
|
63
|
-
}
|
|
64
|
-
//#endregion
|
|
65
|
-
export { createRef, createRoot };
|
|
66
|
-
|
|
67
|
-
//# sourceMappingURL=lane-query-builder.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lane-query-builder.mjs","names":["#contract"],"sources":["../../../../2-sql/4-lanes/query-builder/dist/index.mjs"],"sourcesContent":["//#region src/ref.ts\n/**\n* Creates a reference object for the given SQL contract.\n*\n* @template TContract The contract that describes the database.\n*/\nfunction createRef(_contract) {\n\treturn new Proxy({}, { get(_target, tableName) {\n\t\tif (tableName === \"*\") return Object.freeze({\n\t\t\t\"~name\": tableName,\n\t\t\t\"~table\": null\n\t\t});\n\t\treturn new Proxy({}, { get(_target, columnName) {\n\t\t\tif (columnName === \"~name\") return tableName;\n\t\t\treturn Object.freeze({\n\t\t\t\t\"~name\": columnName,\n\t\t\t\t\"~table\": tableName\n\t\t\t});\n\t\t} });\n\t} });\n}\n//#endregion\n//#region src/select-builder.ts\n/**\n* A builder for SQL `select` queries.\n*\n* @template TContract The contract that describes the database.\n* @template TTables The tables involved in the current `select` query.\n* @template TSelection The current selection of the `select` query.\n*/\nvar SelectBuilder = class {\n\t#contract;\n\tconstructor(contract) {\n\t\tthis.#contract = contract;\n\t}\n\tselect(..._args) {\n\t\treturn this;\n\t}\n\tbuild() {\n\t\treturn {};\n\t}\n};\n//#endregion\n//#region src/root.ts\n/**\n* The root of all builder.\n*\n* @template TContract The contract that describes the database.\n*/\nvar Root = class {\n\t#contract;\n\tconstructor(contract) {\n\t\tthis.#contract = contract;\n\t}\n\t/**\n\t* @internal\n\t*/\n\tfrom(_table) {\n\t\treturn new SelectBuilder(this.#contract);\n\t}\n};\n/**\n* @internal\n*/\nfunction createRoot(contract) {\n\treturn new Root(contract);\n}\n//#endregion\nexport { createRef, createRoot };\n\n//# sourceMappingURL=index.mjs.map"],"mappings":";;;;;;AAMA,SAAS,UAAU,WAAW;CAC7B,OAAO,IAAI,MAAM,CAAC,GAAG,EAAE,IAAI,SAAS,WAAW;EAC9C,IAAI,cAAc,KAAK,OAAO,OAAO,OAAO;GAC3C,SAAS;GACT,UAAU;EACX,CAAC;EACD,OAAO,IAAI,MAAM,CAAC,GAAG,EAAE,IAAI,SAAS,YAAY;GAC/C,IAAI,eAAe,SAAS,OAAO;GACnC,OAAO,OAAO,OAAO;IACpB,SAAS;IACT,UAAU;GACX,CAAC;EACF,EAAE,CAAC;CACJ,EAAE,CAAC;AACJ;;;;;;;;AAUA,IAAI,gBAAgB,MAAM;CACzB;CACA,YAAY,UAAU;EACrB,KAAKA,YAAY;CAClB;CACA,OAAO,GAAG,OAAO;EAChB,OAAO;CACR;CACA,QAAQ;EACP,OAAO,CAAC;CACT;AACD;;;;;;AAQA,IAAI,OAAO,MAAM;CAChB;CACA,YAAY,UAAU;EACrB,KAAKA,YAAY;CAClB;;;;CAIA,KAAK,QAAQ;EACZ,OAAO,IAAI,cAAc,KAAKA,SAAS;CACxC;AACD;;;;AAIA,SAAS,WAAW,UAAU;CAC7B,OAAO,IAAI,KAAK,QAAQ;AACzB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "./middleware-AhTz1BOW-th-Suxuf.mjs";
|
package/dist/plan-BHLdb0Z7.d.mts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "./query-lane-context-Qa-eddrE-kuZ8Z86-.mjs";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sql-contract-serializer-2oBWuxTe-DKZTf2n8.mjs","names":[],"sources":["../../../../2-sql/9-family/dist/sql-contract-serializer-2oBWuxTe.mjs"],"sourcesContent":["import { t as sqlFamilyError } from \"./errors-B5g0xWro.mjs\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { hydrateNamespaceEntities } from \"@internal/framework-components/ir\";\nimport { sqlContractCanonicalizationHooks } from \"@internal/sql-contract/canonicalization-hooks\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { SqlStorage, isMaterializedSqlNamespace } from \"@internal/sql-contract/types\";\nimport { ContractValidationError } from \"@internal/contract/contract-validation-error\";\nimport { isPlainRecord as isPlainRecord$1 } from \"@internal/contract/is-plain-record\";\nimport { composeSqlEntityKinds } from \"@internal/sql-contract/entity-kinds\";\nimport { createSqlContractSchema, validateSqlContractFully } from \"@internal/sql-contract/validators\";\nimport { type } from \"arktype\";\n//#region src/core/ir/sql-contract-serializer-base.ts\nconst NamespaceRawSchema = type({\n\tid: \"string\",\n\t\"kind?\": \"string\",\n\tentries: type({ \"+\": \"ignore\" })\n});\n/**\n* SQL family `ContractSerializer` abstract base. Carries the SQL-shared\n* deserialization pipeline:\n*\n* 1. `parseSqlContractStructure` validates the on-disk JSON envelope\n* against the SQL contract arktype schema (`validateSqlContractFully`)\n* and returns the validated flat-data shape.\n* 2. `hydrateSqlStorage` walks the validated `storage` subtree and\n* constructs the family-shared SQL Contract IR class hierarchy\n* (`SqlStorage` -> `StorageTable` -> `StorageColumn` / `PrimaryKey`\n* / …). The rest of the contract envelope is JSON-clean primitive\n* data and passes through unchanged.\n* 3. `constructTargetContract` is the target-specific extension hook;\n* defaults to identity. Targets that need to attach target-only\n* fields (e.g. target-specific derived storage fields) override it.\n*\n* Default `serializeContract` is identity over the contract — concrete\n* SQL targets ship JSON-clean class instances, so the contract value\n* can be stringified directly. The non-enumerable family-level `kind`\n* discriminator on `SqlNode` instances stays out of the persisted\n* envelope automatically. Targets that need to canonicalize on the way\n* out (key ordering, dropping computed-only fields) override\n* `serializeContract` directly.\n*/\nvar SqlContractSerializerBase = class {\n\tentityHydrationRegistry;\n\tcontractSchema;\n\tentryKinds;\n\tconstructor(entityHydrationRegistry = /* @__PURE__ */ new Map(), packEntityKinds = []) {\n\t\tthis.entityHydrationRegistry = entityHydrationRegistry;\n\t\tthis.entryKinds = composeSqlEntityKinds(packEntityKinds);\n\t\tthis.contractSchema = packEntityKinds.length > 0 ? createSqlContractSchema(this.entryKinds) : void 0;\n\t}\n\tdeserializeContract(json) {\n\t\tconst validated = this.parseSqlContractStructure(json);\n\t\tconst hydrated = this.hydrateSqlStorage(validated);\n\t\treturn this.constructTargetContract(hydrated);\n\t}\n\tserializeContract(contract) {\n\t\treturn contract;\n\t}\n\tshouldPreserveEmpty = sqlContractCanonicalizationHooks.shouldPreserveEmpty;\n\tsortStorage = sqlContractCanonicalizationHooks.sortStorage;\n\tparseSqlContractStructure(json) {\n\t\treturn validateSqlContractFully(json, this.contractSchema !== void 0 ? { contractSchema: this.contractSchema } : void 0);\n\t}\n\thydrateSqlStorage(validated) {\n\t\tconst types = validated.storage.types;\n\t\tconst hydratedTypes = types !== void 0 ? Object.fromEntries(Object.entries(types).map(([name, entry]) => [name, this.hydrateStorageTypeEntry(entry)])) : void 0;\n\t\tconst rawNamespaces = validated.storage.namespaces;\n\t\tif (rawNamespaces === void 0) throw new ContractValidationError(\"Contract storage.namespaces is required after structural validation\", \"structural\");\n\t\tconst hydratedNamespaces = this.hydrateSqlNamespaceMap(blindCast(rawNamespaces));\n\t\treturn {\n\t\t\t...validated,\n\t\t\tstorage: new SqlStorage({\n\t\t\t\tstorageHash: validated.storage.storageHash,\n\t\t\t\t...ifDefined(\"types\", hydratedTypes),\n\t\t\t\tnamespaces: blindCast(hydratedNamespaces)\n\t\t\t})\n\t\t};\n\t}\n\thydrateSqlNamespaceMap(namespaces) {\n\t\treturn Object.fromEntries(Object.entries(namespaces).map(([nsId, namespaceEntryRaw]) => {\n\t\t\tconst namespaceHydrated = this.hydrateSqlNamespaceEntry(nsId, namespaceEntryRaw);\n\t\t\tif (!isMaterializedSqlNamespace(namespaceHydrated)) throw sqlFamilyError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Target serializer bug: hydrateSqlNamespaceEntry for namespace \"${nsId}\" returned a non-NamespaceBase value. Override hydrateSqlNamespaceEntry to produce a target namespace concretion.`, {\n\t\t\t\twhy: \"The target contract serializer hydrated a namespace into a value that is not a materialized namespace concretion.\",\n\t\t\t\tfix: \"Fix the target package: its hydrateSqlNamespaceEntry override must return a target namespace concretion.\",\n\t\t\t\tmeta: { namespaceId: nsId }\n\t\t\t});\n\t\t\treturn [nsId, namespaceHydrated];\n\t\t}));\n\t}\n\thydrateSqlNamespaceEntry(nsId, raw) {\n\t\tconst id = typeof raw[\"id\"] === \"string\" ? raw[\"id\"] : nsId;\n\t\tconst parsed = NamespaceRawSchema({\n\t\t\t...raw,\n\t\t\tid\n\t\t});\n\t\tif (parsed instanceof type.errors) throw new ContractValidationError(`Namespace hydration failed: ${parsed.map((p) => p.message).join(\"; \")}`, \"structural\");\n\t\tconst entriesRaw = parsed.entries;\n\t\tconst rawEntriesMap = isPlainRecord$1(entriesRaw) ? entriesRaw : {};\n\t\tconst entriesInput = {};\n\t\tfor (const [key, innerMap] of Object.entries(rawEntriesMap)) entriesInput[key] = isPlainRecord$1(innerMap) ? innerMap : Object.freeze({});\n\t\tconst entriesOutput = hydrateNamespaceEntities(entriesInput, this.entryKinds, \"fail\", id);\n\t\tif (!Object.hasOwn(entriesOutput, \"table\")) entriesOutput[\"table\"] = {};\n\t\treturn blindCast({\n\t\t\tid,\n\t\t\tentries: entriesOutput\n\t\t});\n\t}\n\thydrateStorageTypeEntry(entry) {\n\t\tif (typeof entry !== \"object\" || entry === null) return entry;\n\t\tconst kind = entry.kind;\n\t\tif (typeof kind !== \"string\") return entry;\n\t\tconst factory = this.entityHydrationRegistry.get(kind);\n\t\tif (factory === void 0) return entry;\n\t\treturn blindCast(factory(entry));\n\t}\n\tconstructTargetContract(hydrated) {\n\t\treturn hydrated;\n\t}\n\t/**\n\t* Serializes a namespace's `entries` dict by walking every enumerable\n\t* kind — no kind is named here, mirroring the generic hydrate walk in\n\t* `hydrateSqlNamespaceEntry` above. `table` is the SQL family's one\n\t* universal base kind (every namespace carries it), so it is always\n\t* emitted, even when empty; every other kind — target- or\n\t* pack-contributed — is emitted only when it holds at least one entry.\n\t* A kind carried non-enumerable on `entries` is excluded here for free,\n\t* since `Object.entries` honors enumerability.\n\t*/\n\tserializeNamespaceEntries(entries) {\n\t\tconst out = { table: this.serializeEntries(entries[\"table\"] ?? {}) };\n\t\tfor (const [kind, record] of Object.entries(entries)) {\n\t\t\tif (kind === \"table\" || record == null || Object.keys(record).length === 0) continue;\n\t\t\tout[kind] = this.serializeEntries(record);\n\t\t}\n\t\treturn out;\n\t}\n\tserializeEntries(entries) {\n\t\tconst out = {};\n\t\tfor (const [name, entry] of Object.entries(entries)) out[name] = this.serializeJsonObject(entry);\n\t\treturn out;\n\t}\n\tserializeJsonObject(value) {\n\t\treturn blindCast(this.serializeJsonValue(value));\n\t}\n\tserializeJsonValue(value) {\n\t\treturn blindCast(JSON.parse(JSON.stringify(value)));\n\t}\n};\n//#endregion\n//#region src/core/ir/sql-contract-serializer.ts\n/**\n* Default SQL family `ContractSerializer` concretion. Inherits the\n* full SQL-shared deserialization pipeline (structural validation +\n* IR-class hydration) without pack-registered `storage.types`\n* hydration factories — targets that emit polymorphic JSON outside the\n* codec-typed envelope wire a target-specific subclass with a populated\n* registry (see Postgres). Family-level call sites instantiate this\n* default directly when no target serializer is supplied.\n*\n* Because this serializer has no target concretion, deserialization of\n* contracts that include namespace entries from JSON will throw unless\n* the caller provides pre-hydrated `NamespaceBase` instances. Production\n* paths always supply a target-specific serializer.\n*/\nvar SqlContractSerializer = class extends SqlContractSerializerBase {\n\tconstructor() {\n\t\tsuper(/* @__PURE__ */ new Map());\n\t}\n};\n//#endregion\nexport { SqlContractSerializerBase as n, SqlContractSerializer as t };\n\n//# sourceMappingURL=sql-contract-serializer-2oBWuxTe.mjs.map"],"mappings":";;;;;;;;;;;;AAYA,MAAM,qBAAqB,KAAK;CAC/B,IAAI;CACJ,SAAS;CACT,SAAS,KAAK,EAAE,KAAK,SAAS,CAAC;AAChC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;AAyBD,IAAI,4BAA4B,MAAM;CACrC;CACA;CACA;CACA,YAAY,0CAA0C,IAAI,IAAI,GAAG,kBAAkB,CAAC,GAAG;EACtF,KAAK,0BAA0B;EAC/B,KAAK,aAAa,sBAAsB,eAAe;EACvD,KAAK,iBAAiB,gBAAgB,SAAS,IAAI,wBAAwB,KAAK,UAAU,IAAI,KAAK;CACpG;CACA,oBAAoB,MAAM;EACzB,MAAM,YAAY,KAAK,0BAA0B,IAAI;EACrD,MAAM,WAAW,KAAK,kBAAkB,SAAS;EACjD,OAAO,KAAK,wBAAwB,QAAQ;CAC7C;CACA,kBAAkB,UAAU;EAC3B,OAAO;CACR;CACA,sBAAsB,iCAAiC;CACvD,cAAc,iCAAiC;CAC/C,0BAA0B,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mBAAmB,KAAK,CAAC;CAChD;CACA,mBAAmB,OAAO;EACzB,OAAO,UAAU,KAAK,MAAM,KAAK,UAAU,KAAK,CAAC,CAAC;CACnD;AACD;;;;;;;;;;;;;;;AAiBA,IAAI,wBAAwB,cAAc,0BAA0B;CACnE,cAAc;EACb,sBAAsB,IAAI,IAAI,CAAC;CAChC;AACD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"timestamp-now-generator-DRXygu32-DN9Qb1uI.mjs","names":[],"sources":["../../../../2-sql/9-family/dist/timestamp-now-generator-DRXygu32.mjs"],"sourcesContent":["//#region src/core/timestamp-now-generator.ts\n/**\n* Canonical id for the wall-clock-now mutation default generator.\n*\n* Owned by `family-sql` because that's where the generator lives. The\n* id flows out from here to (1) the control-plane descriptor and the\n* temporal field-preset pair below, (2) the runtime-plane sibling\n* `timestamp-now-runtime-generator.ts`, and (3) authoring surfaces\n* (PSL `temporal.updatedAt()`, TS `field.temporal.updatedAt()`) via\n* the descriptor flow. Co-locating the constant with its only owner\n* keeps the framework layer free of concrete generator ids.\n*/\nconst TIMESTAMP_NOW_GENERATOR_ID = \"timestampNow\";\n/**\n* Builds the canonical control-plane descriptor for the wall-clock-now\n* mutation default generator. The descriptor's `id` and `buildPhases`\n* are target-agnostic so PSL `temporal.updatedAt()` and TS\n* `field.temporal.updatedAt()` lower to byte-identical contracts.\n*\n* `applicableCodecIds` is omitted: `timestampNow` is preset-only (not\n* reachable via `@default(timestampNow())` lowering), and the codec is\n* co-registered by the preset descriptor itself, so the\n* `@default(...)` compatibility check has no role to play here.\n*/\nfunction timestampNowControlDescriptor() {\n\treturn {\n\t\tid: TIMESTAMP_NOW_GENERATOR_ID,\n\t\tbuildPhases: () => ({\n\t\t\tonCreate: {\n\t\t\t\tkind: \"generator\",\n\t\t\t\tid: TIMESTAMP_NOW_GENERATOR_ID\n\t\t\t},\n\t\t\tonUpdate: {\n\t\t\t\tkind: \"generator\",\n\t\t\t\tid: TIMESTAMP_NOW_GENERATOR_ID\n\t\t\t}\n\t\t})\n\t};\n}\n/**\n* Builds the canonical `temporal.{createdAt,updatedAt}` field-preset pair\n* for a SQL target. `createdAt` lowers to a `now()` storage default;\n* `updatedAt` lowers to the `timestampNow` execution generator on both\n* `onCreate` and `onUpdate` (RD: \"last modified time\", non-null). Targets\n* supply the codec/native-type pair that matches their timestamp column;\n* everything else is shared so PSL `temporal.updatedAt()` and TS\n* `field.temporal.updatedAt()` lower to byte-identical contracts across\n* targets by construction.\n*/\n/* @__NO_SIDE_EFFECTS__ */\nfunction temporalAuthoringPresets(input) {\n\tconst { codecId, nativeType } = input;\n\treturn {\n\t\tcreatedAt: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId,\n\t\t\t\tnativeType,\n\t\t\t\tdefault: {\n\t\t\t\t\tkind: \"function\",\n\t\t\t\t\texpression: \"now()\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tupdatedAt: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId,\n\t\t\t\tnativeType,\n\t\t\t\texecutionDefaults: {\n\t\t\t\t\tonCreate: {\n\t\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\t\tid: TIMESTAMP_NOW_GENERATOR_ID\n\t\t\t\t\t},\n\t\t\t\t\tonUpdate: {\n\t\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\t\tid: TIMESTAMP_NOW_GENERATOR_ID\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\nconst TEMPORAL_PRECISION_ARG = {\n\tname: \"precision\",\n\tkind: \"number\",\n\toptional: true,\n\tinteger: true,\n\tminimum: 0\n};\nconst TEMPORAL_ON_CREATE_ARG = {\n\tname: \"onCreate\",\n\tkind: \"option\",\n\tvalues: [\"now\"],\n\toptional: true\n};\nconst TEMPORAL_ON_UPDATE_ARG = {\n\tname: \"onUpdate\",\n\tkind: \"option\",\n\tvalues: [\"now\"],\n\toptional: true\n};\n/**\n* Selects the `timestampNow` generator descriptor for the preset's `now`\n* token. The token is preset vocabulary; the generator id never appears in a\n* user's spelling (ADR 169 — `timestampNow` is preset-only).\n*/\nfunction temporalPhaseTemplate(index) {\n\treturn {\n\t\tkind: \"select\",\n\t\tindex,\n\t\tcases: { now: {\n\t\t\tkind: \"generator\",\n\t\t\tid: TIMESTAMP_NOW_GENERATOR_ID\n\t\t} }\n\t};\n}\n/**\n* Builds a `temporal.<codec>` field preset for a codec that takes a precision\n* parameter (`pg/timestamp@1`, `pg/timestamptz@1`). Arguments change field\n* properties only — never the codec, which the caller fixes here.\n*\n* All three arguments are optional: omitting `precision` omits `typeParams`\n* entirely, and omitting a phase omits that phase (both omitted omits\n* `executionDefaults`).\n*/\n/* @__NO_SIDE_EFFECTS__ */\nfunction temporalCodecPresetWithPrecision(input) {\n\treturn {\n\t\tkind: \"fieldPreset\",\n\t\targs: [\n\t\t\tTEMPORAL_PRECISION_ARG,\n\t\t\tTEMPORAL_ON_CREATE_ARG,\n\t\t\tTEMPORAL_ON_UPDATE_ARG\n\t\t],\n\t\toutput: {\n\t\t\tcodecId: input.codecId,\n\t\t\tnativeType: input.nativeType,\n\t\t\ttypeParams: { precision: {\n\t\t\t\tkind: \"arg\",\n\t\t\t\tindex: 0\n\t\t\t} },\n\t\t\texecutionDefaults: {\n\t\t\t\tonCreate: temporalPhaseTemplate(1),\n\t\t\t\tonUpdate: temporalPhaseTemplate(2)\n\t\t\t}\n\t\t}\n\t};\n}\n/**\n* Builds a `temporal.<codec>` field preset for a codec with no type\n* parameters (`sqlite/datetime@1`). As with the precision-bearing variant,\n* both phase arguments are optional and omitting one omits that phase.\n*/\n/* @__NO_SIDE_EFFECTS__ */\nfunction temporalCodecPreset(input) {\n\treturn {\n\t\tkind: \"fieldPreset\",\n\t\targs: [TEMPORAL_ON_CREATE_ARG, TEMPORAL_ON_UPDATE_ARG],\n\t\toutput: {\n\t\t\tcodecId: input.codecId,\n\t\t\tnativeType: input.nativeType,\n\t\t\texecutionDefaults: {\n\t\t\t\tonCreate: temporalPhaseTemplate(0),\n\t\t\t\tonUpdate: temporalPhaseTemplate(1)\n\t\t\t}\n\t\t}\n\t};\n}\n//#endregion\nexport { timestampNowControlDescriptor as a, temporalCodecPresetWithPrecision as i, temporalAuthoringPresets as n, temporalCodecPreset as r, TIMESTAMP_NOW_GENERATOR_ID as t };\n\n//# sourceMappingURL=timestamp-now-generator-DRXygu32.mjs.map"],"mappings":";;;;;;;;;;;;AAYA,MAAM,6BAA6B;;;;;;;;;;;;AAYnC,SAAS,gCAAgC;CACxC,OAAO;EACN,IAAI;EACJ,oBAAoB;GACnB,UAAU;IACT,MAAM;IACN,IAAI;GACL;GACA,UAAU;IACT,MAAM;IACN,IAAI;GACL;EACD;CACD;AACD;;;;;;;;;;;;AAYA,SAAS,yBAAyB,OAAO;CACxC,MAAM,EAAE,SAAS,eAAe;CAChC,OAAO;EACN,WAAW;GACV,MAAM;GACN,QAAQ;IACP;IACA;IACA,SAAS;KACR,MAAM;KACN,YAAY;IACb;GACD;EACD;EACA,WAAW;GACV,MAAM;GACN,QAAQ;IACP;IACA;IACA,mBAAmB;KAClB,UAAU;MACT,MAAM;MACN,IAAI;KACL;KACA,UAAU;MACT,MAAM;MACN,IAAI;KACL;IACD;GACD;EACD;CACD;AACD;AACA,MAAM,yBAAyB;CAC9B,MAAM;CACN,MAAM;CACN,UAAU;CACV,SAAS;CACT,SAAS;AACV;AACA,MAAM,yBAAyB;CAC9B,MAAM;CACN,MAAM;CACN,QAAQ,CAAC,KAAK;CACd,UAAU;AACX;AACA,MAAM,yBAAyB;CAC9B,MAAM;CACN,MAAM;CACN,QAAQ,CAAC,KAAK;CACd,UAAU;AACX;;;;;;AAMA,SAAS,sBAAsB,OAAO;CACrC,OAAO;EACN,MAAM;EACN;EACA,OAAO,EAAE,KAAK;GACb,MAAM;GACN,IAAI;EACL,EAAE;CACH;AACD;;;;;;;;;;;AAWA,SAAS,iCAAiC,OAAO;CAChD,OAAO;EACN,MAAM;EACN,MAAM;GACL;GACA;GACA;EACD;EACA,QAAQ;GACP,SAAS,MAAM;GACf,YAAY,MAAM;GAClB,YAAY,EAAE,WAAW;IACxB,MAAM;IACN,OAAO;GACR,EAAE;GACF,mBAAmB;IAClB,UAAU,sBAAsB,CAAC;IACjC,UAAU,sBAAsB,CAAC;GAClC;EACD;CACD;AACD;;;;;;;AAOA,SAAS,oBAAoB,OAAO;CACnC,OAAO;EACN,MAAM;EACN,MAAM,CAAC,wBAAwB,sBAAsB;EACrD,QAAQ;GACP,SAAS,MAAM;GACf,YAAY,MAAM;GAClB,mBAAmB;IAClB,UAAU,sBAAsB,CAAC;IACjC,UAAU,sBAAsB,CAAC;GAClC;EACD;CACD;AACD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types-4YenawkP-CwaaZSid.mjs","names":[],"sources":["../../../../2-sql/1-core/schema-ir/dist/types-4YenawkP.mjs"],"sourcesContent":["import { f as normalizeIndexOptionValue, l as nameOf } from \"./naming-DKr4TJd7.mjs\";\nimport { IRNodeBase, freezeNode } from \"@internal/framework-components/ir\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { canonicalStringify } from \"@internal/utils/canonical-stringify\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { isArrayEqual } from \"@internal/utils/array-equal\";\n//#region src/ir/schema-node-kinds.ts\n/**\n* The `nodeKind` discriminant for each relational schema-diff leaf node.\n* Each node carries a unique value; the differ pairs siblings by `id`, and\n* these kinds distinguish the node types that appear as `PostgresTableSchemaNode`\n* children (columns, primary key, foreign keys, uniques, indexes, checks) from\n* each other and from the RLS policy/role kinds a target defines separately.\n*/\nconst RelationalSchemaNodeKind = {\n\tschema: \"sql-schema\",\n\ttable: \"sql-table\",\n\tcolumn: \"sql-column\",\n\tcolumnDefault: \"sql-column-default\",\n\tprimaryKey: \"sql-primary-key\",\n\tforeignKey: \"sql-foreign-key\",\n\tunique: \"sql-unique\",\n\tindex: \"sql-index\",\n\tcheck: \"sql-check-constraint\"\n};\n/**\n* The one real map from a relational `nodeKind` to the framework-neutral\n* {@link DiffSubjectGranularity} its diff issues carry — the SQL family's\n* post-diff filters (issue category, strict-mode gating) and the framework\n* aggregate's unclaimed-elements sweep key on the granularity, never on the\n* `nodeKind` spelling and never on anything stamped on the node. Resolution\n* is by `nodeKind` equality against this map, not a suffix string match.\n* Target-specific node kinds (Postgres namespace/table/policy/role) are\n* outside this family layer's vocabulary and map their own kinds directly.\n*/\nconst RELATIONAL_NODE_GRANULARITY = {\n\t[RelationalSchemaNodeKind.schema]: \"structural\",\n\t[RelationalSchemaNodeKind.table]: \"entity\",\n\t[RelationalSchemaNodeKind.column]: \"field\",\n\t[RelationalSchemaNodeKind.columnDefault]: \"auxiliary\",\n\t[RelationalSchemaNodeKind.primaryKey]: \"auxiliary\",\n\t[RelationalSchemaNodeKind.foreignKey]: \"auxiliary\",\n\t[RelationalSchemaNodeKind.unique]: \"auxiliary\",\n\t[RelationalSchemaNodeKind.index]: \"auxiliary\",\n\t[RelationalSchemaNodeKind.check]: \"auxiliary\"\n};\nfunction isRelationalSchemaNodeKind(nodeKind) {\n\treturn Object.hasOwn(RELATIONAL_NODE_GRANULARITY, nodeKind);\n}\n/**\n* Looks up the subject granularity for a relational `nodeKind`. Throws for a\n* `nodeKind` outside this map (a target-specific kind, e.g. Postgres's\n* namespace/table/policy/role) — those map their own kinds directly rather\n* than through this family-level map.\n*/\nfunction relationalNodeGranularity(nodeKind) {\n\tif (!isRelationalSchemaNodeKind(nodeKind)) throw new InternalError(`relationalNodeGranularity: unrecognized relational node kind \"${nodeKind}\"`);\n\treturn RELATIONAL_NODE_GRANULARITY[nodeKind];\n}\n/**\n* The one real map from a relational `nodeKind` to its storage `entityKind`\n* — the same vocabulary the contract storage's `entries` dictionary keys use\n* (`elementCoordinates` walks it). Only the whole-table kind has an entity of\n* its own; every other relational node (a column, an index, …) is nested\n* under one and maps to nothing here.\n*/\nconst RELATIONAL_NODE_ENTITY_KIND = { [RelationalSchemaNodeKind.table]: \"table\" };\n/**\n* Looks up the storage `entityKind` for a relational `nodeKind` — sibling of\n* {@link relationalNodeGranularity}, resolved by `nodeKind` equality against\n* {@link RELATIONAL_NODE_ENTITY_KIND}. `undefined` for a target-specific kind\n* (targets map their own kinds directly) or a relational kind with no entity\n* of its own.\n*/\nfunction relationalNodeEntityKind(nodeKind) {\n\treturn isRelationalSchemaNodeKind(nodeKind) ? RELATIONAL_NODE_ENTITY_KIND[nodeKind] : void 0;\n}\n//#endregion\n//#region src/ir/sql-schema-ir-node.ts\n/**\n* SQL Schema IR node base. Carries the family-level\n* `kind = 'sql-schema-ir'` discriminator and inherits the framework's\n* `freezeNode` affordance.\n*\n* SQL Schema IR represents the actual database state as discovered by\n* introspection (the parallel to SQL Contract IR, which represents the\n* desired state).\n*\n* The discriminator is installed as a non-enumerable own property,\n* matching the SqlNode pattern. This keeps `JSON.stringify(node)`\n* canonical (no `kind` field), keeps `toEqual({...})` test assertions\n* against pre-lift flat shapes passing, and keeps `node.kind` readable\n* for dispatch.\n*\n* Both `kind` and `nodeKind` are required: every concrete leaf is a node\n* the generic differ can pair and compare, so every leaf must declare which\n* node it is. `nodeKind` has no default here — every direct subclass sets its\n* own literal value (the relational leaves via `RelationalSchemaNodeKind`,\n* target concretions via their own vocabulary, e.g. `PostgresSchemaNodeKind`).\n*/\nvar SqlSchemaIRNode = class extends IRNodeBase {\n\tconstructor() {\n\t\tsuper();\n\t\tObject.defineProperty(this, \"kind\", {\n\t\t\tvalue: \"sql-schema-ir\",\n\t\t\twritable: false,\n\t\t\tenumerable: false,\n\t\t\tconfigurable: false\n\t\t});\n\t}\n};\n/**\n* Asserts `node` matches `predicate`, narrowing its type to `T`. The one\n* shared implementation every node class's `static assert` and `isEqualTo`\n* reach for, instead of each hand-writing its own throw: the message names\n* the class the caller expected.\n*/\nfunction assertNode(node, className, predicate) {\n\tif (node === void 0 || !predicate(node)) throw new InternalError(`Expected a ${className} but got nodeKind=${node?.nodeKind ?? \"undefined\"}`);\n}\n/**\n* Defines a non-enumerable own property, the same treatment `kind` gets\n* above: a derivation-time render-support field stays out of\n* `JSON.stringify`, `toEqual({...})` structural assertions, and spreads,\n* while remaining directly readable (`node.field`) for the one consumer\n* that resolves it at plan time. A no-op when `value` is `undefined` — the\n* property is simply absent, matching every other optional field on these\n* nodes.\n*/\nfunction defineNonEnumerable(target, key, value) {\n\tif (value === void 0) return;\n\tObject.defineProperty(target, key, {\n\t\tvalue,\n\t\tenumerable: false,\n\t\twritable: false,\n\t\tconfigurable: false\n\t});\n}\n//#endregion\n//#region src/ir/primary-key.ts\n/**\n* Primary-key Schema IR node. Mirrors the Contract IR `PrimaryKey`\n* shape (same `columns` + optional `name`) so verification can compare\n* intent and actual structurally. Defined here independently to avoid\n* a sql-schema-ir -> sql-contract dependency.\n*\n* Implements `DiffableNode` so a primary key is directly a table's diff-tree\n* child. `id` is a fixed sentinel — a table has at most one primary key, so\n* there is never a sibling to disambiguate against. `isEqualTo` compares the\n* column tuple; the PK's own `name` is a database-assigned label with no\n* semantic weight, so it is not compared (mirrors the policy node's\n* name-insensitivity to non-identifying detail).\n*/\nvar PrimaryKey = class PrimaryKey extends SqlSchemaIRNode {\n\tnodeKind = RelationalSchemaNodeKind.primaryKey;\n\tcolumns;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.columns = input.columns;\n\t\tif (input.name !== void 0) this.name = input.name;\n\t\tdefineNonEnumerable(this, \"dependsOn\", input.dependsOn);\n\t\tfreezeNode(this);\n\t}\n\tget id() {\n\t\treturn \"primary-key\";\n\t}\n\tchildren() {\n\t\treturn [];\n\t}\n\tstatic from(value) {\n\t\treturn value instanceof PrimaryKey ? value : new PrimaryKey(value);\n\t}\n\tstatic is(node) {\n\t\treturn node.nodeKind === RelationalSchemaNodeKind.primaryKey;\n\t}\n\tisEqualTo(other) {\n\t\tconst node = blindCast(other);\n\t\tassertNode(node, \"PrimaryKey\", PrimaryKey.is);\n\t\treturn this.columns.length === node.columns.length && this.columns.every((c, i) => c === node.columns[i]);\n\t}\n};\n//#endregion\n//#region src/ir/sql-check-constraint-ir.ts\n/**\n* Schema IR node for a table-level check constraint, carried as an opaque\n* predicate. The expression is never parsed — a database reprints predicates\n* in its own normalized form, so any structured reading of it would drift.\n*\n* Implements `DiffableNode` so a check is directly a table's diff-tree child;\n* `id` is `check:<name>`. `isEqualTo` is mode-selected by the receiver's\n* `prefix` (the differ always calls `expected.isEqualTo(actual)`): a\n* wire-named receiver compares ids only — the wire name's hash already\n* commits to the predicate — while an exact-named receiver byte-compares the\n* expression, which is reliable precisely when both sides came from the same\n* reprint.\n*/\nvar SqlCheckConstraintIR = class SqlCheckConstraintIR extends SqlSchemaIRNode {\n\tnodeKind = RelationalSchemaNodeKind.check;\n\tname;\n\texpression;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.name = nameOf(input.naming);\n\t\tif (input.naming.kind === \"wire\") this.prefix = input.naming.prefix;\n\t\tthis.expression = input.expression;\n\t\tdefineNonEnumerable(this, \"dependsOn\", input.dependsOn);\n\t\tfreezeNode(this);\n\t}\n\tget id() {\n\t\treturn `check:${this.name}`;\n\t}\n\tchildren() {\n\t\treturn [];\n\t}\n\tstatic from(value) {\n\t\treturn value instanceof SqlCheckConstraintIR ? value : new SqlCheckConstraintIR(value);\n\t}\n\tstatic is(node) {\n\t\treturn node.nodeKind === RelationalSchemaNodeKind.check;\n\t}\n\tisEqualTo(other) {\n\t\tconst node = blindCast(other);\n\t\tassertNode(node, \"SqlCheckConstraintIR\", SqlCheckConstraintIR.is);\n\t\tif (this.prefix !== void 0) return this.id === node.id;\n\t\treturn this.expression === node.expression;\n\t}\n};\n//#endregion\n//#region src/ir/resolved-default-equality.ts\n/**\n* Structural equality for two resolved column defaults, ported from the\n* relational walk's `columnDefaultsEqual` normalized branch: kinds must\n* match; literal values are normalized (Date and temporal-typed strings to\n* ISO instants) then compared canonically (JSON objects match their\n* canonical string form); function expressions compare case- and\n* whitespace-insensitively.\n*\n* `nativeType` provides the temporal-normalization context (the actual\n* side's resolved native type in a diff comparison).\n*/\nfunction resolvedDefaultsEqual(expected, actual, nativeType) {\n\tif (expected.kind !== actual.kind) return false;\n\tif (expected.kind === \"literal\" && actual.kind === \"literal\") return literalValuesEqual(normalizeLiteralValue(expected.value, nativeType), normalizeLiteralValue(actual.value, nativeType));\n\tif (expected.kind === \"function\" && actual.kind === \"function\") return normalizeFunctionExpression(expected.expression) === normalizeFunctionExpression(actual.expression);\n\treturn false;\n}\nfunction normalizeFunctionExpression(expression) {\n\treturn expression.toLowerCase().replace(/\\s+/g, \"\");\n}\nfunction isTemporalNativeType(nativeType) {\n\tif (!nativeType) return false;\n\tconst normalized = nativeType.toLowerCase();\n\treturn normalized.includes(\"timestamp\") || normalized === \"date\";\n}\nfunction normalizeLiteralValue(value, nativeType) {\n\tif (value instanceof Date) return value.toISOString();\n\tif (typeof value === \"string\" && isTemporalNativeType(nativeType)) {\n\t\tconst parsed = new Date(value);\n\t\tif (!Number.isNaN(parsed.getTime())) return parsed.toISOString();\n\t}\n\treturn value;\n}\nfunction literalValuesEqual(a, b) {\n\tif (a === b) return true;\n\tif (typeof a === \"object\" && a !== null && typeof b === \"object\" && b !== null) return canonicalStringify(a) === canonicalStringify(b);\n\tif (typeof a === \"object\" && a !== null && typeof b === \"string\") try {\n\t\treturn canonicalStringify(a) === canonicalStringify(JSON.parse(b));\n\t} catch {\n\t\treturn false;\n\t}\n\tif (typeof a === \"string\" && typeof b === \"object\" && b !== null) try {\n\t\treturn canonicalStringify(JSON.parse(a)) === canonicalStringify(b);\n\t} catch {\n\t\treturn false;\n\t}\n\treturn false;\n}\n//#endregion\n//#region src/ir/sql-column-default-ir.ts\n/**\n* Schema-diff node for a column's default value. The default is the one\n* column attribute with an extra/missing/drift lifecycle of its own, so it\n* is a child node of the column rather than a compared attribute: an\n* undeclared live default surfaces as `not-expected`, a declared default the\n* database lacks as `not-found`, and a divergent value as `not-equal` — the\n* three reasons cover the legacy `extra_default` / `default_missing` /\n* `default_mismatch` vocabulary with no attribute inspection.\n*\n* `id` is a fixed sentinel — a column has at most one default. Built\n* transiently by `SqlColumnIR.children()` from the column's own fields;\n* never constructed by derivation or introspection directly.\n*/\nvar SqlColumnDefaultIR = class SqlColumnDefaultIR extends SqlSchemaIRNode {\n\tnodeKind = RelationalSchemaNodeKind.columnDefault;\n\tconstructor(input) {\n\t\tsuper();\n\t\tif (input.resolved !== void 0) this.resolved = input.resolved;\n\t\tif (input.raw !== void 0) this.raw = input.raw;\n\t\tif (input.nativeTypeContext !== void 0) this.nativeTypeContext = input.nativeTypeContext;\n\t\tdefineNonEnumerable(this, \"many\", input.many);\n\t\tfreezeNode(this);\n\t}\n\tget id() {\n\t\treturn \"default\";\n\t}\n\tchildren() {\n\t\treturn [];\n\t}\n\tstatic is(node) {\n\t\treturn node.nodeKind === RelationalSchemaNodeKind.columnDefault;\n\t}\n\t/**\n\t* Structured comparison with `this` as the expected side: both sides\n\t* resolved compare per the relational walk's `columnDefaultsEqual`\n\t* semantics; a declared expected default against an unparseable actual\n\t* (raw present, no resolved parse) is a mismatch; two raw-only nodes fall\n\t* back to raw string equality.\n\t*/\n\tisEqualTo(other) {\n\t\tconst node = blindCast(other);\n\t\tassertNode(node, \"SqlColumnDefaultIR\", SqlColumnDefaultIR.is);\n\t\tif (this.resolved !== void 0 && node.resolved !== void 0) return resolvedDefaultsEqual(this.resolved, node.resolved, node.nativeTypeContext ?? this.nativeTypeContext);\n\t\tif (this.resolved !== void 0 || node.resolved !== void 0) return false;\n\t\treturn this.raw === node.raw;\n\t}\n};\n//#endregion\n//#region src/ir/sql-column-ir.ts\n/**\n* Schema IR node for a single column on a table, as observed by\n* introspection. Unlike the Contract IR `StorageColumn`, this carries\n* the column's `name` (Schema IR columns are returned as arrays from\n* introspection queries; the parent table re-keys them into a record\n* for downstream consumers).\n*\n* Implements `DiffableNode` so a column is directly a table's diff-tree\n* child: `id` is the column name (unique among a table's columns); `isEqualTo`\n* compares this column's own attributes only — never children, since a\n* column is a leaf. When both sides carry `resolvedNativeType` (stamped at\n* derivation/introspection), the comparison uses the resolved values —\n* resolved native type, nullability, and structured default equality per\n* the relational walk's `columnDefaultsEqual` semantics, with `this` as the\n* expected side. Otherwise it falls back to comparing raw fields.\n*/\nvar SqlColumnIR = class SqlColumnIR extends SqlSchemaIRNode {\n\tnodeKind = RelationalSchemaNodeKind.column;\n\tname;\n\tnativeType;\n\tnullable;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.name = input.name;\n\t\tthis.nativeType = input.nativeType;\n\t\tthis.nullable = input.nullable;\n\t\tif (input.default !== void 0) this.default = input.default;\n\t\tif (input.annotations !== void 0) this.annotations = input.annotations;\n\t\tif (input.many !== void 0) this.many = input.many;\n\t\tif (input.resolvedNativeType !== void 0) this.resolvedNativeType = input.resolvedNativeType;\n\t\tif (input.resolvedDefault !== void 0) this.resolvedDefault = input.resolvedDefault;\n\t\tdefineNonEnumerable(this, \"codecRef\", input.codecRef);\n\t\tdefineNonEnumerable(this, \"codecBaseNativeType\", input.codecBaseNativeType);\n\t\tdefineNonEnumerable(this, \"codecNamedType\", input.codecNamedType);\n\t\tfreezeNode(this);\n\t}\n\tget id() {\n\t\treturn `column:${this.name}`;\n\t}\n\t/**\n\t* The column's default, when declared/present, is the column's one child\n\t* node — it has an extra/missing/drift lifecycle of its own, so the differ\n\t* recurses to it rather than `isEqualTo` comparing it. Built transiently\n\t* from this column's own fields.\n\t*/\n\tchildren() {\n\t\tif (this.resolvedDefault === void 0 && this.default === void 0) return [];\n\t\treturn [new SqlColumnDefaultIR({\n\t\t\t...ifDefined(\"resolved\", this.resolvedDefault),\n\t\t\t...ifDefined(\"raw\", this.default),\n\t\t\t...ifDefined(\"nativeTypeContext\", this.resolvedNativeType),\n\t\t\t...ifDefined(\"many\", this.many ?? this.codecRef?.many)\n\t\t})];\n\t}\n\tstatic is(node) {\n\t\treturn node.nodeKind === RelationalSchemaNodeKind.column;\n\t}\n\t/**\n\t* Compares the column's own attributes only — the default lives on the\n\t* child node. When both sides carry `resolvedNativeType`, the resolved\n\t* value governs (array-ness rides on its `[]` suffix); otherwise raw\n\t* fields compare.\n\t*/\n\tisEqualTo(other) {\n\t\tconst node = blindCast(other);\n\t\tassertNode(node, \"SqlColumnIR\", SqlColumnIR.is);\n\t\tif (this.resolvedNativeType !== void 0 && node.resolvedNativeType !== void 0) return this.resolvedNativeType === node.resolvedNativeType && this.nullable === node.nullable;\n\t\treturn this.nativeType === node.nativeType && this.nullable === node.nullable && Boolean(this.many) === Boolean(node.many);\n\t}\n};\n//#endregion\n//#region src/ir/sql-foreign-key-ir.ts\n/**\n* Schema IR node for a foreign-key constraint as observed by\n* introspection. The `referencedTable` / `referencedColumns` field\n* names match the introspection vocabulary (`pg_constraint.confkey`,\n* etc.) and intentionally differ from the Contract IR's nested\n* `references: { table, columns }` shape so that the verifier's\n* structural comparison stays explicit about which side it's reading.\n*\n* Implements `DiffableNode` so a foreign key is directly a table's diff-tree\n* child. Foreign keys are frequently unnamed (introspection may not carry a\n* constraint name, and the contract side never invents one), so `id` is\n* derived from the referencing/referenced coordinates rather than `name` —\n* the same tuple that makes two FK constraints the same constraint. This\n* also serves as the comparison key: two FKs with the same coordinates are\n* paired by the differ, and `isEqualTo` then compares the remaining\n* attribute — the referential actions.\n*/\nvar SqlForeignKeyIR = class SqlForeignKeyIR extends SqlSchemaIRNode {\n\tnodeKind = RelationalSchemaNodeKind.foreignKey;\n\tcolumns;\n\treferencedTable;\n\treferencedColumns;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.columns = input.columns;\n\t\tthis.referencedTable = input.referencedTable;\n\t\tthis.referencedColumns = input.referencedColumns;\n\t\tif (input.referencedSchema !== void 0) this.referencedSchema = input.referencedSchema;\n\t\tif (input.name !== void 0) this.name = input.name;\n\t\tif (input.onDelete !== void 0) this.onDelete = input.onDelete;\n\t\tif (input.onUpdate !== void 0) this.onUpdate = input.onUpdate;\n\t\tif (input.annotations !== void 0) this.annotations = input.annotations;\n\t\tconst resolvedReferencedNamespace = input.resolvedReferencedNamespace ?? input.referencedSchema;\n\t\tif (resolvedReferencedNamespace !== void 0) this.resolvedReferencedNamespace = resolvedReferencedNamespace;\n\t\tdefineNonEnumerable(this, \"dependsOn\", input.dependsOn);\n\t\tfreezeNode(this);\n\t}\n\tget id() {\n\t\tconst referencedNamespace = this.resolvedReferencedNamespace ?? \"\";\n\t\treturn `foreign-key:${this.columns.join(\",\")}->${referencedNamespace}.${this.referencedTable}(${this.referencedColumns.join(\",\")})`;\n\t}\n\tchildren() {\n\t\treturn [];\n\t}\n\tstatic is(node) {\n\t\treturn node.nodeKind === RelationalSchemaNodeKind.foreignKey;\n\t}\n\t/**\n\t* Referential-action comparison with `this` as the expected side, matching\n\t* the relational walk's `getReferentialActionMismatches`: `noAction` is the\n\t* database default and equivalent to an undeclared action, and drift is\n\t* flagged only when the expected side declares a (normalized) action.\n\t*/\n\tisEqualTo(other) {\n\t\tconst node = blindCast(other);\n\t\tassertNode(node, \"SqlForeignKeyIR\", SqlForeignKeyIR.is);\n\t\treturn referentialActionMatches(this.onDelete, node.onDelete) && referentialActionMatches(this.onUpdate, node.onUpdate);\n\t}\n};\nfunction referentialActionMatches(expected, actual) {\n\tconst normalizedExpected = expected === \"noAction\" ? void 0 : expected;\n\tif (normalizedExpected === void 0) return true;\n\treturn normalizedExpected === (actual === \"noAction\" ? void 0 : actual);\n}\n//#endregion\n//#region src/ir/sql-index-ir.ts\n/**\n* Schema IR node for a secondary index as observed by introspection.\n* Unlike the Contract IR `Index`, the Schema IR carries an explicit\n* `unique` field — introspection sees the underlying index regardless\n* of whether the user expressed it as `@@index` or `@@unique`, and the\n* verifier needs to distinguish them when comparing to the Contract.\n*\n* Implements `DiffableNode` so an index is directly a table's diff-tree\n* child. Indexes are name-identified: every index — contract-derived or\n* introspected — carries its full physical name, and `id` is that name.\n* Names are catalog-unique per schema, so two indexes legitimately sharing\n* one column tuple (a unique index beside a redundant plain index) are two\n* distinct siblings, and expression indexes need no column tuple at all.\n*\n* `isEqualTo` is selected by the receiver (the differ always calls\n* `expected.isEqualTo(actual)`) and delegates to {@link contentEquals} —\n* the single node-owned content relation: both modes compare `unique`\n* strict, `type` and option values through the named normalization seams,\n* and `columns` ordered-strict when both sides carry them; an exact-named\n* receiver (`prefix === undefined`) additionally byte-compares\n* `expression`/`where` (both sides are reprints in the supported flow —\n* normalizing would only mask real drift); a wire-named receiver never\n* compares bodies (the wire-name hash already commits to them).\n*\n* `expression`, `where`, and `unique` are genuine SQL-family attributes —\n* functional and partial indexes are standard SQL that any SQL target may\n* introspect, so the family node must represent them; a target declining\n* to author them is a capability decision, not target-specificity.\n*/\nvar SqlIndexIR = class SqlIndexIR extends SqlSchemaIRNode {\n\tnodeKind = RelationalSchemaNodeKind.index;\n\tname;\n\tunique;\n\tconstructor(input) {\n\t\tsuper();\n\t\tconst name = nameOf(input.naming);\n\t\tif (input.columns === void 0 === (input.expression === void 0)) throw new InternalError(`SqlIndexIR \"${name}\": exactly one of columns or expression must be set.`);\n\t\tthis.name = name;\n\t\tthis.unique = input.unique;\n\t\tif (input.naming.kind === \"wire\") this.prefix = input.naming.prefix;\n\t\tif (input.columns !== void 0) this.columns = input.columns;\n\t\tif (input.expression !== void 0) this.expression = input.expression;\n\t\tif (input.where !== void 0) this.where = input.where;\n\t\tconst normalizedType = normalizeIndexType(input.type);\n\t\tif (normalizedType !== void 0) this.type = normalizedType;\n\t\tif (input.options !== void 0) this.options = input.options;\n\t\tif (input.annotations !== void 0) this.annotations = input.annotations;\n\t\tdefineNonEnumerable(this, \"dependsOn\", input.dependsOn);\n\t\tdefineNonEnumerable(this, \"partial\", input.partial);\n\t\tfreezeNode(this);\n\t}\n\tget id() {\n\t\treturn `index:${this.name}`;\n\t}\n\tchildren() {\n\t\treturn [];\n\t}\n\tstatic from(value) {\n\t\treturn value instanceof SqlIndexIR ? value : new SqlIndexIR(value);\n\t}\n\tstatic is(node) {\n\t\treturn node.nodeKind === RelationalSchemaNodeKind.index;\n\t}\n\t/**\n\t* Mode-selected structural equality — see the class doc. Delegates to the\n\t* single node-owned relation: `columns` compare ordered-strict when both\n\t* sides carry them; an exact receiver (`prefix === undefined`)\n\t* byte-compares `expression ?? ''` and `where ?? ''`; a wire-named receiver\n\t* never compares bodies (the wire-name hash already commits to them).\n\t*/\n\tisEqualTo(other) {\n\t\tconst node = blindCast(other);\n\t\tassertNode(node, \"SqlIndexIR\", SqlIndexIR.is);\n\t\treturn this.contentEquals(node, {\n\t\t\tcolumnPresence: \"when-both-defined\",\n\t\t\tbodies: this.prefix !== void 0 ? \"ignored\" : \"verbatim\"\n\t\t});\n\t}\n\t/**\n\t* The single index content-equality relation — every comparer (the differ\n\t* via {@link isEqualTo}, the planner's rename content-pairing) calls this\n\t* with its mode-appropriate strictness rather than growing a parallel\n\t* relation:\n\t*\n\t* - `columnPresence: 'when-both-defined'` (the differ's rule) compares\n\t* the tuples ordered-strict only when both sides carry them — a paired\n\t* node's identity already agreed, so a column node meeting an\n\t* expression node skips the tuple.\n\t* - `columnPresence: 'matching'` (the rename-pairing rule) additionally\n\t* requires presence to agree: a column index never pairs an expression\n\t* index.\n\t* - `bodies: 'verbatim'` byte-compares `expression ?? ''` / `where ?? ''`\n\t* (absent ≡ empty, no normalization — both sides are reprints in the\n\t* supported flow); `bodies: 'ignored'` skips them (wire identity —\n\t* the wire-name hash commits to the content).\n\t*\n\t* `unique` compares strictly; `type` and option VALUES compare through\n\t* the named normalization seams below.\n\t*/\n\tcontentEquals(other, strictness) {\n\t\tconst columnsEqual = strictness.columnPresence === \"matching\" ? this.columns === void 0 === (other.columns === void 0) && (this.columns === void 0 || isArrayEqual(this.columns, other.columns ?? [])) : this.columns === void 0 || other.columns === void 0 || isArrayEqual(this.columns, other.columns);\n\t\tif (!(this.unique === other.unique && normalizeIndexType(this.type) === normalizeIndexType(other.type) && indexOptionsEqual(this.options, other.options) && columnsEqual)) return false;\n\t\tif (strictness.bodies === \"ignored\") return true;\n\t\treturn (this.expression ?? \"\") === (other.expression ?? \"\") && (this.where ?? \"\") === (other.where ?? \"\");\n\t}\n};\n/**\n* The btree-default normalization seam: the default access method (`btree`\n* in every supported SQL target) normalizes to absent. Applied at\n* construction — every derivation path (contract tree, introspection, flat\n* family tree) builds through the class, so both compare sides are\n* symmetric by definition — and again inside\n* {@link SqlIndexIR.contentEquals} so the relation holds for any input.\n* The contract JSON and the wire-name content hash keep the authored\n* spelling: `@@index([a], type: \"btree\")` and `@@index([a])` are distinct\n* wire names — but content-equal after normalization, so a spelling change\n* between them converges as a rename via the planner's content\n* pairing (the hashes differ, so hash pairing never pairs them).\n*/\nfunction normalizeIndexType(type) {\n\treturn type === \"btree\" ? void 0 : type;\n}\n/**\n* Option-bag equality: same key set, values compared through\n* {@link normalizeIndexOptionValue} — Postgres introspection returns\n* reloptions values as catalog-reprint strings (`'70'`, `'on'`) while\n* contract option leaves are typed (number, boolean, string).\n*/\nfunction indexOptionsEqual(a, b) {\n\tconst aKeys = a ? Object.keys(a).sort() : [];\n\tconst bKeys = b ? Object.keys(b).sort() : [];\n\tif (aKeys.length !== bKeys.length) return false;\n\tfor (let i = 0; i < aKeys.length; i += 1) if (aKeys[i] !== bKeys[i]) return false;\n\tif (aKeys.length === 0) return true;\n\tfor (const key of aKeys) if (normalizeIndexOptionValue(a?.[key]) !== normalizeIndexOptionValue(b?.[key])) return false;\n\treturn true;\n}\n//#endregion\n//#region src/ir/sql-unique-ir.ts\n/**\n* Schema IR node for a table-level unique constraint as observed by\n* introspection.\n*\n* Implements `DiffableNode` so a unique constraint is directly a table's\n* diff-tree child. Unique constraints are frequently unnamed, so `id` is\n* derived from the column tuple rather than `name` — the column tuple is\n* also what makes two unique constraints the same constraint, so it doubles\n* as the pairing key. There are no further attributes to compare once\n* columns are equal (the differ pairs on `id`), so `isEqualTo` is identity.\n*/\nvar SqlUniqueIR = class SqlUniqueIR extends SqlSchemaIRNode {\n\tnodeKind = RelationalSchemaNodeKind.unique;\n\tcolumns;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.columns = [...input.columns];\n\t\tif (input.name !== void 0) this.name = input.name;\n\t\tif (input.annotations !== void 0) this.annotations = input.annotations;\n\t\tdefineNonEnumerable(this, \"dependsOn\", input.dependsOn);\n\t\tfreezeNode(this);\n\t}\n\tget id() {\n\t\treturn `unique:${this.columns.join(\",\")}`;\n\t}\n\tchildren() {\n\t\treturn [];\n\t}\n\tstatic is(node) {\n\t\treturn node.nodeKind === RelationalSchemaNodeKind.unique;\n\t}\n\tisEqualTo(other) {\n\t\tconst node = blindCast(other);\n\t\tassertNode(node, \"SqlUniqueIR\", SqlUniqueIR.is);\n\t\treturn this.id === node.id;\n\t}\n};\n//#endregion\n//#region src/ir/sql-table-ir.ts\n/**\n* Schema IR node for a single table as observed by introspection.\n*\n* Unlike the Contract IR `StorageTable`, this carries the table's\n* `name` — introspection queries return tables as arrays and the\n* verifier keys them into `SqlSchemaIR.tables` afterwards, so the name\n* stays on the table object for downstream call sites that walk\n* `Object.values(schema.tables)`.\n*\n* The constructor normalises nested IR-class fields so downstream\n* walks see a uniform AST regardless of whether the input was a\n* plain-data literal (from introspection) or already-constructed\n* class instances.\n*\n* Implements `DiffableNode` so a flat (single-schema) tree is directly\n* diffable: `id` is the table name; `isEqualTo` is identity (the table's\n* structural drift is entirely expressed by its children); `children()`\n* yields every column, the primary key (when present), every foreign key,\n* unique, index, and check constraint — the same composition and order as\n* the Postgres table node, minus policies.\n*/\nvar SqlTableIR = class extends SqlSchemaIRNode {\n\tnodeKind = RelationalSchemaNodeKind.table;\n\tname;\n\tcolumns;\n\tforeignKeys;\n\tuniques;\n\tindexes;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.name = input.name;\n\t\tthis.columns = Object.freeze(Object.fromEntries(Object.entries(input.columns).map(([key, col]) => [key, col instanceof SqlColumnIR ? col : new SqlColumnIR(col)])));\n\t\tthis.foreignKeys = Object.freeze(input.foreignKeys.map((fk) => fk instanceof SqlForeignKeyIR ? fk : new SqlForeignKeyIR(fk)));\n\t\tthis.uniques = Object.freeze(input.uniques.map((u) => u instanceof SqlUniqueIR ? u : new SqlUniqueIR(u)));\n\t\tthis.indexes = Object.freeze(input.indexes.map(SqlIndexIR.from));\n\t\tif (input.primaryKey !== void 0) this.primaryKey = PrimaryKey.from(input.primaryKey);\n\t\tif (input.annotations !== void 0) this.annotations = input.annotations;\n\t\tif (input.checks !== void 0 && input.checks.length > 0) this.checks = Object.freeze(input.checks.map(SqlCheckConstraintIR.from));\n\t\tfreezeNode(this);\n\t}\n\tget id() {\n\t\treturn this.name;\n\t}\n\tisEqualTo(other) {\n\t\treturn this.id === other.id;\n\t}\n\tchildren() {\n\t\treturn [\n\t\t\t...Object.values(this.columns),\n\t\t\t...this.primaryKey ? [this.primaryKey] : [],\n\t\t\t...this.foreignKeys,\n\t\t\t...this.uniques,\n\t\t\t...this.indexes,\n\t\t\t...this.checks ?? []\n\t\t];\n\t}\n};\n//#endregion\n//#region src/ir/sql-schema-ir.ts\n/**\n* Root Schema IR node representing the complete database schema as\n* observed by introspection. Target-agnostic; used by both verifiers\n* (compare against intended Contract storage) and migration planners\n* (derive operations needed to reconcile).\n*\n* The constructor normalises nested `SqlTableIR` instances so\n* downstream walks see a uniform AST regardless of whether the input\n* was a plain-data literal or already-constructed class instances.\n*\n* Implements `DiffableNode` as the root of a flat (single-schema) diff\n* tree: `id` is the fixed sentinel `'database'` (roots have no siblings),\n* `isEqualTo` is identity (a container has no own attributes), and\n* `children()` yields the table nodes.\n*/\nvar SqlSchemaIR = class extends SqlSchemaIRNode {\n\tnodeKind = RelationalSchemaNodeKind.schema;\n\ttables;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.tables = Object.freeze(Object.fromEntries(Object.entries(input.tables).map(([key, t]) => [key, t instanceof SqlTableIR ? t : new SqlTableIR(t)])));\n\t\tif (input.annotations !== void 0) this.annotations = input.annotations;\n\t\tfreezeNode(this);\n\t}\n\tget id() {\n\t\treturn \"database\";\n\t}\n\tisEqualTo(other) {\n\t\treturn this.id === other.id;\n\t}\n\tchildren() {\n\t\treturn Object.values(this.tables);\n\t}\n};\n//#endregion\nexport { SqlForeignKeyIR as a, SqlCheckConstraintIR as c, assertNode as d, defineNonEnumerable as f, relationalNodeGranularity as h, SqlIndexIR as i, PrimaryKey as l, relationalNodeEntityKind as m, SqlTableIR as n, SqlColumnIR as o, RelationalSchemaNodeKind as p, SqlUniqueIR as r, SqlColumnDefaultIR as s, SqlSchemaIR as t, SqlSchemaIRNode as u };\n\n//# sourceMappingURL=types-4YenawkP.mjs.map"],"mappings":";;;;;;;;;;;;;;;AAeA,MAAM,2BAA2B;CAChC,QAAQ;CACR,OAAO;CACP,QAAQ;CACR,eAAe;CACf,YAAY;CACZ,YAAY;CACZ,QAAQ;CACR,OAAO;CACP,OAAO;AACR;;;;;;;;;;;AAWA,MAAM,8BAA8B;EAClC,yBAAyB,SAAS;EAClC,yBAAyB,QAAQ;EACjC,yBAAyB,SAAS;EAClC,yBAAyB,gBAAgB;EACzC,yBAAyB,aAAa;EACtC,yBAAyB,aAAa;EACtC,yBAAyB,SAAS;EAClC,yBAAyB,QAAQ;EACjC,yBAAyB,QAAQ;AACnC;AACA,SAAS,2BAA2B,UAAU;CAC7C,OAAO,OAAO,OAAO,6BAA6B,QAAQ;AAC3D;;;;;;;AAOA,SAAS,0BAA0B,UAAU;CAC5C,IAAI,CAAC,2BAA2B,QAAQ,GAAG,MAAM,IAAI,cAAc,iEAAiE,SAAS,EAAE;CAC/I,OAAO,4BAA4B;AACpC;;;;;;;;AAQA,MAAM,8BAA8B,GAAG,yBAAyB,QAAQ,QAAQ;;;;;;;;AAQhF,SAAS,yBAAyB,UAAU;CAC3C,OAAO,2BAA2B,QAAQ,IAAI,4BAA4B,YAAY,KAAK;AAC5F;;;;;;;;;;;;;;;;;;;;;;AAwBA,IAAI,kBAAkB,cAAc,WAAW;C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C,CAAC,CAAC,CAAC,CAAC;EACtJ,IAAI,MAAM,gBAAgB,KAAK,GAAG,KAAK,cAAc,MAAM;EAC3D,WAAW,IAAI;CAChB;CACA,IAAI,KAAK;EACR,OAAO;CACR;CACA,UAAU,OAAO;EAChB,OAAO,KAAK,OAAO,MAAM;CAC1B;CACA,WAAW;EACV,OAAO,OAAO,OAAO,KAAK,MAAM;CACjC;AACD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "./types-CyxGtOOh-BggSa6Fe.mjs";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types-CUsJrvEl.mjs","names":[],"sources":["../../../../2-sql/1-core/contract/dist/types.mjs"],"sourcesContent":["import { a as ForeignKey, c as CheckConstraint, i as PrimaryKey, l as SqlNode, n as UniqueConstraint, o as ForeignKeyReference, r as StorageColumn, s as Index, t as StorageTable } from \"./storage-table-ZzbR-xzQ.mjs\";\nimport { i as isStorageValueSet, n as checkConstraintInputFromSerialized, r as StorageValueSet, t as indexInputFromSerialized } from \"./serialized-index-nBTwanKy.mjs\";\nimport { NamespaceBase, freezeNode, isPlainRecord } from \"@internal/framework-components/ir\";\nimport { InternalError } from \"@internal/utils/internal-error\";\n//#region src/ir/storage-type-instance.ts\n/**\n* Sentinel kind for the legacy codec-triple shape persisted under\n* `SqlStorage.types`. Plain JSON-clean object literals carry this\n* discriminator so the polymorphic slot dispatch can route them down\n* the codec path while target-specific IR class instances (e.g. the\n* Postgres enum class) keep their own narrower `kind` literal.\n*/\nconst CODEC_INSTANCE_KIND = \"codec-instance\";\n/**\n* Stamp the codec-instance `kind` discriminator on a caller-supplied\n* codec triple. Idempotent: input that already carries the discriminator\n* passes through unchanged. Missing `typeParams` is normalised to `{}`.\n*/\nfunction toStorageTypeInstance(input) {\n\treturn {\n\t\tkind: CODEC_INSTANCE_KIND,\n\t\tcodecId: input.codecId,\n\t\tnativeType: input.nativeType,\n\t\ttypeParams: input.typeParams ?? {}\n\t};\n}\n/**\n* Type-guard for codec-typed entries on the polymorphic\n* `SqlStorage.types` slot. Distinguishes `StorageTypeInstance` from\n* any class-instance kinds a target pack contributes.\n*/\nfunction isStorageTypeInstance(value) {\n\tif (typeof value !== \"object\" || value === null) return false;\n\treturn value.kind === CODEC_INSTANCE_KIND;\n}\n//#endregion\n//#region src/ir/sql-storage.ts\n/**\n* Narrows framework `AuthoringContributions` to the SQL-family shape by testing\n* for the SQL-specific `createNamespace` capability.\n*/\nfunction isSqlAuthoringContributions(authoring) {\n\tif (authoring === void 0 || !Object.hasOwn(authoring, \"createNamespace\")) return false;\n\treturn typeof Reflect.get(authoring, \"createNamespace\") === \"function\";\n}\n/**\n* Abstract SQL family namespace base class. Target concretions (`PostgresSchema`,\n* `SqliteDatabase`, …) extend this — it is never instantiated directly.\n* `entries` is the open ADR 224 dictionary: `entries[entityKind][entityName]`\n* addresses any entity.\n*/\nvar SqlNamespaceBase = class extends NamespaceBase {};\n/**\n* Realm-safe guard for hydrated `SqlNamespaceBase` concretions. Checks\n* `qualifyTable` structurally instead of `instanceof NamespaceBase`, so it\n* survives duplicate-module boundaries (e.g. dist e2e where the target and\n* the family carry separate copies of `@internal/framework-components`).\n*\n* Every concrete `SqlNamespaceBase` subclass (`PostgresSchema`, `SqliteDatabase`,\n* `TestSqlNamespace`, …) implements `qualifyTable`. Raw `SqlNamespaceInput`\n* objects (`{ id, entries }`) do not.\n*/\nfunction isMaterializedSqlNamespace(x) {\n\tif (typeof x !== \"object\" || x === null || !(\"qualifyTable\" in x)) return false;\n\treturn typeof x.qualifyTable === \"function\";\n}\nvar SqlStorage = class extends SqlNode {\n\tstorageHash;\n\tnamespaces;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.storageHash = input.storageHash;\n\t\tthis.namespaces = Object.freeze(input.namespaces);\n\t\tif (input.types !== void 0) this.types = Object.freeze(Object.fromEntries(Object.entries(input.types).map(([name, ti]) => [name, normaliseTypeEntry(name, ti)])));\n\t\tfreezeNode(this);\n\t}\n};\n/**\n* Strict polymorphic-slot dispatch for `SqlStorage.types` entries.\n* Every entry must carry a `kind: 'codec-instance'` discriminator or\n* be an already-constructed `StorageTypeInstance`. Untagged or\n* unrecognised inputs throw a diagnostic naming the entry and its\n* `kind`, so format drift surfaces loudly at the deserializer\n* boundary instead of slipping past the seam and corrupting\n* downstream IR walks.\n*\n* Codec-triple authors that have an untagged shape on hand can call\n* `toStorageTypeInstance(...)` (which stamps the `'codec-instance'`\n* discriminator) before constructing `SqlStorage`. On-disk reads\n* cross `familyInstance.deserializeContract` first; the structural\n* arktype schema rejects untagged entries earlier, so this throw\n* only fires for in-memory authoring bugs.\n*/\nfunction normaliseTypeEntry(name, entry) {\n\tif (isStorageTypeInstance(entry)) {\n\t\tif (\"typeParams\" in entry) return entry;\n\t\treturn toStorageTypeInstance(entry);\n\t}\n\tconst rawKind = isPlainRecord(entry) ? entry[\"kind\"] : void 0;\n\tconst kindDescription = rawKind === void 0 ? \"missing `kind` discriminator\" : `unrecognised \\`kind\\` discriminator ${JSON.stringify(rawKind)}`;\n\tthrow new InternalError(`storage.types[${JSON.stringify(name)}] has ${kindDescription}; expected ${JSON.stringify(\"codec-instance\")}. Untagged codec triples should be wrapped with toStorageTypeInstance(...) before construction.`);\n}\n//#endregion\n//#region src/types.ts\nconst DEFAULT_FK_CONSTRAINT = true;\nconst DEFAULT_FK_INDEX = true;\nfunction applyFkDefaults(fk, overrideDefaults) {\n\treturn {\n\t\tconstraint: fk.constraint ?? overrideDefaults?.constraint ?? true,\n\t\tindex: fk.index ?? overrideDefaults?.index ?? true\n\t};\n}\n//#endregion\nexport { CODEC_INSTANCE_KIND, CheckConstraint, DEFAULT_FK_CONSTRAINT, DEFAULT_FK_INDEX, ForeignKey, ForeignKeyReference, Index, PrimaryKey, SqlNamespaceBase, SqlNode, SqlStorage, StorageColumn, StorageTable, StorageValueSet, UniqueConstraint, applyFkDefaults, checkConstraintInputFromSerialized, indexInputFromSerialized, isMaterializedSqlNamespace, isSqlAuthoringContribut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U,cAAc,KAAK,IAAI,MAAM,UAAU,KAAK;CAC5D,MAAM,kBAAkB,YAAY,KAAK,IAAI,iCAAiC,uCAAuC,KAAK,UAAU,OAAO;CAC3I,MAAM,IAAI,cAAc,iBAAiB,KAAK,UAAU,IAAI,EAAE,QAAQ,gBAAgB,aAAa,KAAK,UAAU,gBAAgB,EAAE,gGAAgG;AACrO;AAGA,MAAM,wBAAwB;AAC9B,MAAM,mBAAmB;AACzB,SAAS,gBAAgB,IAAI,kBAAkB;CAC9C,OAAO;EACN,YAAY,GAAG,cAAc,kBAAkB,cAAc;EAC7D,OAAO,GAAG,SAAS,kBAAkB,SAAS;CAC/C;AACD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types-UcHa2cTe.d.mts","names":[],"sources":["../../../../2-sql/1-core/contract/dist/types.d.mts"],"mappings":";;;;;;;;;;;;KAWK,mBAAmB,KAAK,qBAAqB,iDAAiD,cAAc,mBAAmB,2BAA2B,IAAI,gBAAgB,wBAAwB,IAAI,QAAQ,IAAI,MAAM;KAC5N,kCAAkC,KAAK,0BAA0B,gCAAgC,YAAY,MAAM,wBAAwB,IAAI,MAAM,yBAAyB,IAAI,IAAI,aAAa,IAAI,IAAI,WAAW,qCAAqC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"validators-Belo8QqM.d.mts","names":[],"sources":["../../../../2-sql/1-core/contract/dist/validators.d.mts"],"mappings":";;;;;;;;;KAQK;WACM;WACA,mCAAmC;;KAEzC;WACM;WACA;;cAEG,0EAA0E,WAAW;cACrF,2EAA2E,WAAW;cACtF,mEAAmE,WAAW,uBAAuB;;;;;;cAMrG,qEAAqE;EACjF;EACA,8CAA8C;;cAElC,2DAA2D;EACvE;EACA;EACA;EACA;EACA;EACA;EACA;EACA,UAAU;;cAEE,yEAAyE;EACrF;EACA;EACA;EACA;;cAEY,sEAAsE;EAClF;EACA;EACA;;cAEY,uEAAuE,WAAW;cAClF,gEAAgE,WAAW;cAC3E,qEAAqE;EACjF;EACA;EACA;;cAEY,kEAAkE;EAC9E;KACG;MACC;MACA;MACA;MACA;MACA,aAAa;MACb;MACA,UAAU,uBAAuB;MACjC;MACA;QACE;QACA;QACA;QACA;QACA;;MAEF;;;EAGJ,kBAAkB;EAClB;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA,UAAU;;EAEZ,sBAAsB;EACtB,aAAa;EACb;EACA;IACE;IACA;IACA;;;;;;;;;cASU,kEAAkE;EAC9E;EACA;IACE;IACA,+CAA+C;;;;;;;;;;;iBAWlC,2BAA2B,OAAO,oBAAoB,2BAA2B;;;;;;;iBAOjF,uBAAuB,OAAO,oBAAoB,2BAA2B;;;;;;iBAM7E,wBAAwB,OAAO,oBAAoB,2BAA2B;;;;;;;;;;iBAU9E,gBAAgB;iBAChB,cAAc;;;;;;;;;;;;;;iBAcd,yBAAyB,SAAS;;;;;;;iBAOlC,+BAA+B,UAAU,SAAS;;;;;;;iBAOlD,8BAA8B,UAAU,SAAS;UACxD;;;;;;;;;WASC,iBAAiB;;;;;;;;;;iBAUX,yBAAyB,UAAU,SAAS,aAAa,gBAAgB,UAAU,kCAAkC"}
|