@prisma/orm-target-postgres 8.0.0-rc.21-dev.12 → 8.0.0-rc.21-dev.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{adapter-t3IEEEbY-BKJyNGtz.mjs → adapter-DJoHcCZV-CWdrs4yI.mjs} +3 -3
- package/dist/{adapter-t3IEEEbY-BKJyNGtz.mjs.map → adapter-DJoHcCZV-CWdrs4yI.mjs.map} +1 -1
- package/dist/{adapter-BdL6nOY0.d.mts → adapter-Dz86ldS1.d.mts} +14 -14
- package/dist/{adapter-BdL6nOY0.d.mts.map → adapter-Dz86ldS1.d.mts.map} +1 -1
- package/dist/adapter.d.mts +7 -7
- package/dist/adapter.mjs +2 -2
- package/dist/adapter__adapter.d.mts +1 -1
- package/dist/adapter__adapter.mjs +2 -2
- package/dist/adapter__control.d.mts +1 -1
- package/dist/adapter__control.mjs +2 -2
- package/dist/adapter__control.mjs.map +1 -1
- package/dist/adapter__runtime.d.mts +1 -1
- package/dist/adapter__runtime.mjs +2 -2
- package/dist/adapter__runtime.mjs.map +1 -1
- package/dist/adapter__sql-renderer.d.mts +1 -1
- package/dist/adapter__types.d.mts +3 -3
- package/dist/{aggregates-CCEULCRK.d.mts → aggregates-CJGvlOCM.d.mts} +12 -12
- package/dist/{aggregates-CCEULCRK.d.mts.map → aggregates-CJGvlOCM.d.mts.map} +1 -1
- package/dist/{authoring-D7EAP1iG-DlpkOeVt.mjs → authoring-BFb5LVsK-CkHmM-aP.mjs} +50 -3
- package/dist/authoring-BFb5LVsK-CkHmM-aP.mjs.map +1 -0
- package/dist/{authoring-DWd5pnnV-BBX7P1wT.d.mts → authoring-BRqyCnBa-CAzlQNHw.d.mts} +5 -4
- package/dist/{authoring-DWd5pnnV-BBX7P1wT.d.mts.map → authoring-BRqyCnBa-CAzlQNHw.d.mts.map} +1 -1
- package/dist/{contract-contributions-CbLCF8jV-BOZHg83r.mjs → contract-contributions-DS1YZqxl-CipEzWQj.mjs} +17 -5
- package/dist/contract-contributions-DS1YZqxl-CipEzWQj.mjs.map +1 -0
- package/dist/{contract-free-B6-wuc6M.d.mts → contract-free-DcaYH2c5.d.mts} +6 -2
- package/dist/contract-free-DcaYH2c5.d.mts.map +1 -0
- package/dist/{contract-free-DtJ1gJxN.mjs → contract-free-DmNEp1_Y.mjs} +3 -3
- package/dist/contract-free-DmNEp1_Y.mjs.map +1 -0
- package/dist/{control-DKpIWFg_.d.mts → control-2DHRXqEz.d.mts} +5 -3
- package/dist/{control-DKpIWFg_.d.mts.map → control-2DHRXqEz.d.mts.map} +1 -1
- package/dist/{control-policy-DZzwyc3L-_Bf4iEaW.mjs → control-policy-DYDR6FhY-CPBeYqu5.mjs} +45 -10
- package/dist/control-policy-DYDR6FhY-CPBeYqu5.mjs.map +1 -0
- package/dist/{ddl-URS0VlHr--s2jpN6c.mjs → ddl-qu-IzeH4-CFpSpY0X.mjs} +11 -4
- package/dist/ddl-qu-IzeH4-CFpSpY0X.mjs.map +1 -0
- package/dist/{descriptor-meta-BPjw5dIw-DSlWgzbV.mjs → descriptor-meta-5gncreHF-BD1kpxJu.mjs} +3 -3
- package/dist/{descriptor-meta-BPjw5dIw-DSlWgzbV.mjs.map → descriptor-meta-5gncreHF-BD1kpxJu.mjs.map} +1 -1
- package/dist/{descriptor-meta-DokyxrzY-D2S-BLI0.mjs → descriptor-meta-CszCf4Hs-DVGeuxNv.mjs} +4 -4
- package/dist/{descriptor-meta-DokyxrzY-D2S-BLI0.mjs.map → descriptor-meta-CszCf4Hs-DVGeuxNv.mjs.map} +1 -1
- package/dist/{diff-database-schema-BxzhZaVN.d.mts → diff-database-schema-COp7SqEI.d.mts} +5 -3
- package/dist/{diff-database-schema-BxzhZaVN.d.mts.map → diff-database-schema-COp7SqEI.d.mts.map} +1 -1
- package/dist/{diff-database-schema-DrOE5ahI-BfrNtMDu.mjs → diff-database-schema-DyoCp8VS-BKtXp-eB.mjs} +30 -8
- package/dist/diff-database-schema-DyoCp8VS-BKtXp-eB.mjs.map +1 -0
- package/dist/{infer-psl-contract-Du026CJo-sRmqBsId.mjs → infer-psl-contract-BP2DgxTx-BqV8gUu4.mjs} +45 -6
- package/dist/infer-psl-contract-BP2DgxTx-BqV8gUu4.mjs.map +1 -0
- package/dist/{issue-planner-BLiMn8iP.d.mts → issue-planner-BUo9S9Ge.d.mts} +3 -3
- package/dist/{issue-planner-BLiMn8iP.d.mts.map → issue-planner-BUo9S9Ge.d.mts.map} +1 -1
- package/dist/migration-Be_iuIpn.mjs.map +1 -1
- package/dist/{migration-cnT6b-9x.d.mts → migration-Drs_EeiM.d.mts} +10 -3
- package/dist/migration-Drs_EeiM.d.mts.map +1 -0
- package/dist/op-factory-call-D2HXLJQJ.d.mts +1 -0
- package/dist/{op-factory-call-DsQATX-o-BHcqPXrs.mjs → op-factory-call-DyQO1ZdB-CnbOJIf8.mjs} +115 -20
- package/dist/op-factory-call-DyQO1ZdB-CnbOJIf8.mjs.map +1 -0
- package/dist/{op-factory-call-DeaoFqMW-XAP00c7U.d.mts → op-factory-call-L1gqYhhk-DMnspvjf.d.mts} +30 -6
- package/dist/{op-factory-call-DeaoFqMW-XAP00c7U.d.mts.map → op-factory-call-L1gqYhhk-DMnspvjf.d.mts.map} +1 -1
- package/dist/{pack-CjVhjxir.d.mts → pack-CLpRLkRQ.d.mts} +27 -4
- package/dist/{pack-CjVhjxir.d.mts.map → pack-CLpRLkRQ.d.mts.map} +1 -1
- package/dist/{planner-RW8za3Vm.d.mts → planner-Bl3kIyMG.d.mts} +4 -4
- package/dist/{planner-RW8za3Vm.d.mts.map → planner-Bl3kIyMG.d.mts.map} +1 -1
- package/dist/{planner-CNoNH9bo-3g7WX476.mjs → planner-D1mzh6Cb-B1Z2YTiQ.mjs} +19 -13
- package/dist/planner-D1mzh6Cb-B1Z2YTiQ.mjs.map +1 -0
- package/dist/{planner-produced-postgres-migration-DnAk6KxF-Vj31eyEf.mjs → planner-produced-postgres-migration-Cw8gbwED-tyj9TLlB.mjs} +4 -4
- package/dist/{planner-produced-postgres-migration-DnAk6KxF-Vj31eyEf.mjs.map → planner-produced-postgres-migration-Cw8gbwED-tyj9TLlB.mjs.map} +1 -1
- package/dist/{planner-produced-postgres-migration-DtjZyo7p-CQxcHWwC.d.mts → planner-produced-postgres-migration-Cx9bERx3-DRNnR16E.d.mts} +3 -3
- package/dist/planner-produced-postgres-migration-Cx9bERx3-DRNnR16E.d.mts.map +1 -0
- package/dist/planner-produced-postgres-migration-DRPVY4iL.d.mts +1 -0
- package/dist/{planner-sql-checks-CvI80tt0-B5bKCucD.mjs → planner-sql-checks-FU4T7wgu-C-tIJOH-.mjs} +3 -3
- package/dist/{planner-sql-checks-CvI80tt0-B5bKCucD.mjs.map → planner-sql-checks-FU4T7wgu-C-tIJOH-.mjs.map} +1 -1
- package/dist/{postgres-contract-view-CRy_3BMc-60fosJRZ.mjs → postgres-contract-view-iwNgaXQw-QzVSakJT.mjs} +30 -4
- package/dist/postgres-contract-view-iwNgaXQw-QzVSakJT.mjs.map +1 -0
- package/dist/{postgres-database-schema-node-Cv8usVNX-BmvGozi4.d.mts → postgres-database-schema-node-BjmJ6_Cs-LyZ0n9oj.d.mts} +33 -5
- package/dist/postgres-database-schema-node-BjmJ6_Cs-LyZ0n9oj.d.mts.map +1 -0
- package/dist/{postgres-migration-CSU_fUlQ-C5TNpgq4.mjs → postgres-migration-BhijSOgq-CP_oflub.mjs} +29 -11
- package/dist/postgres-migration-BhijSOgq-CP_oflub.mjs.map +1 -0
- package/dist/{postgres-migration-CDPlleMc-B4JQjDcN.d.mts → postgres-migration-DNnmFBsR-BJU9865a.d.mts} +19 -2
- package/dist/{postgres-migration-CDPlleMc-B4JQjDcN.d.mts.map → postgres-migration-DNnmFBsR-BJU9865a.d.mts.map} +1 -1
- package/dist/{postgres-role-schema-node-B8Z5i5D--BzOKm4N1.mjs → postgres-role-schema-node-DuljIQWp-D6Q5JyEs.mjs} +12 -5
- package/dist/postgres-role-schema-node-DuljIQWp-D6Q5JyEs.mjs.map +1 -0
- package/dist/{postgres-schema-osNZNX0D-BpKJDg4M.mjs → postgres-schema-BBWgs4fX-DWdYxNi8.mjs} +35 -4
- package/dist/postgres-schema-BBWgs4fX-DWdYxNi8.mjs.map +1 -0
- package/dist/{postgres-schema-Xsjt3RKO-bis-SVSB.d.mts → postgres-schema-CJvUnBU9-Bvn7zbr1.d.mts} +21 -3
- package/dist/postgres-schema-CJvUnBU9-Bvn7zbr1.d.mts.map +1 -0
- package/dist/{postgres-table-schema-node-BBkitBQh-Dll8iaZT.mjs → postgres-table-schema-node-nY6II-Uv-Bj-lgmSi.mjs} +50 -6
- package/dist/postgres-table-schema-node-nY6II-Uv-Bj-lgmSi.mjs.map +1 -0
- package/dist/{prisma7-binding-DiHnmsNq.d.mts → prisma7-binding-BFypqPE0.d.mts} +48 -4
- package/dist/{prisma7-binding-DiHnmsNq.d.mts.map → prisma7-binding-BFypqPE0.d.mts.map} +1 -1
- package/dist/{prisma7-binding-CPcA6N3v.mjs → prisma7-binding-DWW3L3C4.mjs} +26 -5
- package/dist/{prisma7-binding-CPcA6N3v.mjs.map → prisma7-binding-DWW3L3C4.mjs.map} +1 -1
- package/dist/{render-ops-Cj7mog0v-DPzODjA0.mjs → render-ops-5VMQY7FM-Cdil7oOP.mjs} +3 -3
- package/dist/{render-ops-Cj7mog0v-DPzODjA0.mjs.map → render-ops-5VMQY7FM-Cdil7oOP.mjs.map} +1 -1
- package/dist/{resolve-ddl-schema-uDXEVepU-COWNfVPC.mjs → resolve-ddl-schema-BZzteXH1-C57Iavtu.mjs} +3 -3
- package/dist/{resolve-ddl-schema-uDXEVepU-COWNfVPC.mjs.map → resolve-ddl-schema-BZzteXH1-C57Iavtu.mjs.map} +1 -1
- package/dist/{runtime-DMle_B4T.d.mts → runtime-BJetnmVm.d.mts} +2 -1
- package/dist/runtime-BJetnmVm.d.mts.map +1 -0
- package/dist/{runtime-R_BCXCp_.d.mts → runtime-K2strEv6.d.mts} +3 -3
- package/dist/{runtime-R_BCXCp_.d.mts.map → runtime-K2strEv6.d.mts.map} +1 -1
- package/dist/{schema-node-kinds-C52Bb1ve-DmxQRPPS.d.mts → schema-node-kinds-Baf4tcly-CI3SyVG4.d.mts} +3 -2
- package/dist/schema-node-kinds-Baf4tcly-CI3SyVG4.d.mts.map +1 -0
- package/dist/{sql-renderer-BnO2fkSf.d.mts → sql-renderer-PT6pQ66O.d.mts} +3 -3
- package/dist/{sql-renderer-BnO2fkSf.d.mts.map → sql-renderer-PT6pQ66O.d.mts.map} +1 -1
- package/dist/target.d.mts +19 -19
- package/dist/target.mjs +18 -18
- package/dist/target__aggregates.d.mts +1 -1
- package/dist/target__contract-free.d.mts +2 -2
- package/dist/target__contract-free.mjs +4 -4
- package/dist/target__control.mjs +44 -18
- package/dist/target__control.mjs.map +1 -1
- package/dist/target__diff-database-schema.d.mts +1 -1
- package/dist/target__diff-database-schema.mjs +1 -1
- package/dist/target__issue-planner.d.mts +1 -1
- package/dist/target__issue-planner.mjs +1 -1
- package/dist/target__migration.d.mts +2 -2
- package/dist/target__migration.mjs +2 -2
- package/dist/target__op-factory-call.d.mts +3 -3
- package/dist/target__op-factory-call.mjs +2 -2
- package/dist/target__pack.d.mts +1 -1
- package/dist/target__pack.mjs +1 -1
- package/dist/target__planner-produced-postgres-migration.d.mts +2 -2
- package/dist/target__planner-produced-postgres-migration.mjs +1 -1
- package/dist/target__planner-sql-checks.mjs +1 -1
- package/dist/target__planner.d.mts +1 -1
- package/dist/target__planner.mjs +2 -2
- package/dist/target__prisma7-binding.d.mts +1 -1
- package/dist/target__prisma7-binding.mjs +1 -1
- package/dist/target__render-ops.mjs +1 -1
- package/dist/target__runtime.d.mts +1 -1
- package/dist/target__runtime.mjs +1 -1
- package/dist/target__runtime.mjs.map +1 -1
- package/dist/target__schema-ir-annotations.mjs +1 -1
- package/dist/target__types.d.mts +5 -5
- package/dist/target__types.mjs +4 -4
- package/dist/{types-D6lgKhE5-BrgAgVCq.d.mts → types-D6lgKhE5-DVHMZPbP.d.mts} +2 -2
- package/dist/{types-D6lgKhE5-BrgAgVCq.d.mts.map → types-D6lgKhE5-DVHMZPbP.d.mts.map} +1 -1
- package/dist/{types-D-U10Lyo.d.mts → types-D6p1198n.d.mts} +4 -4
- package/dist/{types-D-U10Lyo.d.mts.map → types-D6p1198n.d.mts.map} +1 -1
- package/dist/types-oaZIR8i0.d.mts +2 -0
- package/package.json +9 -9
- package/dist/authoring-D7EAP1iG-DlpkOeVt.mjs.map +0 -1
- package/dist/contract-contributions-CbLCF8jV-BOZHg83r.mjs.map +0 -1
- package/dist/contract-free-B6-wuc6M.d.mts.map +0 -1
- package/dist/contract-free-DtJ1gJxN.mjs.map +0 -1
- package/dist/control-policy-DZzwyc3L-_Bf4iEaW.mjs.map +0 -1
- package/dist/ddl-URS0VlHr--s2jpN6c.mjs.map +0 -1
- package/dist/diff-database-schema-DrOE5ahI-BfrNtMDu.mjs.map +0 -1
- package/dist/infer-psl-contract-Du026CJo-sRmqBsId.mjs.map +0 -1
- package/dist/migration-cnT6b-9x.d.mts.map +0 -1
- package/dist/op-factory-call-D9O6cXRE.d.mts +0 -1
- package/dist/op-factory-call-DsQATX-o-BHcqPXrs.mjs.map +0 -1
- package/dist/planner-CNoNH9bo-3g7WX476.mjs.map +0 -1
- package/dist/planner-produced-postgres-migration-DtjZyo7p-CQxcHWwC.d.mts.map +0 -1
- package/dist/planner-produced-postgres-migration-JI4uclWQ.d.mts +0 -1
- package/dist/postgres-contract-view-CRy_3BMc-60fosJRZ.mjs.map +0 -1
- package/dist/postgres-database-schema-node-Cv8usVNX-BmvGozi4.d.mts.map +0 -1
- package/dist/postgres-migration-CSU_fUlQ-C5TNpgq4.mjs.map +0 -1
- package/dist/postgres-role-schema-node-B8Z5i5D--BzOKm4N1.mjs.map +0 -1
- package/dist/postgres-schema-Xsjt3RKO-bis-SVSB.d.mts.map +0 -1
- package/dist/postgres-schema-osNZNX0D-BpKJDg4M.mjs.map +0 -1
- package/dist/postgres-table-schema-node-BBkitBQh-Dll8iaZT.mjs.map +0 -1
- package/dist/runtime-DMle_B4T.d.mts.map +0 -1
- package/dist/schema-node-kinds-C52Bb1ve-DmxQRPPS.d.mts.map +0 -1
- package/dist/types-DNbQLBpx.d.mts +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postgres-migration-
|
|
1
|
+
{"version":3,"file":"postgres-migration-DNnmFBsR-BJU9865a.d.mts","names":[],"sources":["../../../../3-targets/postgres/1-target/dist/postgres-migration-DNnmFBsR.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBA0CuB,kBAAkB,cAAc,SAAS,cAAc,SAAS,aAAa,YAAY,SAAS,cAAc,SAAS,qBAAqB,UAAU,uCAAuC,OAAO;;WAElN;;;;;;;qBAOU,gBAAgB;EACnC,YAAY,QAAQ;UACZ;;UAEA;UACA;;;;;;UAMA;;;;;;MAMJ,eAAe,qBAAqB;;;;;MAKpC,iBAAiB,qBAAqB;;;;;;YAMhC,cAAc,kBAAkB,SAAS,aAAa,UAAU,WAAW,cAAc,SAAS,uBAAuB,QAAQ,0BAA0B;;;;;;YAM3J,YAAY;aACX;aACA;aACA;aACA,kBAAkB;aAClB,uBAAuB;MAC9B,QAAQ,0BAA0B;;;;;;YAM5B,aAAa;aACZ;aACA;MACP,QAAQ,0BAA0B;;;;;;;YAO5B,eAAe;aACd;aACA;aACA;MACP,QAAQ,0BAA0B;;;;;YAK5B,aAAa;aACZ;aACA;MACP,QAAQ,0BAA0B;;;;;YAK5B,WAAW;aACV;MACP,QAAQ,0BAA0B;;;;YAI5B,mBAAmB;aAClB;aACA;aACA;aACA;aACA;aACA;;aAEA,WAAW;MAClB,QAAQ,0BAA0B;;;;YAI5B,kBAAkB;aACjB;aACA;aACA;aACA;aACA;;aAEA,WAAW;;aAEX,YAAY;MACnB,QAAQ,0BAA0B;;;;;;;YAO5B,qBAAqB;aACpB;aACA;aACA;MACP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WAAW;aACV;aACA;aACA,QAAQ;MACf,QAAQ,0BAA0B;;;;UAI9B;YACE,YAAY;aACX;aACA;aACA;MACP,QAAQ,0BAA0B;YAC5B,YAAY;aACX;aACA;aACA;aACA,SAAS;;aAET;aACA;;aAEA,YAAY;aACZ;OACN,QAAQ,0BAA0B;YAC7B,YAAY;aACX;aACA;aACA;aACA;MACP,QAAQ,0BAA0B;YAC5B,UAAU;aACT;aACA;aACA;MACP,QAAQ,0BAA0B;;;;YAI5B,gBAAgB;aACf;aACA;MACP,QAAQ,0BAA0B;;YAE5B,cAAc;aACb;aACA;MACP,QAAQ,0BAA0B;;YAE5B,mBAAmB;aAClB;aACA;MACP,QAAQ,0BAA0B;YAC5B,iBAAiB;aAChB;aACA;aACA;aACA;MACP,QAAQ,0BAA0B;YAC5B,uBAAuB;aACtB;aACA;MACP,QAAQ,0BAA0B;YAC5B,wBAAwB;aACvB;aACA;MACP,QAAQ,0BAA0B;YAC5B,gBAAgB;aACf;aACA;aACA,QAAQ;MACf,QAAQ,0BAA0B;YAC5B,cAAc;aACb;aACA;aACA;MACP,QAAQ,0BAA0B;YAC5B,gBAAgB;aACf;aACA;aACA;aACA;MACP,QAAQ,0BAA0B;;KAEnC,yBAAyB,KAAK;WACxB,QAAQ;;KAEd,iBAAiB,KAAK;WAChB,QAAQ;WACR,YAAY"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as PostgresSchemaNodeKind } from "./postgres-table-schema-node-nY6II-Uv-Bj-lgmSi.mjs";
|
|
2
2
|
import { blindCast } from "@prisma/orm-framework/utils/casts";
|
|
3
3
|
import { freezeNode } from "@prisma/orm-framework/components/ir";
|
|
4
4
|
import { nameOf } from "@prisma/orm-family-sql/schema-ir/naming";
|
|
5
5
|
import { SqlSchemaIRNode, assertNode, defineNonEnumerable } from "@prisma/orm-family-sql/schema-ir/types";
|
|
6
6
|
import { isArrayEqual } from "@prisma/orm-framework/utils/array-equal";
|
|
7
|
-
//#region ../../../3-targets/postgres/1-target/dist/postgres-role-schema-node-
|
|
7
|
+
//#region ../../../3-targets/postgres/1-target/dist/postgres-role-schema-node-DuljIQWp.mjs
|
|
8
8
|
/**
|
|
9
9
|
* The root of the Postgres schema-diff tree: one node per database.
|
|
10
10
|
*
|
|
@@ -13,18 +13,21 @@ import { isArrayEqual } from "@prisma/orm-framework/utils/array-equal";
|
|
|
13
13
|
* (roots always share the `'database'` id). `children()` yields the namespace
|
|
14
14
|
* nodes followed by the role nodes — both are root-level diff subjects. The
|
|
15
15
|
* differ pairs siblings by `(nodeKind, id)`, so a role and a namespace may
|
|
16
|
-
* share a name without colliding.
|
|
16
|
+
* share a name without colliding. Extensions are root children too: an
|
|
17
|
+
* extension's name is unique in the database.
|
|
17
18
|
*/
|
|
18
19
|
var PostgresDatabaseSchemaNode = class PostgresDatabaseSchemaNode extends SqlSchemaIRNode {
|
|
19
20
|
nodeKind = PostgresSchemaNodeKind.database;
|
|
20
21
|
namespaces;
|
|
21
22
|
roles;
|
|
23
|
+
extensions;
|
|
22
24
|
existingSchemas;
|
|
23
25
|
pgVersion;
|
|
24
26
|
constructor(input) {
|
|
25
27
|
super();
|
|
26
28
|
this.namespaces = Object.freeze({ ...input.namespaces });
|
|
27
29
|
this.roles = Object.freeze([...input.roles]);
|
|
30
|
+
this.extensions = Object.freeze([...input.extensions ?? []]);
|
|
28
31
|
this.existingSchemas = Object.freeze([...input.existingSchemas]);
|
|
29
32
|
this.pgVersion = input.pgVersion;
|
|
30
33
|
freezeNode(this);
|
|
@@ -36,7 +39,11 @@ var PostgresDatabaseSchemaNode = class PostgresDatabaseSchemaNode extends SqlSch
|
|
|
36
39
|
return this.id === other.id;
|
|
37
40
|
}
|
|
38
41
|
children() {
|
|
39
|
-
return [
|
|
42
|
+
return [
|
|
43
|
+
...Object.values(this.namespaces),
|
|
44
|
+
...this.roles,
|
|
45
|
+
...this.extensions
|
|
46
|
+
];
|
|
40
47
|
}
|
|
41
48
|
static is(node) {
|
|
42
49
|
return node.nodeKind === PostgresSchemaNodeKind.database;
|
|
@@ -201,4 +208,4 @@ var PostgresRoleSchemaNode = class PostgresRoleSchemaNode extends SqlSchemaIRNod
|
|
|
201
208
|
//#endregion
|
|
202
209
|
export { PostgresRoleSchemaNode as i, PostgresNamespaceSchemaNode as n, PostgresPolicySchemaNode as r, PostgresDatabaseSchemaNode as t };
|
|
203
210
|
|
|
204
|
-
//# sourceMappingURL=postgres-role-schema-node-
|
|
211
|
+
//# sourceMappingURL=postgres-role-schema-node-DuljIQWp-D6Q5JyEs.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"postgres-role-schema-node-DuljIQWp-D6Q5JyEs.mjs","names":[],"sources":["../../../../3-targets/postgres/1-target/dist/postgres-role-schema-node-DuljIQWp.mjs"],"sourcesContent":["import { i as PostgresSchemaNodeKind } from \"./postgres-table-schema-node-nY6II-Uv.mjs\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { freezeNode } from \"@internal/framework-components/ir\";\nimport { nameOf } from \"@internal/sql-schema-ir/naming\";\nimport { SqlSchemaIRNode, assertNode, defineNonEnumerable } from \"@internal/sql-schema-ir/types\";\nimport { isArrayEqual } from \"@internal/utils/array-equal\";\n//#region src/core/schema-ir/postgres-database-schema-node.ts\n/**\n* The root of the Postgres schema-diff tree: one node per database.\n*\n* `id` is the fixed sentinel `'database'` — the root has no siblings and\n* the value is never emitted into migration paths. `isEqualTo` is identity\n* (roots always share the `'database'` id). `children()` yields the namespace\n* nodes followed by the role nodes — both are root-level diff subjects. The\n* differ pairs siblings by `(nodeKind, id)`, so a role and a namespace may\n* share a name without colliding. Extensions are root children too: an\n* extension's name is unique in the database.\n*/\nvar PostgresDatabaseSchemaNode = class PostgresDatabaseSchemaNode extends SqlSchemaIRNode {\n\tnodeKind = PostgresSchemaNodeKind.database;\n\tnamespaces;\n\troles;\n\textensions;\n\texistingSchemas;\n\tpgVersion;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.namespaces = Object.freeze({ ...input.namespaces });\n\t\tthis.roles = Object.freeze([...input.roles]);\n\t\tthis.extensions = Object.freeze([...input.extensions ?? []]);\n\t\tthis.existingSchemas = Object.freeze([...input.existingSchemas]);\n\t\tthis.pgVersion = input.pgVersion;\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 [\n\t\t\t...Object.values(this.namespaces),\n\t\t\t...this.roles,\n\t\t\t...this.extensions\n\t\t];\n\t}\n\tstatic is(node) {\n\t\treturn node.nodeKind === PostgresSchemaNodeKind.database;\n\t}\n\tstatic assert(node) {\n\t\tassertNode(node, \"PostgresDatabaseSchemaNode\", PostgresDatabaseSchemaNode.is);\n\t}\n};\n//#endregion\n//#region src/core/schema-ir/postgres-namespace-schema-node.ts\n/**\n* One-per-Postgres-schema diff-tree node. Groups the tables belonging to a\n* single namespace. Per-schema consumers (the relational planner,\n* toSchemaView) read this node's `tables` field structurally via\n* `blindCast`/`SqlSchemaIRNode` — not through a static `SqlSchemaIR`\n* assignment — because `nodeKind` carries this node's own literal\n* (`postgres-namespace`), distinct from `SqlSchemaIR`'s own (`sql-schema`).\n*\n* `id` is the schema name; `isEqualTo` is identity on it; `children()` returns\n* the table nodes plus `nativeEnums`.\n*\n* `nativeEnums` is the diff-tree representation of native enum types the\n* differ pairs — the sole enum carrier, built directly by both sides: the\n* expected (contract-projected) side and introspection alike hand in\n* `PostgresNativeEnumSchemaNode`s.\n*/\nvar PostgresNamespaceSchemaNode = class PostgresNamespaceSchemaNode extends SqlSchemaIRNode {\n\tnodeKind = PostgresSchemaNodeKind.namespace;\n\tschemaName;\n\ttables;\n\tnativeEnums;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.schemaName = input.schemaName;\n\t\tthis.tables = Object.freeze({ ...input.tables });\n\t\tthis.nativeEnums = Object.freeze([...input.nativeEnums ?? []]);\n\t\tfreezeNode(this);\n\t}\n\tget id() {\n\t\treturn this.schemaName;\n\t}\n\tisEqualTo(other) {\n\t\treturn this.id === other.id;\n\t}\n\tchildren() {\n\t\treturn [...Object.values(this.tables), ...this.nativeEnums];\n\t}\n\tstatic is(node) {\n\t\treturn node.nodeKind === PostgresSchemaNodeKind.namespace;\n\t}\n\tstatic assert(node) {\n\t\tassertNode(node, \"PostgresNamespaceSchemaNode\", PostgresNamespaceSchemaNode.is);\n\t}\n};\n//#endregion\n//#region src/core/schema-ir/postgres-policy-schema-node.ts\n/**\n* Schema-diff leaf node for a Postgres row-level security policy.\n*\n* This is a derived, transient node walked by the differ — it is NEVER serialized.\n* Built by project-from-contract and project-from-database from their respective\n* `PostgresRlsPolicy` contract entities / introspected rows.\n*\n* `id` is the full physical name. `isEqualTo` is mode-selected by the\n* receiver's `prefix`: a wire-named receiver (`prefix` present) compares ids\n* only — the wire name encodes a body hash, so name-equality is\n* body-equality and predicate bodies are never byte-compared (Postgres\n* reprints them). An exact receiver (`prefix` absent) compares content:\n* `operation`/`permissive` strict, `roles` sorted, and `using ?? ''` /\n* `withCheck ?? ''` verbatim byte-for-byte — reliable precisely when the\n* body text was captured from a Postgres reprint (contract infer).\n*/\nvar PostgresPolicySchemaNode = class PostgresPolicySchemaNode extends SqlSchemaIRNode {\n\tnodeKind = PostgresSchemaNodeKind.policy;\n\tname;\n\ttableName;\n\tnamespaceId;\n\toperation;\n\troles;\n\tpermissive;\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.tableName = input.tableName;\n\t\tthis.namespaceId = input.namespaceId;\n\t\tthis.operation = input.operation;\n\t\tthis.roles = Object.freeze([...input.roles]);\n\t\tif (input.using !== void 0) this.using = input.using;\n\t\tif (input.withCheck !== void 0) this.withCheck = input.withCheck;\n\t\tthis.permissive = input.permissive;\n\t\tdefineNonEnumerable(this, \"dependsOn\", input.dependsOn);\n\t\tfreezeNode(this);\n\t}\n\tget id() {\n\t\treturn this.name;\n\t}\n\tchildren() {\n\t\treturn [];\n\t}\n\tisEqualTo(other) {\n\t\tconst node = blindCast(other);\n\t\tPostgresPolicySchemaNode.assert(node);\n\t\tif (this.prefix !== void 0) return this.id === node.id;\n\t\treturn this.contentEquals(node);\n\t}\n\t/**\n\t* The single policy content-equality relation — the exact-mode\n\t* {@link isEqualTo} and the planner's rename content-pairing both call\n\t* this rather than growing a parallel relation: `operation` and\n\t* `permissive` strict, `roles` compared deduplicated-and-sorted (the same\n\t* set semantics as the wire-hash tuple, so the two never disagree),\n\t* `using`/`withCheck` VERBATIM byte-for-byte with absent ≡ empty —\n\t* deliberately NOT the normalized wire-hash bodies.\n\t*/\n\tcontentEquals(other) {\n\t\treturn this.operation === other.operation && this.permissive === other.permissive && isArrayEqual([...new Set(this.roles)].sort(), [...new Set(other.roles)].sort()) && (this.using ?? \"\") === (other.using ?? \"\") && (this.withCheck ?? \"\") === (other.withCheck ?? \"\");\n\t}\n\tstatic is(node) {\n\t\treturn node.nodeKind === PostgresSchemaNodeKind.policy;\n\t}\n\tstatic assert(node) {\n\t\tassertNode(node, \"PostgresPolicySchemaNode\", PostgresPolicySchemaNode.is);\n\t}\n};\n//#endregion\n//#region src/core/schema-ir/postgres-role-schema-node.ts\n/**\n* Schema-diff leaf node for a Postgres database role.\n*\n* This is a derived, transient node walked by the differ — it is NEVER serialized.\n* Built by project-from-contract and project-from-database from their respective\n* `PostgresRole` contract entities / introspected rows.\n*\n* Roles are cluster-scoped, so `id` is the bare role name. The differ pairs\n* siblings by `(nodeKind, id)`, so a role and a namespace may share a name\n* (role `public`, schema `public`) without colliding. `isEqualTo` compares\n* ids — name-equality is role-equality for cluster-scoped objects.\n*/\nvar PostgresRoleSchemaNode = class PostgresRoleSchemaNode extends SqlSchemaIRNode {\n\tnodeKind = PostgresSchemaNodeKind.role;\n\tname;\n\tnamespaceId;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.name = input.name;\n\t\tthis.namespaceId = input.namespaceId;\n\t\tfreezeNode(this);\n\t}\n\tget id() {\n\t\treturn this.name;\n\t}\n\tchildren() {\n\t\treturn [];\n\t}\n\tisEqualTo(other) {\n\t\tconst node = blindCast(other);\n\t\tPostgresRoleSchemaNode.assert(node);\n\t\treturn this.id === node.id;\n\t}\n\tstatic is(node) {\n\t\treturn node.nodeKind === PostgresSchemaNodeKind.role;\n\t}\n\tstatic assert(node) {\n\t\tassertNode(node, \"PostgresRoleSchemaNode\", PostgresRoleSchemaNode.is);\n\t}\n};\n//#endregion\nexport { PostgresDatabaseSchemaNode as i, PostgresPolicySchemaNode as n, PostgresNamespaceSchemaNode as r, PostgresRoleSchemaNode as t };\n\n//# sourceMappingURL=postgres-role-schema-node-DuljIQWp.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;AAkBA,IAAI,6BAA6B,MAAM,mCAAmC,gBAAgB;CACzF,WAAW,uBAAuB;CAClC;CACA;CACA;CACA;CACA;CACA,YAAY,OAAO;EAClB,MAAM;EACN,KAAK,aAAa,OAAO,OAAO,EAAE,GAAG,MAAM,WAAW,CAAC;EACvD,KAAK,QAAQ,OAAO,OAAO,CAAC,GAAG,MAAM,KAAK,CAAC;EAC3C,KAAK,aAAa,OAAO,OAAO,CAAC,GAAG,MAAM,cAAc,CAAC,CAAC,CAAC;EAC3D,KAAK,kBAAkB,OAAO,OAAO,CAAC,GAAG,MAAM,eAAe,CAAC;EAC/D,KAAK,YAAY,MAAM;EACvB,WAAW,IAAI;CAChB;CACA,IAAI,KAAK;EACR,OAAO;CACR;CACA,UAAU,OAAO;EAChB,OAAO,KAAK,OAAO,MAAM;CAC1B;CACA,WAAW;EACV,OAAO;GACN,GAAG,OAAO,OAAO,KAAK,UAAU;GAChC,GAAG,KAAK;GACR,GAAG,KAAK;EACT;CACD;CACA,OAAO,GAAG,MAAM;EACf,OAAO,KAAK,aAAa,uBAAuB;CACjD;CACA,OAAO,OAAO,MAAM;EACnB,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ZNX0D-BpKJDg4M.mjs → postgres-schema-BBWgs4fX-DWdYxNi8.mjs}
RENAMED
|
@@ -12,7 +12,23 @@ import { invariant } from "@prisma/orm-framework/utils/assertions";
|
|
|
12
12
|
import { nameOf, parseNaming } from "@prisma/orm-family-sql/schema-ir/naming";
|
|
13
13
|
import { composeSqlEntityKinds } from "@prisma/orm-family-sql/contract/entity-kinds";
|
|
14
14
|
import { cfExpr } from "@prisma/orm-family-sql/relational-core/contract-free";
|
|
15
|
-
//#region ../../../3-targets/postgres/1-target/dist/postgres-schema-
|
|
15
|
+
//#region ../../../3-targets/postgres/1-target/dist/postgres-schema-BBWgs4fX.mjs
|
|
16
|
+
/**
|
|
17
|
+
* A Postgres extension the database must have installed (`CREATE EXTENSION … WITH SCHEMA …`), filed under `entries.extension` of the namespace whose schema holds the extension's objects.
|
|
18
|
+
*/
|
|
19
|
+
var PostgresExtension = class extends SqlNode {
|
|
20
|
+
static is(node) {
|
|
21
|
+
return typeof node === "object" && node !== null && "kind" in node && node.kind === "extension";
|
|
22
|
+
}
|
|
23
|
+
kind = "extension";
|
|
24
|
+
name;
|
|
25
|
+
constructor(input) {
|
|
26
|
+
super();
|
|
27
|
+
this.name = input.name;
|
|
28
|
+
if (input.control !== void 0) this.control = input.control;
|
|
29
|
+
freezeNode(this);
|
|
30
|
+
}
|
|
31
|
+
};
|
|
16
32
|
/**
|
|
17
33
|
* Postgres contract-IR marker for `@@rls` on a model: the table named here is
|
|
18
34
|
* RLS-controlled (`ENABLE ROW LEVEL SECURITY` is driven by this marker, never
|
|
@@ -132,6 +148,12 @@ const PostgresNativeEnumSchema = type({
|
|
|
132
148
|
members: type.string.array().readonly(),
|
|
133
149
|
"control?": "'managed' | 'tolerated' | 'external' | 'observed'"
|
|
134
150
|
});
|
|
151
|
+
const PostgresExtensionSchema = type({
|
|
152
|
+
"+": "reject",
|
|
153
|
+
kind: "'extension'",
|
|
154
|
+
name: "string",
|
|
155
|
+
"control?": "'managed' | 'tolerated' | 'external' | 'observed'"
|
|
156
|
+
});
|
|
135
157
|
var PostgresTableSource = class extends TableSource {
|
|
136
158
|
schema;
|
|
137
159
|
constructor(options) {
|
|
@@ -180,6 +202,11 @@ const nativeEnumEntityKind = {
|
|
|
180
202
|
schema: PostgresNativeEnumSchema,
|
|
181
203
|
construct: (input) => new PostgresNativeEnum(input)
|
|
182
204
|
};
|
|
205
|
+
const extensionEntityKind = {
|
|
206
|
+
kind: "extension",
|
|
207
|
+
schema: PostgresExtensionSchema,
|
|
208
|
+
construct: (input) => new PostgresExtension(input)
|
|
209
|
+
};
|
|
183
210
|
/**
|
|
184
211
|
* Postgres target `Namespace` concretion — a Postgres schema (`CREATE
|
|
185
212
|
* SCHEMA …`). Each Postgres `SqlStorage` carries a
|
|
@@ -212,7 +239,8 @@ var PostgresSchema = class extends SqlNamespaceBase {
|
|
|
212
239
|
policyEntityKind,
|
|
213
240
|
roleEntityKind,
|
|
214
241
|
rlsEnablementEntityKind,
|
|
215
|
-
nativeEnumEntityKind
|
|
242
|
+
nativeEnumEntityKind,
|
|
243
|
+
extensionEntityKind
|
|
216
244
|
]), "carry");
|
|
217
245
|
const nativeEnumSlot = dispatched["native_enum"];
|
|
218
246
|
if (nativeEnumSlot !== void 0) {
|
|
@@ -254,6 +282,9 @@ var PostgresSchema = class extends SqlNamespaceBase {
|
|
|
254
282
|
get rls() {
|
|
255
283
|
return this.entries.rls ?? Object.freeze({});
|
|
256
284
|
}
|
|
285
|
+
get extension() {
|
|
286
|
+
return this.entries.extension ?? Object.freeze({});
|
|
287
|
+
}
|
|
257
288
|
/**
|
|
258
289
|
* The bare schema qualifier as it would appear in a rendered SQL
|
|
259
290
|
* fragment (already quoted). The unbound-schema singleton overrides
|
|
@@ -418,6 +449,6 @@ function postgresCreateNamespace(input) {
|
|
|
418
449
|
return new PostgresSchema(schemaInput);
|
|
419
450
|
}
|
|
420
451
|
//#endregion
|
|
421
|
-
export {
|
|
452
|
+
export { policyInputFromSerialized as _, PostgresRlsEnablementSchema as a, roleEntityKind as b, PostgresRole as c, PostgresTableSource as d, PostgresUnboundSchema as f, policyEntityKind as g, nativeEnumEntityKind as h, PostgresRlsEnablement as i, PostgresRoleSchema as l, isPostgresSchema as m, PostgresExtensionSchema as n, PostgresRlsPolicy as o, extensionEntityKind as p, PostgresNativeEnumSchema as r, PostgresRlsPolicySchema as s, PostgresExtension as t, PostgresSchema as u, postgresCreateNamespace as v, rlsEnablementEntityKind as y };
|
|
422
453
|
|
|
423
|
-
//# sourceMappingURL=postgres-schema-
|
|
454
|
+
//# sourceMappingURL=postgres-schema-BBWgs4fX-DWdYxNi8.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"postgres-schema-BBWgs4fX-DWdYxNi8.mjs","names":[],"sources":["../../../../3-targets/postgres/1-target/dist/postgres-schema-BBWgs4fX.mjs"],"sourcesContent":["import { T as PG_TEXT_CODEC_ID } from \"./codec-ids-2htdtS66.mjs\";\nimport { a as quoteIdentifier, n as escapeLiteral } from \"./sql-utils-VXrIh8dJ.mjs\";\nimport { t as PostgresNativeEnum } from \"./postgres-native-enum-CdP3b_-R.mjs\";\nimport { n as assertFullTextIndexes } from \"./full-text-index-definition-MfjtL-x7.mjs\";\nimport { TableSource } from \"@internal/sql-relational-core/ast\";\nimport { type } from \"arktype\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { UNBOUND_NAMESPACE_ID, freezeNode, hydrateNamespaceEntities } from \"@internal/framework-components/ir\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { SqlNamespaceBase, SqlNode } from \"@internal/sql-contract/types\";\nimport { nameOf, parseNaming } from \"@internal/sql-schema-ir/naming\";\nimport { invariant } from \"@internal/utils/assertions\";\nimport { composeSqlEntityKinds } from \"@internal/sql-contract/entity-kinds\";\nimport { cfExpr } from \"@internal/sql-relational-core/contract-free\";\n//#region src/core/postgres-extension.ts\n/**\n* A Postgres extension the database must have installed (`CREATE EXTENSION … WITH SCHEMA …`), filed under `entries.extension` of the namespace whose schema holds the extension's objects.\n*/\nvar PostgresExtension = class extends SqlNode {\n\tstatic is(node) {\n\t\treturn typeof node === \"object\" && node !== null && \"kind\" in node && node.kind === \"extension\";\n\t}\n\tkind = \"extension\";\n\tname;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.name = input.name;\n\t\tif (input.control !== void 0) this.control = input.control;\n\t\tfreezeNode(this);\n\t}\n};\n//#endregion\n//#region src/core/postgres-rls-enablement.ts\n/**\n* Postgres contract-IR marker for `@@rls` on a model: the table named here is\n* RLS-controlled (`ENABLE ROW LEVEL SECURITY` is driven by this marker, never\n* by the policy set).\n*\n* This is an authored, serialized Contract-IR entity — it is registered as an\n* entity kind, extends `SqlNode`, and is stored in `contract.json` under\n* `entries.rls[tableName]`. Target-only concept — no SQL-family abstract.\n* Frozen at construction via `freezeNode(this)`. The `kind: 'rls'`\n* discriminant is enumerable so it survives JSON serialization; the literal\n* matches the entries key (one-string rule).\n*/\nvar PostgresRlsEnablement = class extends SqlNode {\n\tkind = \"rls\";\n\ttableName;\n\tnamespaceId;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.tableName = input.tableName;\n\t\tthis.namespaceId = input.namespaceId;\n\t\tfreezeNode(this);\n\t}\n};\n//#endregion\n//#region src/core/postgres-rls-policy.ts\n/**\n* Postgres contract-IR class for a row-level security policy (`CREATE POLICY … ON …`).\n*\n* This is an authored, serialized Contract-IR entity — it is registered as an entity\n* kind, extends `SqlNode`, and is stored in `contract.json`. It is NOT a DiffableNode;\n* the schema-diff tree uses `PostgresPolicySchemaNode` for that role.\n*\n* Target-only concept — no SQL-family abstract. Extends `SqlNode` directly.\n* Frozen at construction via `freezeNode(this)`. The `kind: 'policy'`\n* discriminant is enumerable (overrides SqlNode's non-enumerable `'sql'`) so it\n* survives JSON serialization and enables dispatch. The literal matches the\n* entries key (one-string rule: node.kind === entries key === entity kind).\n*/\nvar PostgresRlsPolicy = class extends SqlNode {\n\tkind = \"policy\";\n\tname;\n\ttableName;\n\tnamespaceId;\n\toperation;\n\troles;\n\tpermissive;\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.tableName = input.tableName;\n\t\tthis.namespaceId = input.namespaceId;\n\t\tthis.operation = input.operation;\n\t\tthis.roles = Object.freeze([...input.roles]);\n\t\tif (input.using !== void 0) this.using = input.using;\n\t\tif (input.withCheck !== void 0) this.withCheck = input.withCheck;\n\t\tthis.permissive = input.permissive;\n\t\tfreezeNode(this);\n\t}\n};\n//#endregion\n//#region src/core/postgres-role.ts\n/**\n* Roles are referenced by the contract but never owned — the framework\n* issues no `CREATE`/`DROP ROLE`, so a role's effective governance is always\n* `external`: a missing declared role fails verify, an extra live role is\n* tolerated, and the planner emits zero role DDL. `external` is the only\n* value a role's control can ever carry.\n*/\nconst ROLE_DEFAULT_CONTROL_POLICY = \"external\";\n/**\n* Postgres contract-IR class for a database role (`CREATE ROLE …`).\n*\n* This is an authored, serialized Contract-IR entity — it is registered as an entity\n* kind, extends `SqlNode`, and is stored in `contract.json`. It is NOT a DiffableNode;\n* the schema-diff tree uses `PostgresRoleSchemaNode` for that role.\n*\n* Roles are cluster-scoped, so their namespace coordinate is always\n* `UNBOUND_NAMESPACE_ID`. Target-only concept — no SQL-family abstract.\n* Extends `SqlNode` directly, frozen at construction via `freezeNode(this)`.\n* The `kind: 'role'` discriminant is enumerable so it survives JSON.\n* Matches the entries key (one-string rule).\n*\n* `control` always carries a value (never omitted): it defaults to\n* {@link ROLE_DEFAULT_CONTROL_POLICY} in the constructor, so both a\n* freshly-authored role and one hydrated from an older `contract.json`\n* lacking the field resolve the same way — the control-policy resolver\n* reads it directly off the entity instead of special-casing role issues.\n*/\nvar PostgresRole = class extends SqlNode {\n\tkind = \"role\";\n\tname;\n\tnamespaceId;\n\tcontrol;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.name = input.name;\n\t\tthis.namespaceId = input.namespaceId;\n\t\tthis.control = input.control ?? \"external\";\n\t\tfreezeNode(this);\n\t}\n};\n//#endregion\n//#region src/core/postgres-validators.ts\nconst PostgresRoleSchema = type({\n\tkind: \"'role'\",\n\tname: \"string\",\n\tnamespaceId: \"string\",\n\t\"control?\": \"'external'\"\n});\nconst PostgresRlsPolicySchema = type({\n\tkind: \"'policy'\",\n\tname: \"string\",\n\t\"prefix?\": \"string\",\n\ttableName: \"string\",\n\tnamespaceId: \"string\",\n\toperation: \"'select' | 'insert' | 'update' | 'delete' | 'all'\",\n\troles: type.string.array().readonly(),\n\t\"using?\": \"string\",\n\t\"withCheck?\": \"string\",\n\tpermissive: \"boolean\"\n});\nconst PostgresRlsEnablementSchema = type({\n\tkind: \"'rls'\",\n\ttableName: \"string\",\n\tnamespaceId: \"string\"\n});\nconst PostgresNativeEnumSchema = type({\n\tkind: \"'postgres-enum'\",\n\ttypeName: \"string\",\n\tmembers: type.string.array().readonly(),\n\t\"control?\": \"'managed' | 'tolerated' | 'external' | 'observed'\"\n});\nconst PostgresExtensionSchema = type({\n\t\"+\": \"reject\",\n\tkind: \"'extension'\",\n\tname: \"string\",\n\t\"control?\": \"'managed' | 'tolerated' | 'external' | 'observed'\"\n});\n//#endregion\n//#region src/core/ast/table-source.ts\nvar PostgresTableSource = class extends TableSource {\n\tschema;\n\tconstructor(options) {\n\t\tsuper(options.name, options.alias);\n\t\tthis.schema = options.schema;\n\t\tthis.freeze();\n\t}\n\trewrite(rewriter) {\n\t\treturn rewriter.tableSource ? rewriter.tableSource(this) : this;\n\t}\n};\n//#endregion\n//#region src/core/serialized-rls-policy.ts\n/**\n* Hydrates one stored policy into constructor input. The name and the prefix\n* are separate fields in the file and can disagree there, so the pair is\n* checked on the way in.\n*/\nfunction policyInputFromSerialized(flat) {\n\treturn {\n\t\tnaming: parseNaming(flat.name, flat.prefix),\n\t\ttableName: flat.tableName,\n\t\tnamespaceId: flat.namespaceId,\n\t\toperation: flat.operation,\n\t\troles: flat.roles,\n\t\tusing: flat.using,\n\t\twithCheck: flat.withCheck,\n\t\tpermissive: flat.permissive\n\t};\n}\n//#endregion\n//#region src/core/entity-kinds.ts\nconst policyEntityKind = {\n\tkind: \"policy\",\n\tschema: PostgresRlsPolicySchema,\n\tconstruct: (input) => new PostgresRlsPolicy(policyInputFromSerialized(input))\n};\nconst roleEntityKind = {\n\tkind: \"role\",\n\tschema: PostgresRoleSchema,\n\tconstruct: (input) => new PostgresRole(input)\n};\nconst rlsEnablementEntityKind = {\n\tkind: \"rls\",\n\tschema: PostgresRlsEnablementSchema,\n\tconstruct: (input) => new PostgresRlsEnablement(input)\n};\nconst nativeEnumEntityKind = {\n\tkind: \"native_enum\",\n\tschema: PostgresNativeEnumSchema,\n\tconstruct: (input) => new PostgresNativeEnum(input)\n};\nconst extensionEntityKind = {\n\tkind: \"extension\",\n\tschema: PostgresExtensionSchema,\n\tconstruct: (input) => new PostgresExtension(input)\n};\n//#endregion\n//#region src/core/postgres-schema.ts\n/**\n* Postgres target `Namespace` concretion — a Postgres schema (`CREATE\n* SCHEMA …`). Each Postgres `SqlStorage` carries a\n* `namespaces: Record<NamespaceId, PostgresSchema>` map populated by\n* the Postgres PSL interpreter from `namespace { … }` AST buckets.\n*\n* `entries` holds entity-kind maps (`table`, `valueSet`). Qualifier\n* emission is the rendering seam: DDL / SQL emission asks the namespace\n* for its qualifier (`\"<schema>\"`) or for a qualified table name\n* (`\"<schema>\".\"<table>\"`) and consumes the result polymorphically.\n* The unbound singleton below overrides these methods to elide the\n* prefix entirely — call sites stay polymorphic and never branch on\n* `id === UNBOUND_NAMESPACE_ID`.\n*/\nvar PostgresSchema = class extends SqlNamespaceBase {\n\t/**\n\t* Stable singleton reference for the late-bound slot. Materialised\n\t* lazily below the singleton subclass declaration so the static\n\t* initialiser sees the subclass before assigning. Consumers always\n\t* reach for `PostgresSchema.unbound` (or `PostgresUnboundSchema.instance`\n\t* — same identity).\n\t*/\n\tstatic unbound;\n\tid;\n\tentries;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.id = input.id;\n\t\tconst dispatched = hydrateNamespaceEntities(input.entries, composeSqlEntityKinds([\n\t\t\tpolicyEntityKind,\n\t\t\troleEntityKind,\n\t\t\trlsEnablementEntityKind,\n\t\t\tnativeEnumEntityKind,\n\t\t\textensionEntityKind\n\t\t]), \"carry\");\n\t\tconst nativeEnumSlot = dispatched[\"native_enum\"];\n\t\tif (nativeEnumSlot !== void 0) {\n\t\t\tconst rekeyed = {};\n\t\t\tfor (const [handle, entity] of Object.entries(nativeEnumSlot)) {\n\t\t\t\tconst physicalName = PostgresNativeEnum.is(entity) ? entity.typeName : handle;\n\t\t\t\tinvariant(!Object.hasOwn(rekeyed, physicalName), `PostgresSchema \"${input.id}\": two native_enum entities resolve to the same physical type name \"${physicalName}\". Give them distinct @@map type names.`);\n\t\t\t\trekeyed[physicalName] = entity;\n\t\t\t}\n\t\t\tdispatched[\"native_enum\"] = Object.freeze(rekeyed);\n\t\t}\n\t\tconst valueSetRaw = dispatched[\"valueSet\"];\n\t\tconst entriesInput = { ...valueSetRaw !== void 0 && Object.keys(valueSetRaw).length === 0 ? {\n\t\t\t...dispatched,\n\t\t\tvalueSet: void 0\n\t\t} : dispatched };\n\t\tthis.entries = Object.freeze(blindCast(entriesInput));\n\t\tfor (const table of Object.values(this.entries.table ?? {})) assertFullTextIndexes(table);\n\t\tObject.defineProperty(this, \"kind\", {\n\t\t\tvalue: \"schema\",\n\t\t\twritable: false,\n\t\t\tenumerable: false,\n\t\t\tconfigurable: true\n\t\t});\n\t\tfreezeNode(this);\n\t}\n\tget table() {\n\t\treturn this.entries.table ?? Object.freeze({});\n\t}\n\tget valueSet() {\n\t\treturn this.entries.valueSet;\n\t}\n\tget policy() {\n\t\treturn this.entries.policy ?? Object.freeze({});\n\t}\n\tget role() {\n\t\treturn this.entries.role ?? Object.freeze({});\n\t}\n\tget rls() {\n\t\treturn this.entries.rls ?? Object.freeze({});\n\t}\n\tget extension() {\n\t\treturn this.entries.extension ?? Object.freeze({});\n\t}\n\t/**\n\t* The bare schema qualifier as it would appear in a rendered SQL\n\t* fragment (already quoted). The unbound-schema singleton overrides\n\t* this to return `''`.\n\t*/\n\tqualifier() {\n\t\treturn quoteIdentifier(this.id);\n\t}\n\t/**\n\t* Qualify a table name with the schema prefix\n\t* (`\"<schema>\".\"<table>\"`). The unbound-schema singleton overrides\n\t* this to emit just `\"<table>\"` so the resolved DDL is unqualified\n\t* and `search_path` decides where the object lands at runtime.\n\t*/\n\tqualifyTable(tableName) {\n\t\treturn `${quoteIdentifier(this.id)}.${quoteIdentifier(tableName)}`;\n\t}\n\t/**\n\t* Render a SQL string-literal containing the qualified-name form\n\t* suitable for `to_regclass(...)` arguments (e.g. `'\"public\".\"user\"'`).\n\t* The unbound singleton overrides this to elide the schema prefix\n\t* (`'\"user\"'`) so `search_path` resolves the object at runtime.\n\t*/\n\tregclassLiteral(name) {\n\t\treturn `'${escapeLiteral(this.qualifyTable(name))}'`;\n\t}\n\t/**\n\t* Render a SQL expression that evaluates to this namespace's schema\n\t* name at runtime, ready to drop into a `WHERE table_schema = …` /\n\t* `WHERE n.nspname = …` clause. Named schemas emit a quoted SQL\n\t* literal (`'public'`); the unbound singleton overrides this to emit\n\t* `current_schema()` so catalog queries match whichever schema the\n\t* connection's `search_path` resolved at runtime.\n\t*/\n\tschemaSqlExpression() {\n\t\treturn `'${escapeLiteral(this.id)}'`;\n\t}\n\t/**\n\t* Typed-AST counterpart of {@link schemaSqlExpression}: the expression a\n\t* builder-built catalog check compares `n.nspname` / `table_schema`\n\t* against. Named schemas bind the schema name as a text parameter; the\n\t* unbound singleton overrides this to the opaque `current_schema()`\n\t* expression so the live connection's `search_path` decides at runtime.\n\t*/\n\tschemaFilterExpression() {\n\t\treturn cfExpr.param(this.id, PG_TEXT_CODEC_ID);\n\t}\n\t/**\n\t* Typed-AST counterpart of {@link qualifyTable}: the FROM source a\n\t* builder-built check uses to address a user table in this namespace.\n\t* Named schemas qualify (`\"schema\".\"table\"`); the unbound singleton\n\t* overrides this to leave the table unqualified so `search_path`\n\t* resolves it at runtime.\n\t*/\n\ttableSource(tableName, alias) {\n\t\treturn new PostgresTableSource({\n\t\t\tname: tableName,\n\t\t\tschema: this.id,\n\t\t\t...ifDefined(\"alias\", alias)\n\t\t});\n\t}\n\t/**\n\t* The bare schema name a DDL planner should target when emitting\n\t* statements that need to identify this namespace in the live\n\t* database (e.g. `CREATE TABLE \"<ddlSchemaName>\".\"<table>\" …`,\n\t* catalog filters, planner conflict lookups). Named schemas resolve\n\t* to their own id. The `PostgresUnboundSchema` singleton inherits\n\t* this and returns `UNBOUND_NAMESPACE_ID` — callers that dispatch\n\t* through `qualifyTableName` route through the polymorphic\n\t* `PostgresUnboundSchema` overrides and produce unqualified\n\t* (search-path-resolved) output automatically.\n\t*/\n\tddlSchemaName(_storage) {\n\t\treturn this.id;\n\t}\n};\n/**\n* Singleton subclass for the reserved sentinel namespace id\n* (`UNBOUND_NAMESPACE_ID`) — the late-bound Postgres slot whose binding\n* the connection's `search_path` resolves at runtime. Overrides\n* qualifier emission to elide the schema prefix; call sites that consume\n* `qualifier()` / `qualifyTable()` get unqualified output without\n* branching on the namespace id.\n*\n* This is the target-side materialization of \"the framework provides\n* affordances; targets implement specifics\": the framework names the\n* sentinel; Postgres decides what late-bound means here (the table\n* name, naked — the schema is supplied by the live connection's\n* `search_path`).\n*\n* `ddlSchemaName` is inherited from `PostgresSchema` and returns\n* `UNBOUND_NAMESPACE_ID`. Downstream helpers such as `qualifyTableName`\n* route through the polymorphic factory and produce unqualified output\n* automatically.\n*/\nvar PostgresUnboundSchema = class PostgresUnboundSchema extends PostgresSchema {\n\tstatic instance = new PostgresUnboundSchema();\n\tconstructor(input) {\n\t\tsuper(input ?? {\n\t\t\tid: UNBOUND_NAMESPACE_ID,\n\t\t\tentries: { table: {} }\n\t\t});\n\t}\n\tqualifier() {\n\t\treturn \"\";\n\t}\n\tqualifyTable(tableName) {\n\t\treturn quoteIdentifier(tableName);\n\t}\n\tschemaSqlExpression() {\n\t\treturn \"current_schema()\";\n\t}\n\tschemaFilterExpression() {\n\t\treturn cfExpr.raw(\"current_schema()\", {\n\t\t\tcodecId: PG_TEXT_CODEC_ID,\n\t\t\tnullable: false\n\t\t});\n\t}\n\ttableSource(tableName, alias) {\n\t\treturn new PostgresTableSource({\n\t\t\tname: tableName,\n\t\t\t...ifDefined(\"alias\", alias)\n\t\t});\n\t}\n};\nPostgresSchema.unbound = PostgresUnboundSchema.instance;\n/**\n* Narrow an arbitrary namespace (or `undefined`) to `PostgresSchema`\n* so callers can dispatch to the polymorphic emission methods without\n* branching at the call site. Uses the structural `kind` discriminator\n* (`'schema'`) rather than `instanceof` so the check survives realm /\n* bundle / hot-reload boundaries — matching the rest of the IR's\n* narrowing convention. `PostgresUnboundSchema` passes through because\n* it inherits the same `kind: 'schema'` from `PostgresSchema`.\n*/\nfunction isPostgresSchema(ns) {\n\treturn typeof ns === \"object\" && ns !== null && Reflect.get(ns, \"kind\") === \"schema\";\n}\n/**\n* Target-supplied `Namespace` factory the Postgres target plumbs\n* through `defineContract({ createNamespace })` and the SQL PSL\n* interpreter. Returns the unbound singleton for the framework\n* sentinel and a fresh `PostgresSchema` for any other coordinate.\n*\n* The factory has no per-call state — every named id deterministically\n* maps to a distinct schema instance — so callers can pass it through\n* by reference and trust the resulting `SqlStorage.namespaces` map to\n* be value-stable for a given input set. Native-enum column type names are\n* schema-qualified earlier, at column construction, via the target's\n* `authoring.qualifyColumnType` hook (`postgresQualifyColumnType`), so this\n* factory just materialises the namespace from already-qualified entries.\n*/\nfunction postgresCreateNamespace(input) {\n\tconst schemaInput = {\n\t\tid: input.id,\n\t\tentries: {\n\t\t\t...input.entries,\n\t\t\ttable: input.entries[\"table\"] ?? {}\n\t\t}\n\t};\n\tif (input.id === UNBOUND_NAMESPACE_ID) return new PostgresUnboundSchema(schemaInput);\n\treturn new PostgresSchema(schemaInput);\n}\n//#endregion\nexport { PostgresRole as _, extensionEntityKind as a, PostgresRlsEnablement as b, rlsEnablementEntityKind as c, PostgresTableSource as d, PostgresExtensionSchema as f, PostgresRoleSchema as g, PostgresRlsPolicySchema as h, postgresCreateNamespace as i, roleEntityKind as l, PostgresRlsEnablementSchema as m, PostgresUnboundSchema as n, nativeEnumEntityKind as o, PostgresNativeEnumSchema as p, isPostgresSchema as r, policyEntityKind as s, PostgresSchema as t, policyInputFromSerialized as u, ROLE_DEFAULT_CONTROL_POLICY as v, PostgresExtension as x, PostgresRlsPolicy as y };\n\n//# sourceMappingURL=postgres-schema-BBWgs4fX.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;AAkBA,IAAI,oBAAoB,cAAc,QAAQ;CAC7C,OAAO,GAAG,MAAM;EACf,OAAO,OAAO,SAAS,YAAY,SAAS,QAAQ,UAAU,QAAQ,KAAK,SAAS;CACrF;CACA,OAAO;CACP;CACA,YAAY,OAAO;EAClB,MAAM;EACN,KAAK,OAAO,MAAM;EAClB,IAAI,MAAM,YAAY,KAAK,GAAG,KAAK,UAAU,MAAM;EACnD,WAAW,IAAI;CAChB;AACD;;;;;;;;;;;;;AAeA,IAAI,wBAAwB,cAAc,QAAQ;CACjD,OAAO;CACP;CACA;CACA,YAAY,OAAO;EAClB,MAAM;EACN,KAAK,YAAY,MAAM;EACvB,KAAK,cAAc,MAAM;EACzB,WAAW,IAAI;CAChB;AACD;;;;;;;;;;;;;;AAgBA,IAAI,oBAAoB,cAAc,QAAQ;CAC7C,OAAO;CACP;CACA;CACA;CACA;CACA;CACA;CACA,YAAY,OAAO;EAClB,MAAM;EACN,KAAK,OAAO,OAAO,MAAM,MAAM;EAC/B,IAAI,MAAM,OAAO,SAAS,QAAQ,KAAK,SAAS,MAAM,OAAO;EAC7D,KAAK,YAAY,MAAM;EACvB,KAAK,cAAc,MAAM;EACzB,KAAK,YAAY,MAAM;EACvB,KAAK,QAAQ,OAAO,OAAO,CAAC,GAAG,MAAM,KAAK,CAAC;EAC3C,IAAI,MAAM,UAAU,KAAK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AAQ,KAAK;GACb,GAAG,UAAU,SAAS,KAAK;EAC5B,CAAC;CACF;;;;;;;;;;;;CAYA,cAAc,UAAU;EACvB,OAAO,KAAK;CACb;AACD;;;;;;;;;;;;;;;;;;;;AAoBA,IAAI,wBAAwB,MAAM,8BAA8B,eAAe;CAC9E,OAAO,WAAW,IAAI,sBAAsB;CAC5C,YAAY,OAAO;EAClB,MAAM,SAAS;GACd,IAAI;GACJ,SAAS,EAAE,OAAO,CAAC,EAAE;EACtB,CAAC;CACF;CACA,YAAY;EACX,OAAO;CACR;CACA,aAAa,WAAW;EACvB,OAAO,gBAAgB,SAAS;CACjC;CACA,sBAAsB;EACrB,OAAO;CACR;CACA,yBAAyB;EACxB,OAAO,OAAO,IAAI,oBAAoB;GACrC,SAAS;GACT,UAAU;EACX,CAAC;CACF;CACA,YAAY,WAAW,OAAO;EAC7B,OAAO,IAAI,oBAAoB;GAC9B,MAAM;GACN,GAAG,UAAU,SAAS,KAAK;EAC5B,CAAC;CACF;AACD;AACA,eAAe,UAAU,sBAAsB;;;;;;;;;;AAU/C,SAAS,iBAAiB,IAAI;CAC7B,OAAO,OAAO,OAAO,YAAY,OAAO,QAAQ,QAAQ,IAAI,IAAI,MAAM,MAAM;AAC7E;;;;;;;;;;;;;;;AAeA,SAAS,wBAAwB,OAAO;CACvC,MAAM,cAAc;EACnB,IAAI,MAAM;EACV,SAAS;GACR,GAAG,MAAM;GACT,OAAO,MAAM,QAAQ,YAAY,CAAC;EACnC;CACD;CACA,IAAI,MAAM,OAAO,sBAAsB,OAAO,IAAI,sBAAsB,WAAW;CACnF,OAAO,IAAI,eAAe,WAAW;AACtC"}
|
package/dist/{postgres-schema-Xsjt3RKO-bis-SVSB.d.mts → postgres-schema-CJvUnBU9-Bvn7zbr1.d.mts}
RENAMED
|
@@ -3,7 +3,23 @@ import { t as PostgresTableSource } from "./table-source-ikHOZmhD-vYcblBYv.mjs";
|
|
|
3
3
|
import { SqlNamespaceBase, SqlNamespaceEntries, SqlNamespaceInput, SqlNode, SqlStorage, StorageTable, StorageValueSet } from "@prisma/orm-family-sql/contract/types";
|
|
4
4
|
import { CfExpr } from "@prisma/orm-family-sql/relational-core/contract-free";
|
|
5
5
|
import { Contract, ControlPolicy } from "@prisma/orm-framework/contract/types";
|
|
6
|
-
//#region ../../../3-targets/postgres/1-target/dist/postgres-schema-
|
|
6
|
+
//#region ../../../3-targets/postgres/1-target/dist/postgres-schema-CJvUnBU9.d.mts
|
|
7
|
+
//#region src/core/postgres-extension.d.ts
|
|
8
|
+
interface PostgresExtensionInput {
|
|
9
|
+
readonly name: string;
|
|
10
|
+
readonly control?: ControlPolicy;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* A Postgres extension the database must have installed (`CREATE EXTENSION … WITH SCHEMA …`), filed under `entries.extension` of the namespace whose schema holds the extension's objects.
|
|
14
|
+
*/
|
|
15
|
+
declare class PostgresExtension extends SqlNode {
|
|
16
|
+
static is(node: unknown): node is PostgresExtension;
|
|
17
|
+
readonly kind: "extension";
|
|
18
|
+
readonly name: string;
|
|
19
|
+
readonly control?: ControlPolicy;
|
|
20
|
+
constructor(input: PostgresExtensionInput);
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
7
23
|
//#region src/core/postgres-native-enum.d.ts
|
|
8
24
|
interface PostgresNativeEnumInput<Members extends readonly string[] = readonly string[]> {
|
|
9
25
|
/** The Postgres type name (`CREATE TYPE <typeName> AS ENUM (…)`). */
|
|
@@ -116,6 +132,7 @@ type PostgresNamespaceEntries = SqlNamespaceEntries & {
|
|
|
116
132
|
readonly role?: Readonly<Record<string, PostgresRole>>;
|
|
117
133
|
readonly rls?: Readonly<Record<string, PostgresRlsEnablement>>;
|
|
118
134
|
readonly native_enum?: Readonly<Record<string, PostgresNativeEnum>>;
|
|
135
|
+
readonly extension?: Readonly<Record<string, PostgresExtension>>;
|
|
119
136
|
};
|
|
120
137
|
interface PostgresSchemaInput {
|
|
121
138
|
readonly id: string;
|
|
@@ -153,6 +170,7 @@ declare class PostgresSchema extends SqlNamespaceBase {
|
|
|
153
170
|
get policy(): Readonly<Record<string, PostgresRlsPolicy>>;
|
|
154
171
|
get role(): Readonly<Record<string, PostgresRole>>;
|
|
155
172
|
get rls(): Readonly<Record<string, PostgresRlsEnablement>>;
|
|
173
|
+
get extension(): Readonly<Record<string, PostgresExtension>>;
|
|
156
174
|
/**
|
|
157
175
|
* The bare schema qualifier as it would appear in a rendered SQL
|
|
158
176
|
* fragment (already quoted). The unbound-schema singleton overrides
|
|
@@ -265,5 +283,5 @@ declare function isPostgresSchema(ns: unknown): ns is PostgresSchema;
|
|
|
265
283
|
*/
|
|
266
284
|
declare function postgresCreateNamespace(input: SqlNamespaceInput): PostgresSchema;
|
|
267
285
|
//#endregion
|
|
268
|
-
export {
|
|
269
|
-
//# sourceMappingURL=postgres-schema-
|
|
286
|
+
export { PostgresNativeEnumInput as a, PostgresRole as c, PostgresUnboundSchema as d, isPostgresSchema as f, PostgresNativeEnum as i, PostgresRoleInput as l, PostgresExtension as n, PostgresRlsEnablement as o, postgresCreateNamespace as p, PostgresExtensionInput as r, PostgresRlsEnablementInput as s, PostgresContract as t, PostgresSchema as u };
|
|
287
|
+
//# sourceMappingURL=postgres-schema-CJvUnBU9-Bvn7zbr1.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"postgres-schema-CJvUnBU9-Bvn7zbr1.d.mts","names":[],"sources":["../../../../3-targets/postgres/1-target/dist/postgres-schema-CJvUnBU9.d.mts"],"mappings":";;;;;;;UAMU;WACC;WACA,UAAU;;;;;cAKP,0BAA0B;SAC/B,GAAG,gBAAgB,QAAQ;WACzB;WACA;WACA,UAAU;EACnB,YAAY,OAAO;;;;UAIX,wBAAwB;;WAEvB;;WAEA,SAAS;WACT,UAAU;;;;;;;;;;;;;;;;;;;;;cAqBP,mBAAmB,+DAA+D;SACvF,GAAG,gBAAgB,QAAQ;WACzB;WACA;WACA,SAAS;WACT,UAAU;EACnB,YAAY,OAAO,wBAAwB;;;;UAInC;;WAEC;;WAEA;;;;;;;;;;;;;;cAcG,8BAA8B;WACjC;WACA;WACA;EACT,YAAY,OAAO;;;;UAIX;WACC;;;;;WAKA;;;;;WAKA;;;;;;;;;;;;;;;;;;;;;cAqBG,qBAAqB;WACxB;WACA;WACA;WACA;EACT,YAAY,OAAO;;;;KAIhB,mBAAmB,SAAS;WACtB;;KAEN,2BAA2B;WACrB,SAAS,SAAS,eAAe;WACjC,OAAO,SAAS,eAAe;WAC/B,MAAM,SAAS,eAAe;WAC9B,cAAc,SAAS,eAAe;WACtC,YAAY,SAAS,eAAe;;UAErC;WACC;WACA,SAAS,SAAS,eAAe,SAAS;;;;;;;;;;;;;;;;cAgBvC,uBAAuB;;;;;;;;SAQ5B,SAAS;WACP;WACA;WACA,SAAS;EAClB,YAAY,OAAO;MACf,SAAS,SAAS,eAAe;MACjC,YAAY,SAAS,eAAe;MACpC,UAAU,SAAS,eAAe;MAClC,QAAQ,SAAS,eAAe;MAChC,OAAO,SAAS,eAAe;MAC/B,aAAa,SAAS,eAAe;;;;;;EAMzC;;;;;;;EAOA,aAAa;;;;;;;EAOb,gBAAgB;;;;;;;;;EAShB;;;;;;;;EAQA,0BAA0B;;;;;;;;EAQ1B,YAAY,mBAAmB,iBAAiB;;;;;;;;;;;;EAYhD,cAAc,UAAU;;;;;;;;;;;;;;;;;;;;;cAqBZ,8BAA8B;kBAC1B,UAAU;EAC1B,YAAY,QAAQ;EACpB;EACA,aAAa;EACb;EACA,0BAA0B;EAC1B,YAAY,mBAAmB,iBAAiB;;;;;;;;;;;iBAWjC,iBAAiB,cAAc,MAAM;;;;;;;;;;;;;;;iBAerC,wBAAwB,OAAO,oBAAoB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { blindCast } from "@prisma/orm-framework/utils/casts";
|
|
2
2
|
import { freezeNode } from "@prisma/orm-framework/components/ir";
|
|
3
3
|
import { PrimaryKey, SqlCheckConstraintIR, SqlColumnIR, SqlForeignKeyIR, SqlIndexIR, SqlSchemaIRNode, SqlUniqueIR, assertNode, relationalNodeEntityKind, relationalNodeGranularity } from "@prisma/orm-family-sql/schema-ir/types";
|
|
4
|
-
//#region ../../../3-targets/postgres/1-target/dist/postgres-table-schema-node-
|
|
4
|
+
//#region ../../../3-targets/postgres/1-target/dist/postgres-table-schema-node-nY6II-Uv.mjs
|
|
5
5
|
/**
|
|
6
6
|
* The `nodeKind` discriminant for each Postgres schema-diff node. Each node
|
|
7
7
|
* carries a unique value; the static `is`/`assert` guards compare against these
|
|
@@ -14,7 +14,8 @@ const PostgresSchemaNodeKind = {
|
|
|
14
14
|
table: "postgres-table",
|
|
15
15
|
policy: "postgres-policy",
|
|
16
16
|
role: "postgres-role",
|
|
17
|
-
nativeEnum: "postgres-native-enum"
|
|
17
|
+
nativeEnum: "postgres-native-enum",
|
|
18
|
+
extension: "postgres-extension"
|
|
18
19
|
};
|
|
19
20
|
/**
|
|
20
21
|
* The one real map from a Postgres-specific `nodeKind` to the
|
|
@@ -28,7 +29,8 @@ const POSTGRES_NODE_GRANULARITY = {
|
|
|
28
29
|
[PostgresSchemaNodeKind.table]: "entity",
|
|
29
30
|
[PostgresSchemaNodeKind.policy]: "structural",
|
|
30
31
|
[PostgresSchemaNodeKind.role]: "structural",
|
|
31
|
-
[PostgresSchemaNodeKind.nativeEnum]: "entity"
|
|
32
|
+
[PostgresSchemaNodeKind.nativeEnum]: "entity",
|
|
33
|
+
[PostgresSchemaNodeKind.extension]: "entity"
|
|
32
34
|
};
|
|
33
35
|
function isPostgresSchemaNodeKind(nodeKind) {
|
|
34
36
|
return Object.hasOwn(POSTGRES_NODE_GRANULARITY, nodeKind);
|
|
@@ -66,7 +68,8 @@ function postgresDiffSubjectGranularity(nodeKind) {
|
|
|
66
68
|
*/
|
|
67
69
|
const POSTGRES_NODE_ENTITY_KIND = {
|
|
68
70
|
[PostgresSchemaNodeKind.table]: "table",
|
|
69
|
-
[PostgresSchemaNodeKind.nativeEnum]: "native_enum"
|
|
71
|
+
[PostgresSchemaNodeKind.nativeEnum]: "native_enum",
|
|
72
|
+
[PostgresSchemaNodeKind.extension]: "extension"
|
|
70
73
|
};
|
|
71
74
|
/** Looks up the storage entityKind for a Postgres-specific `nodeKind`. */
|
|
72
75
|
function postgresNodeEntityKind(nodeKind) {
|
|
@@ -84,6 +87,47 @@ function postgresDiffSubjectEntityKind(nodeKind) {
|
|
|
84
87
|
return isPostgresSchemaNodeKind(nodeKind) ? postgresNodeEntityKind(nodeKind) : relationalNodeEntityKind(nodeKind);
|
|
85
88
|
}
|
|
86
89
|
/**
|
|
90
|
+
* Schema-diff node for an installed Postgres extension. An extension's name is unique in the whole database, so the node sits on the database root and pairs by name alone; the schema holding its objects is compared, so an extension in another schema is one mismatch rather than a missing and an extra extension.
|
|
91
|
+
*/
|
|
92
|
+
var PostgresExtensionSchemaNode = class PostgresExtensionSchemaNode extends SqlSchemaIRNode {
|
|
93
|
+
nodeKind = PostgresSchemaNodeKind.extension;
|
|
94
|
+
name;
|
|
95
|
+
schemaName;
|
|
96
|
+
constructor(input) {
|
|
97
|
+
super();
|
|
98
|
+
this.name = input.name;
|
|
99
|
+
this.schemaName = input.schemaName;
|
|
100
|
+
if (input.control !== void 0) this.control = input.control;
|
|
101
|
+
freezeNode(this);
|
|
102
|
+
}
|
|
103
|
+
get id() {
|
|
104
|
+
return this.name;
|
|
105
|
+
}
|
|
106
|
+
children() {
|
|
107
|
+
return [];
|
|
108
|
+
}
|
|
109
|
+
isEqualTo(other) {
|
|
110
|
+
const node = blindCast(other);
|
|
111
|
+
PostgresExtensionSchemaNode.assert(node);
|
|
112
|
+
return this.name === node.name && this.schemaName === node.schemaName;
|
|
113
|
+
}
|
|
114
|
+
explainMismatch(actual) {
|
|
115
|
+
if (actual === void 0) return void 0;
|
|
116
|
+
const node = blindCast(actual);
|
|
117
|
+
if (!PostgresExtensionSchemaNode.is(node)) return void 0;
|
|
118
|
+
return {
|
|
119
|
+
text: `extension "${this.name}" is installed in schema "${node.schemaName}", and the contract declares it in schema "${this.schemaName}"`,
|
|
120
|
+
cause: "differs"
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
static is(node) {
|
|
124
|
+
return node.nodeKind === PostgresSchemaNodeKind.extension;
|
|
125
|
+
}
|
|
126
|
+
static assert(node) {
|
|
127
|
+
assertNode(node, "PostgresExtensionSchemaNode", PostgresExtensionSchemaNode.is);
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
/**
|
|
87
131
|
* Schema-diff leaf node for a native Postgres enum type.
|
|
88
132
|
*
|
|
89
133
|
* This is a derived, transient node walked by the differ — it is NEVER
|
|
@@ -207,6 +251,6 @@ var PostgresTableSchemaNode = class PostgresTableSchemaNode extends SqlSchemaIRN
|
|
|
207
251
|
}
|
|
208
252
|
};
|
|
209
253
|
//#endregion
|
|
210
|
-
export {
|
|
254
|
+
export { postgresDiffSubjectEntityKind as a, PostgresTableSchemaNode as i, PostgresNativeEnumSchemaNode as n, postgresDiffSubjectGranularity as o, PostgresSchemaNodeKind as r, postgresNodeEntityKind as s, PostgresExtensionSchemaNode as t };
|
|
211
255
|
|
|
212
|
-
//# sourceMappingURL=postgres-table-schema-node-
|
|
256
|
+
//# sourceMappingURL=postgres-table-schema-node-nY6II-Uv-Bj-lgmSi.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"postgres-table-schema-node-nY6II-Uv-Bj-lgmSi.mjs","names":[],"sources":["../../../../3-targets/postgres/1-target/dist/postgres-table-schema-node-nY6II-Uv.mjs"],"sourcesContent":["import { blindCast } from \"@internal/utils/casts\";\nimport { freezeNode } from \"@internal/framework-components/ir\";\nimport { PrimaryKey, SqlCheckConstraintIR, SqlColumnIR, SqlForeignKeyIR, SqlIndexIR, SqlSchemaIRNode, SqlUniqueIR, assertNode, relationalNodeEntityKind, relationalNodeGranularity } from \"@internal/sql-schema-ir/types\";\n//#region src/core/schema-ir/schema-node-kinds.ts\n/**\n* The `nodeKind` discriminant for each Postgres schema-diff node. Each node\n* carries a unique value; the static `is`/`assert` guards compare against these\n* identifiers rather than spelling the string inline or using `instanceof`. The\n* field is an enumerable own property carried on every node instance.\n*/\nconst PostgresSchemaNodeKind = {\n\tdatabase: \"postgres-database\",\n\tnamespace: \"postgres-namespace\",\n\ttable: \"postgres-table\",\n\tpolicy: \"postgres-policy\",\n\trole: \"postgres-role\",\n\tnativeEnum: \"postgres-native-enum\",\n\textension: \"postgres-extension\"\n};\n/**\n* The one real map from a Postgres-specific `nodeKind` to the\n* framework-neutral {@link DiffSubjectGranularity} its diff issues carry —\n* resolution is by `nodeKind` equality against this map, never a\n* `nodeKind`-suffix string match and never anything stamped on the node.\n*/\nconst POSTGRES_NODE_GRANULARITY = {\n\t[PostgresSchemaNodeKind.database]: \"structural\",\n\t[PostgresSchemaNodeKind.namespace]: \"namespace\",\n\t[PostgresSchemaNodeKind.table]: \"entity\",\n\t[PostgresSchemaNodeKind.policy]: \"structural\",\n\t[PostgresSchemaNodeKind.role]: \"structural\",\n\t[PostgresSchemaNodeKind.nativeEnum]: \"entity\",\n\t[PostgresSchemaNodeKind.extension]: \"entity\"\n};\nfunction isPostgresSchemaNodeKind(nodeKind) {\n\treturn Object.hasOwn(POSTGRES_NODE_GRANULARITY, nodeKind);\n}\n/** Looks up the subject granularity for a Postgres-specific `nodeKind`. */\nfunction postgresNodeGranularity(nodeKind) {\n\treturn POSTGRES_NODE_GRANULARITY[nodeKind];\n}\n/**\n* The subject granularity for any node kind that appears in a Postgres diff\n* tree — the tree mixes Postgres-specific kinds (database/namespace/table/\n* policy/role) with the relational leaf kinds (columns, constraints, indexes,\n* …), so this dispatches to whichever family/target map owns the kind. Called\n* on demand by consumers (the family verdict, the framework aggregate's\n* unclaimed-elements sweep, via the {@link\n* import('@internal/framework-components/control').SchemaSubjectClassifierCapable}\n* capability) — never stamped onto the issue or the node.\n*/\nfunction postgresDiffSubjectGranularity(nodeKind) {\n\treturn isPostgresSchemaNodeKind(nodeKind) ? postgresNodeGranularity(nodeKind) : relationalNodeGranularity(nodeKind);\n}\n/**\n* The map from a Postgres-specific `nodeKind` to its storage `entityKind` — the\n* same vocabulary the contract storage's `entries` dictionary keys use. The\n* whole-table and native-enum kinds each have an entity of their own;\n* database/namespace/policy/role nodes map to nothing here (a namespace is\n* addressed by id, not by an `entries` kind; policies and roles are\n* structural, never a sibling space's unclaimed entity).\n*\n* The native enum keys under its PHYSICAL type name in `entries.native_enum`\n* (ADR 221), so its diff node's `typeName` addresses the entity on the generic\n* coordinate directly — no by-type-name walk needed. This lets the framework's\n* unclaimed-elements sweep classify enum ownership the same coordinate way it\n* classifies tables.\n*/\nconst POSTGRES_NODE_ENTITY_KIND = {\n\t[PostgresSchemaNodeKind.table]: \"table\",\n\t[PostgresSchemaNodeKind.nativeEnum]: \"native_enum\",\n\t[PostgresSchemaNodeKind.extension]: \"extension\"\n};\n/** Looks up the storage entityKind for a Postgres-specific `nodeKind`. */\nfunction postgresNodeEntityKind(nodeKind) {\n\treturn POSTGRES_NODE_ENTITY_KIND[nodeKind];\n}\n/**\n* The storage `entityKind` for any node kind that appears in a Postgres diff\n* tree — sibling of {@link postgresDiffSubjectGranularity}, dispatching the\n* same way to whichever family/target map owns the kind. Called on demand by\n* the framework aggregate's unclaimed-elements sweep via the {@link\n* import('@internal/framework-components/control').SchemaSubjectClassifierCapable}\n* capability — never stamped onto the issue or the node.\n*/\nfunction postgresDiffSubjectEntityKind(nodeKind) {\n\treturn isPostgresSchemaNodeKind(nodeKind) ? postgresNodeEntityKind(nodeKind) : relationalNodeEntityKind(nodeKind);\n}\n//#endregion\n//#region src/core/schema-ir/postgres-extension-schema-node.ts\n/**\n* Schema-diff node for an installed Postgres extension. An extension's name is unique in the whole database, so the node sits on the database root and pairs by name alone; the schema holding its objects is compared, so an extension in another schema is one mismatch rather than a missing and an extra extension.\n*/\nvar PostgresExtensionSchemaNode = class PostgresExtensionSchemaNode extends SqlSchemaIRNode {\n\tnodeKind = PostgresSchemaNodeKind.extension;\n\tname;\n\tschemaName;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.name = input.name;\n\t\tthis.schemaName = input.schemaName;\n\t\tif (input.control !== void 0) this.control = input.control;\n\t\tfreezeNode(this);\n\t}\n\tget id() {\n\t\treturn this.name;\n\t}\n\tchildren() {\n\t\treturn [];\n\t}\n\tisEqualTo(other) {\n\t\tconst node = blindCast(other);\n\t\tPostgresExtensionSchemaNode.assert(node);\n\t\treturn this.name === node.name && this.schemaName === node.schemaName;\n\t}\n\texplainMismatch(actual) {\n\t\tif (actual === void 0) return void 0;\n\t\tconst node = blindCast(actual);\n\t\tif (!PostgresExtensionSchemaNode.is(node)) return void 0;\n\t\treturn {\n\t\t\ttext: `extension \"${this.name}\" is installed in schema \"${node.schemaName}\", and the contract declares it in schema \"${this.schemaName}\"`,\n\t\t\tcause: \"differs\"\n\t\t};\n\t}\n\tstatic is(node) {\n\t\treturn node.nodeKind === PostgresSchemaNodeKind.extension;\n\t}\n\tstatic assert(node) {\n\t\tassertNode(node, \"PostgresExtensionSchemaNode\", PostgresExtensionSchemaNode.is);\n\t}\n};\n//#endregion\n//#region src/core/schema-ir/postgres-native-enum-schema-node.ts\n/**\n* Schema-diff leaf node for a native Postgres enum type.\n*\n* This is a derived, transient node walked by the differ — it is NEVER\n* serialized. Both sides derive it on the namespace node: the expected side\n* from the contract's hydrated `entries.native_enum` entities, the actual\n* side from the adapter's introspected `nativeEnums`.\n*\n* Enum types are schema-scoped, so identity is (namespace, type name): the\n* namespace coordinate comes from tree position (the differ pairs enum nodes\n* only inside an already-paired namespace) and `id` carries the type name,\n* prefixed with the entries-kind vocabulary (`native_enum:<typeName>`) so it\n* cannot collide with a sibling table of the same name — the same\n* sibling-prefix convention relational column nodes use (`column:<name>`).\n*\n* `isEqualTo` compares members POSITIONALLY — `['a','b'] ≠ ['b','a']` —\n* because Postgres enum sort order is semantic. `control` is contract\n* metadata, not database state, and does not participate in equality.\n*/\nvar PostgresNativeEnumSchemaNode = class PostgresNativeEnumSchemaNode extends SqlSchemaIRNode {\n\tnodeKind = PostgresSchemaNodeKind.nativeEnum;\n\ttypeName;\n\tnamespaceId;\n\tmembers;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.typeName = input.typeName;\n\t\tthis.namespaceId = input.namespaceId;\n\t\tthis.members = Object.freeze([...input.members]);\n\t\tif (input.control !== void 0) this.control = input.control;\n\t\tfreezeNode(this);\n\t}\n\tget id() {\n\t\treturn `native_enum:${this.typeName}`;\n\t}\n\tchildren() {\n\t\treturn [];\n\t}\n\tisEqualTo(other) {\n\t\tconst node = blindCast(other);\n\t\tPostgresNativeEnumSchemaNode.assert(node);\n\t\treturn this.typeName === node.typeName && this.members.length === node.members.length && this.members.every((member, index) => member === node.members[index]);\n\t}\n\tstatic is(node) {\n\t\treturn node.nodeKind === PostgresSchemaNodeKind.nativeEnum;\n\t}\n\tstatic assert(node) {\n\t\tassertNode(node, \"PostgresNativeEnumSchemaNode\", PostgresNativeEnumSchemaNode.is);\n\t}\n};\n//#endregion\n//#region src/core/schema-ir/postgres-table-schema-node.ts\n/**\n* Postgres-specific table schema-diff node. Carries all `SqlTableIR` fields\n* plus `policies`, and implements `DiffableNode` so the table instance is\n* directly the diff-tree node — no separate wrapper needed.\n*\n* Extends `SqlSchemaIRNode` directly rather than `SqlTableIR` because\n* `SqlTableIR` calls `freezeNode` in its own constructor, which prevents\n* subclass field initialisation.\n*\n* `id` is the table name. `isEqualTo` compares id + `rlsEnabled` — the\n* table's one own diffable attribute; all other structural drift is\n* expressed by its children. `children()` returns every column, the primary\n* key (when present), every foreign key, unique, index, and check constraint,\n* plus the policy nodes — one flat list, so a drifted column and a drifted\n* policy are both reported by the same walk. Order is deterministic (object\n* key order for columns, array order for the rest) so two structurally equal\n* tables always produce the same child list.\n*/\nvar PostgresTableSchemaNode = class PostgresTableSchemaNode extends SqlSchemaIRNode {\n\tnodeKind = PostgresSchemaNodeKind.table;\n\tname;\n\tcolumns;\n\tforeignKeys;\n\tuniques;\n\tindexes;\n\tpolicies;\n\trlsEnabled;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.name = input.name;\n\t\tthis.rlsEnabled = input.rlsEnabled;\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((i) => i instanceof SqlIndexIR ? i : new SqlIndexIR(i)));\n\t\tif (input.primaryKey !== void 0) this.primaryKey = input.primaryKey instanceof PrimaryKey ? input.primaryKey : new PrimaryKey(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((c) => c instanceof SqlCheckConstraintIR ? c : new SqlCheckConstraintIR(c)));\n\t\tthis.policies = Object.freeze([...input.policies ?? []]);\n\t\tfreezeNode(this);\n\t}\n\tget id() {\n\t\treturn this.name;\n\t}\n\t/**\n\t* Equal iff the ids (names) match AND `rlsEnabled` matches — the table's\n\t* one own attribute in the diff; all other structural drift is expressed\n\t* by children. A paired `not-equal` therefore always means enablement\n\t* drift, which the planner maps to ENABLE/DISABLE ROW LEVEL SECURITY.\n\t*/\n\tisEqualTo(other) {\n\t\tconst node = blindCast(other);\n\t\tPostgresTableSchemaNode.assert(node);\n\t\treturn this.id === node.id && this.rlsEnabled === node.rlsEnabled;\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\t...this.policies\n\t\t];\n\t}\n\tstatic is(node) {\n\t\treturn node.nodeKind === PostgresSchemaNodeKind.table;\n\t}\n\tstatic assert(node) {\n\t\tassertNode(node, \"PostgresTableSchemaNode\", PostgresTableSchemaNode.is);\n\t}\n};\n//#endregion\nexport { postgresDiffSubjectEntityKind as a, PostgresSchemaNodeKind as i, PostgresNativeEnumSchemaNode as n, postgresDiffSubjectGranularity as o, PostgresExtensionSchemaNode as r, postgresNodeEntityKind as s, PostgresTableSchemaNode as t };\n\n//# sourceMappingURL=postgres-table-schema-node-nY6II-Uv.mjs.map"],"mappings":";;;;;;;;;;AAUA,MAAM,yBAAyB;CAC9B,UAAU;CACV,WAAW;CACX,OAAO;CACP,QAAQ;CACR,MAAM;CACN,YAAY;CACZ,WAAW;AACZ;;;;;;;AAOA,MAAM,4BAA4B;EAChC,uBAAuB,WAAW;EAClC,uBAAuB,YAAY;EACnC,uBAAuB,QAAQ;EAC/B,uBAAuB,SAAS;EAChC,uBAAuB,OAAO;EAC9B,uBAAuB,aAAa;EACpC,uBAAuB,YAAY;AACrC;AACA,SAAS,yBAAyB,UAAU;CAC3C,OAAO,OAAO,OAAO,2BAA2B,QAAQ;AACzD;;AAEA,SAAS,wBAAwB,UAAU;CAC1C,OAAO,0BAA0B;AAClC;;;;;;;;;;;AAWA,SAAS,+BAA+B,UAAU;CACjD,OAAO,yBAAyB,QAAQ,IAAI,wBAAwB,QAAQ,IAAI,0BAA0B,QAAQ;AACnH;;;;;;;;;;;;;;;AAeA,MAAM,4BAA4B;EAChC,uBAAuB,QAAQ;EAC/B,uBAAuB,aAAa;EACpC,uBAAuB,YAAY;AACrC;;AAEA,SAAS,uBAAuB,UAAU;CACzC,OAAO,0BAA0B;AAClC;;;;;;;;;AASA,SAAS,8BAA8B,UAAU;CAChD,OAAO,yBAAyB,QAAQ,IAAI,uBAAuB,QAAQ,IAAI,yBAAyB,QAAQ;AACjH;;;;AAMA,IAAI,8BAA8B,MAAM,oCAA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AAS,OAAO,OAAO,MAAM,OAAO,KAAK,MAAM,aAAa,uBAAuB,IAAI,IAAI,qBAAqB,CAAC,CAAC,CAAC;EAChL,KAAK,WAAW,OAAO,OAAO,CAAC,GAAG,MAAM,YAAY,CAAC,CAAC,CAAC;EACvD,WAAW,IAAI;CAChB;CACA,IAAI,KAAK;EACR,OAAO,KAAK;CACb;;;;;;;CAOA,UAAU,OAAO;EAChB,MAAM,OAAO,UAAU,KAAK;EAC5B,wBAAwB,OAAO,IAAI;EACnC,OAAO,KAAK,OAAO,KAAK,MAAM,KAAK,eAAe,KAAK;CACxD;CACA,WAAW;EACV,OAAO;GACN,GAAG,OAAO,OAAO,KAAK,OAAO;GAC7B,GAAG,KAAK,aAAa,CAAC,KAAK,UAAU,IAAI,CAAC;GAC1C,GAAG,KAAK;GACR,GAAG,KAAK;GACR,GAAG,KAAK;GACR,GAAG,KAAK,UAAU,CAAC;GACnB,GAAG,KAAK;EACT;CACD;CACA,OAAO,GAAG,MAAM;EACf,OAAO,KAAK,aAAa,uBAAuB;CACjD;CACA,OAAO,OAAO,MAAM;EACnB,WAAW,MAAM,2BAA2B,wBAAwB,EAAE;CACvE;AACD"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { t as PostgresRlsPolicy } from "./postgres-rls-policy-CnDxf3z9-BjpVyUnK.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { c as PostgresRole, i as PostgresNativeEnum, n as PostgresExtension, o as PostgresRlsEnablement, p as postgresCreateNamespace, s as PostgresRlsEnablementInput } from "./postgres-schema-CJvUnBU9-Bvn7zbr1.mjs";
|
|
3
3
|
import { t as postgresRenderCheckExpressions } from "./check-expressions-BLd3bGf1-CwtBWbN3.mjs";
|
|
4
4
|
import { Et as postgresQualifyColumnType } from "./codecs-3AVVZDao-C0sUjmuO.mjs";
|
|
5
5
|
import { c as FullTextSearchLanguage, i as FullTextFieldsInput } from "./full-text-index-definition-D5iBWLss-BEpqiucV.mjs";
|
|
6
6
|
import { o as ParameterizedOutputTypesForTypeParams, r as CodecTypes } from "./codec-types-xyW4TiJD-CRDK7QcS.mjs";
|
|
7
7
|
import { l as QueryOperationTypesForCodecs } from "./operation-types-DxFsD0qF-Cu43r84y.mjs";
|
|
8
|
-
import { a as
|
|
8
|
+
import { a as policyBothPredicatesSpec, c as postgresLowerEntityHandles, i as nativeEnumSpec, l as roleSpec, n as RoleExtensionBlock, o as policyUsingOnlySpec, r as extensionSpec, s as policyWithCheckOnlySpec, t as RlsPolicyExtensionBlock } from "./authoring-BRqyCnBa-CAzlQNHw.mjs";
|
|
9
9
|
import "@prisma/orm-family-sql/contract/data-type";
|
|
10
10
|
import { JsonValue } from "@prisma/orm-framework/contract/types";
|
|
11
11
|
//#region ../../../3-targets/postgres/1-target/dist/prisma7-binding.d.mts
|
|
@@ -924,7 +924,7 @@ declare const prisma7PostgresBinding: {
|
|
|
924
924
|
name: string;
|
|
925
925
|
tableName: string;
|
|
926
926
|
namespaceId: string;
|
|
927
|
-
operation: "select" | "
|
|
927
|
+
operation: "select" | "insert" | "update" | "delete" | "all";
|
|
928
928
|
roles: readonly string[];
|
|
929
929
|
permissive: boolean;
|
|
930
930
|
prefix?: string;
|
|
@@ -955,6 +955,19 @@ declare const prisma7PostgresBinding: {
|
|
|
955
955
|
};
|
|
956
956
|
};
|
|
957
957
|
};
|
|
958
|
+
readonly extension: {
|
|
959
|
+
readonly kind: "entity";
|
|
960
|
+
readonly discriminator: "extension";
|
|
961
|
+
readonly validatorSchema: import("arktype/internal/variants/object.ts").ObjectType<{
|
|
962
|
+
kind: "extension";
|
|
963
|
+
name: string;
|
|
964
|
+
control?: "external" | "managed" | "tolerated" | "observed";
|
|
965
|
+
}, {}>;
|
|
966
|
+
readonly output: {
|
|
967
|
+
readonly factory: (block: import("@prisma/orm-framework/psl-parser").ParsedPslExtensionBlock) => PostgresExtension;
|
|
968
|
+
readonly nameUniqueAcrossNamespaces: true;
|
|
969
|
+
};
|
|
970
|
+
};
|
|
958
971
|
};
|
|
959
972
|
readonly pslBlockDescriptors: {
|
|
960
973
|
readonly policy_select: {
|
|
@@ -1078,6 +1091,16 @@ declare const prisma7PostgresBinding: {
|
|
|
1078
1091
|
};
|
|
1079
1092
|
spec: typeof roleSpec;
|
|
1080
1093
|
};
|
|
1094
|
+
readonly extension: {
|
|
1095
|
+
kind: "pslBlock";
|
|
1096
|
+
keyword: string;
|
|
1097
|
+
documentation: string;
|
|
1098
|
+
discriminator: string;
|
|
1099
|
+
name: {
|
|
1100
|
+
required: true;
|
|
1101
|
+
};
|
|
1102
|
+
spec: typeof extensionSpec;
|
|
1103
|
+
};
|
|
1081
1104
|
};
|
|
1082
1105
|
readonly modelAttributes: {
|
|
1083
1106
|
readonly rls: {
|
|
@@ -1201,6 +1224,27 @@ declare const prisma7PostgresBinding: {
|
|
|
1201
1224
|
readonly entityKind: "native_enum";
|
|
1202
1225
|
readonly typeConstructor: readonly ["pg", "enum"];
|
|
1203
1226
|
};
|
|
1227
|
+
readonly extensions: {
|
|
1228
|
+
readonly previewFeature: "postgresqlExtensions";
|
|
1229
|
+
readonly entityKind: "extension";
|
|
1230
|
+
readonly packs: {
|
|
1231
|
+
readonly vector: {
|
|
1232
|
+
readonly id: "pgvector";
|
|
1233
|
+
readonly importName: "pgvector";
|
|
1234
|
+
readonly importPath: "@prisma/orm-extension-pgvector/control";
|
|
1235
|
+
};
|
|
1236
|
+
readonly postgis: {
|
|
1237
|
+
readonly id: "postgis";
|
|
1238
|
+
readonly importName: "postgis";
|
|
1239
|
+
readonly importPath: "@prisma/orm-extension-postgis/control";
|
|
1240
|
+
};
|
|
1241
|
+
readonly pg_search: {
|
|
1242
|
+
readonly id: "paradedb";
|
|
1243
|
+
readonly importName: "paradedb";
|
|
1244
|
+
readonly importPath: "@prisma/orm-extension-paradedb/control";
|
|
1245
|
+
};
|
|
1246
|
+
};
|
|
1247
|
+
};
|
|
1204
1248
|
readonly indexTypes: {
|
|
1205
1249
|
readonly BTree: "btree";
|
|
1206
1250
|
readonly Hash: "hash";
|
|
@@ -1242,4 +1286,4 @@ declare const prisma7PostgresBinding: {
|
|
|
1242
1286
|
};
|
|
1243
1287
|
//#endregion
|
|
1244
1288
|
export { prisma7PostgresBinding as t };
|
|
1245
|
-
//# sourceMappingURL=prisma7-binding-
|
|
1289
|
+
//# sourceMappingURL=prisma7-binding-BFypqPE0.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prisma7-binding-
|
|
1
|
+
{"version":3,"file":"prisma7-binding-BFypqPE0.d.mts","names":[],"sources":["../../../../3-targets/postgres/1-target/dist/prisma7-binding.d.mts"],"mappings":";;;;;;;;;;;;;UAaU;WACC;WACA;;;;;iBAKM,sBAAsB;;iBAEtB,sBAAsB,mBAAmB;;;;;;;;iBAQzC,2BAA2B,gBAAgB;;;iBAG3C,YAAY;;iBAEZ,yBAAyB,QAAQ,WAAW;WAClD;WACA,aAAa,SAAS;;;;;;;;;cASnB;WACH;aACE;aACA;aACA;aACA,yDAAyD,iBAAiB,uBAAuB;eAC/F;SACN;eACM;SACN;eACM;SACN;eACM;SACN;eACM;SACN;eACM;SACN;eACM;QACP;QACA;;;aAGK;eACE;iBACE;mBACE;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;qBACE;qBACA;qBACA;uBACE;uBACA;;qBAEF;uBACE;;;;iBAIN;mBACE;qBACE;qBACA;qBACA;uBACE;yBACE;yBACA;2BACE;;;uBAGJ;yBACE;yBACA;;;;mBAIN;qBACE;qBACA;qBACA;uBACE;yBACE;yBACA;2BACE;;;uBAGJ;yBACE;yBACA;;uBAEF;yBACE;yBACA;;;;;iBAKR;mBACE;mBACA;mBACA;qBACE;uBACE;uBACA;yBACE;;;;;iBAKR;mBACE;mBACA;mBACA;qBACE;uBACE;uBACA;yBACE;;;;;iBAKR;mBACE;mBACA;mBACA;qBACE;uBACE;uBACA;yBACE;;;;;iBAKR;mBACE;mBACA;mBACA;qBACE;uBACE;uBACA;yBACE;;;;;iBAKR;mBACE;mBACA;mBACA;qBACE;uBACE;uBACA;yBACE;;;;;iBAKR;mBACE;qBACE;qBACA;qBACA;uBACE;uBACA;uBACA;;qBAEF;uBACE;uBACA;yBACE;2BACE;2BACA;;;;;mBAKR;qBACE;qBACA;qBACA;uBACE;uBACA;uBACA;;qBAEF;uBACE;uBACA;yBACE;2BACE;2BACA;;;;;;iBAMV;mBACE;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;qBACA;;qBAEA;qBACA;qBACA;qBACA;qBACA;;qBAEA;qBACA;qBACA;qBACA;;mBAEF;qBACE;uBACE;uBACA;;qBAEF;qBACA;uBACE;;;qBAGF;uBACE;uBACA;;qBAEF;;qBAEA;uBACE;uBACA;;qBAEF;;qBAEA;uBACE;uBACA;;qBAEF;qBACA;uBACE;;;qBAGF;uBACE;uBACA;;qBAEF;;qBAEA;uBACE;uBACA;;qBAEF;;;iBAGJ;mBACE;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;qBACA;;qBAEA;qBACA;qBACA;qBACA;qBACA;;mBAEF;qBACE;uBACE;uBACA;;qBAEF;;qBAEA;uBACE;uBACA;;qBAEF;;;iBAGJ;mBACE;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;qBACA;;qBAEA;qBACA;qBACA;qBACA;qBACA;;qBAEA;qBACA;qBACA;qBACA;;mBAEF;qBACE;uBACE;uBACA;;qBAEF;;qBAEA;uBACE;uBACA;;qBAEF;;qBAEA;uBACE;uBACA;;qBAEF;;;iBAGJ;mBACE;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;qBACA;;qBAEA;qBACA;qBACA;qBACA;qBACA;;qBAEA;qBACA;qBACA;qBACA;;mBAEF;qBACE;uBACE;uBACA;;qBAEF;;qBAEA;uBACE;uBACA;;qBAEF;;;iBAGJ;mBACE;mBACA;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;;mBAEF;qBACE;qBACA;uBACE;yBACE;yBACA;;;;;iBAKR;mBACE;mBACA;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;;mBAEF;qBACE;qBACA;uBACE;yBACE;yBACA;;;;;iBAKR;mBACE;mBACA;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;;qBAEA;qBACA;qBACA;qBACA;;mBAEF;qBACE;qBACA;uBACE;yBACE;yBACA;;uBAEF;yBACE;yBACA;;;;;iBAKR;mBACE;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;;mBAEF;qBACE;qBACA;uBACE;yBACE;yBACA;;;;;iBAKR;mBACE;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;;mBAEF;qBACE;qBACA;uBACE;yBACE;yBACA;;;;;iBAKR;mBACE;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;;mBAEF;qBACE;qBACA;uBACE;yBACE;yBACA;;;;;iBAKR;mBACE;mBACA;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;;mBAEF;qBACE;qBACA;uBACE;yBACE;yBACA;;;;;iBAKR;mBACE;mBACA;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;;mBAEF;qBACE;qBACA;uBACE;yBACE;yBACA;;;;;iBAKR;mBACE;mBACA;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;;mBAEF;qBACE;qBACA;uBACE;yBACE;yBACA;;;;;iBAKR;mBACE;mBACA;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;;mBAEF;qBACE;qBACA;uBACE;yBACE;yBACA;;;;;iBAKR;mBACE;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;;mBAEF;qBACE;qBACA;uBACE;yBACE;yBACA;;;;;iBAKR;mBACE;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;;mBAEF;qBACE;qBACA;uBACE;yBACE;yBACA;;;;;iBAKR;mBACE;mBACA;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;;mBAEF;qBACE;qBACA;uBACE;yBACE;yBACA;;;;;iBAKR;mBACE;mBACA;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;;mBAEF;qBACE;qBACA;uBACE;yBACE;yBACA;;;;;iBAKR;mBACE;mBACA;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;;mBAEF;qBACE;qBACA;uBACE;yBACE;yBACA;;;;;iBAKR;mBACE;mBACA;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;;mBAEF;qBACE;qBACA;uBACE;yBACE;yBACA;;;;;iBAKR;mBACE;mBACA;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;;mBAEF;qBACE;qBACA;uBACE;yBACE;yBACA;;;;;;eAMV,WAAW,SAAS,kEAAkE;eACtF,uEAAuE;eACvE;iBACE;mBACE;mBACA;mBACA,+DAA+D;YACtE;YACA;YACA;YACA;;mBAEO;qBACE,UAAU,OAAO,oBAAoB,wDAAwD,2BAA2B;;;iBAG5H;mBACE;mBACA;mBACA,+DAA+D;YACtE;YACA;YACA;;mBAEO;qBACE,UAAU,OAAO,+BAA+B;;;iBAGpD;mBACE;mBACA;mBACA,+DAA+D;YACtE;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;;mBAEO;YACP,UAAU,OAAO,yBAAyB,wDAAwD,2BAA2B;YAC7H,eAAe,QAAQ;cACrB;;;;iBAIG;mBACE;mBACA;mBACA,+DAA+D;YACtE;YACA;YACA;YACA;;mBAEO;YACP,UAAU,sCAAsC,wBAAwB,yBAAyB,wDAAwD,2BAA2B;YACpL,iBAAiB,QAAQ;cACvB;cACA;;;;iBAIG;mBACE;mBACA;mBACA,+DAA+D;YACtE;YACA;YACA;;mBAEO;qBACE,UAAU,sCAAsC,4BAA4B;qBAC5E;;;;eAIN;iBACE;UACP;UACA;UACA;UACA;UACA;YACE;;UAEF,aAAa;UACb;qBACW;qBACA;;UAEX;YACE,0CAA0C;cACxC;8CACgC;;;iBAG7B;UACP;UACA;UACA;UACA;UACA;YACE;;UAEF,aAAa;UACb;qBACW;qBACA;;UAEX;YACE,0CAA0C;cACxC;8CACgC;;;iBAG7B;UACP;UACA;UACA;UACA;UACA;YACE;;UAEF,aAAa;UACb;qBACW;qBACA;;UAEX;YACE,0CAA0C;cACxC;8CACgC;;;iBAG7B;UACP;UACA;UACA;UACA;UACA;YACE;;UAEF,aAAa;UACb;qBACW;qBACA;;UAEX;YACE,0CAA0C;cACxC;8CACgC;;;iBAG7B;UACP;UACA;UACA;UACA;UACA;YACE;;UAEF,aAAa;UACb;qBACW;qBACA;;UAEX;YACE,0CAA0C;cACxC;8CACgC;;;iBAG7B;UACP;UACA;UACA;UACA;UACA;YACE;;UAEF,aAAa;UACb;UACA;YACE,0CAA0C;cACxC;8CACgC;;;iBAG7B;UACP;UACA;UACA;UACA;UACA;YACE;;UAEF,aAAa;;iBAEN;UACP;UACA;UACA;UACA;UACA;YACE;;UAEF,aAAa;;;eAGR;iBACE;mBACE;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aACb;;aAEA;aACA;aACA,OAAO;aACP,kBAAkB;MACzB;MACA"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { r as inlineLiteral } from "./sql-utils-VXrIh8dJ-DVxo_Ygp.mjs";
|
|
2
2
|
import { $ as pgVarchar, B as pgText, C as pgFloat4, D as pgInt4, E as pgInt2, H as pgTime, I as pgNumeric, J as pgTimetz, K as pgTimestamptz, M as pgJsonb, O as pgInt8, P as pgMoney, Q as pgVarbit, R as pgOid, T as pgInet, W as pgTimestamp, Z as pgUuid, _ as pgChar, d as pgBit, et as pgXml, it as postgresYearText, j as pgJson, m as pgBytea, p as pgBool, tt as postgresDataTypes, w as pgFloat8, y as pgDate } from "./data-types-DHpMs3mz-BllVpLs5.mjs";
|
|
3
3
|
import { a as postgresCodecDescriptorRegistry } from "./codec-registry-D-bD-lFp-BCSmwfrE.mjs";
|
|
4
|
-
import {
|
|
5
|
-
import { c as postgresScalarAndNativeTypeConstructors } from "./authoring-
|
|
4
|
+
import { v as postgresCreateNamespace } from "./postgres-schema-BBWgs4fX-DWdYxNi8.mjs";
|
|
5
|
+
import { c as postgresScalarAndNativeTypeConstructors } from "./authoring-BFb5LVsK-CkHmM-aP.mjs";
|
|
6
6
|
import { t as postgresDataTypeEntries } from "./data-type-entries-Df5SOplt-DHEaXqF0.mjs";
|
|
7
|
-
import { t as postgresTargetDescriptorMeta } from "./descriptor-meta-
|
|
7
|
+
import { t as postgresTargetDescriptorMeta } from "./descriptor-meta-CszCf4Hs-DVGeuxNv.mjs";
|
|
8
8
|
import { n as defaultPrimaryKeyName, t as defaultForeignKeyName } from "./default-constraint-names-Cz9Yoeim-sUzOGvIm.mjs";
|
|
9
|
-
import {
|
|
9
|
+
import { d as createPostgresDefaultMapping, h as noInferredDefaults, m as noColumnDefaults, u as buildPslDocumentAst } from "./infer-psl-contract-BP2DgxTx-BqV8gUu4.mjs";
|
|
10
10
|
import { createDataTypeLookup } from "@prisma/orm-framework/components/codec";
|
|
11
11
|
import { InternalError } from "@prisma/orm-framework/utils/internal-error";
|
|
12
12
|
import { isSqlDataType, renderSqlTypeName } from "@prisma/orm-family-sql/contract/data-type";
|
|
@@ -283,6 +283,27 @@ const prisma7PostgresBinding = {
|
|
|
283
283
|
entityKind: "native_enum",
|
|
284
284
|
typeConstructor: ["pg", "enum"]
|
|
285
285
|
},
|
|
286
|
+
extensions: {
|
|
287
|
+
previewFeature: "postgresqlExtensions",
|
|
288
|
+
entityKind: "extension",
|
|
289
|
+
packs: {
|
|
290
|
+
vector: {
|
|
291
|
+
id: "pgvector",
|
|
292
|
+
importName: "pgvector",
|
|
293
|
+
importPath: "@prisma/orm-extension-pgvector/control"
|
|
294
|
+
},
|
|
295
|
+
postgis: {
|
|
296
|
+
id: "postgis",
|
|
297
|
+
importName: "postgis",
|
|
298
|
+
importPath: "@prisma/orm-extension-postgis/control"
|
|
299
|
+
},
|
|
300
|
+
pg_search: {
|
|
301
|
+
id: "paradedb",
|
|
302
|
+
importName: "paradedb",
|
|
303
|
+
importPath: "@prisma/orm-extension-paradedb/control"
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
},
|
|
286
307
|
indexTypes: {
|
|
287
308
|
BTree: "btree",
|
|
288
309
|
Hash: "hash",
|
|
@@ -327,4 +348,4 @@ const prisma7PostgresBinding = {
|
|
|
327
348
|
//#endregion
|
|
328
349
|
export { prisma7PostgresBinding as t };
|
|
329
350
|
|
|
330
|
-
//# sourceMappingURL=prisma7-binding-
|
|
351
|
+
//# sourceMappingURL=prisma7-binding-DWW3L3C4.mjs.map
|