@prisma/orm-target-postgres 8.0.0-rc.18-dev.7 → 8.0.0-rc.18-dev.9
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-CC4Hpwbp.d.mts +403 -0
- package/dist/adapter-CC4Hpwbp.d.mts.map +1 -0
- package/dist/{adapter-DXUJlrmB-7Lk8j0kE.mjs → adapter-ofQbK8p5-DdhE9Pbv.mjs} +6 -6
- package/dist/adapter-ofQbK8p5-DdhE9Pbv.mjs.map +1 -0
- package/dist/adapter.d.mts +7 -7
- package/dist/adapter.mjs +6 -6
- package/dist/adapter__adapter.d.mts +2 -2
- package/dist/adapter__adapter.mjs +3 -3
- package/dist/adapter__column-types.d.mts +1 -1
- package/dist/adapter__control.d.mts +3 -3
- package/dist/adapter__control.mjs +6 -6
- package/dist/adapter__control.mjs.map +1 -1
- package/dist/adapter__runtime.mjs +4 -4
- package/dist/adapter__runtime.mjs.map +1 -1
- package/dist/adapter__sql-renderer.mjs +1 -1
- package/dist/adapter__types.d.mts +2 -2
- package/dist/{aggregates-B6ZQFHFE.mjs → aggregates-Brwk0sYS.mjs} +89 -31
- package/dist/aggregates-Brwk0sYS.mjs.map +1 -0
- package/dist/aggregates-rj1su5Va.d.mts +318 -0
- package/dist/aggregates-rj1su5Va.d.mts.map +1 -0
- package/dist/{authoring-CTn87jlt-VHX7hiNU.mjs → authoring-DOWd8Fpc-BE703X_J.mjs} +4 -4
- package/dist/{authoring-CTn87jlt-VHX7hiNU.mjs.map → authoring-DOWd8Fpc-BE703X_J.mjs.map} +1 -1
- package/dist/{autoincrement-widths-DbyXRo5B-BUVCYb_V.mjs → autoincrement-widths-DuylBJSq-T8e6pnMZ.mjs} +3 -3
- package/dist/{autoincrement-widths-DbyXRo5B-BUVCYb_V.mjs.map → autoincrement-widths-DuylBJSq-T8e6pnMZ.mjs.map} +1 -1
- package/dist/{codec-helpers-D0ah5Wb8-wdJJZ_8s.mjs → codec-helpers-IfGdyCFt-ihgFCc7D.mjs} +3 -40
- package/dist/codec-helpers-IfGdyCFt-ihgFCc7D.mjs.map +1 -0
- package/dist/{codec-registry-BWUY_QLt-CzrMkP9N.mjs → codec-registry-DSRFjaLX-Dwg0yBK7.mjs} +4 -4
- package/dist/{codec-registry-BWUY_QLt-CzrMkP9N.mjs.map → codec-registry-DSRFjaLX-Dwg0yBK7.mjs.map} +1 -1
- package/dist/{codec-type-map-DueQFJ3a-DKLtMn3R.d.mts → codec-type-map-BznmYkRz-QD11Yx27.d.mts} +3 -3
- package/dist/{codec-type-map-DueQFJ3a-DKLtMn3R.d.mts.map → codec-type-map-BznmYkRz-QD11Yx27.d.mts.map} +1 -1
- package/dist/codec-types-BZXuhZ1c-B9YQf_UN.d.mts +84 -0
- package/dist/codec-types-BZXuhZ1c-B9YQf_UN.d.mts.map +1 -0
- package/dist/codec-types-ZfL8TSVm.d.mts +2 -0
- package/dist/{codecs-ChjCJY5k.d.mts → codecs-BChKdFcD.d.mts} +2 -2
- package/dist/{codecs-ChjCJY5k.d.mts.map → codecs-BChKdFcD.d.mts.map} +1 -1
- package/dist/{codecs-y1gOMMt--DKWhYGN5.d.mts → codecs-CCzJelD2-bt89qO8s.d.mts} +2 -13
- package/dist/codecs-CCzJelD2-bt89qO8s.d.mts.map +1 -0
- package/dist/{codecs-Cb5S70Lx-WRSQkpza.mjs → codecs-CQaKsvhH-X9bscCr9.mjs} +4 -37
- package/dist/codecs-CQaKsvhH-X9bscCr9.mjs.map +1 -0
- package/dist/{column-types-Dq7mC_dL.d.mts → column-types-COdejX_b.d.mts} +44 -9
- package/dist/column-types-COdejX_b.d.mts.map +1 -0
- package/dist/{control-adapter-EatqP8Vh-CYWBxnLn.mjs → contract-contributions-RR2DymD_-B0xeL8RT.mjs} +61 -9
- package/dist/contract-contributions-RR2DymD_-B0xeL8RT.mjs.map +1 -0
- package/dist/{control-0nEwuD8F.d.mts → control-B0dyj3WB.d.mts} +121 -1
- package/dist/control-B0dyj3WB.d.mts.map +1 -0
- package/dist/{control-CBG2OxfU.d.mts → control-B2jgQGkQ.d.mts} +2 -2
- package/dist/{control-CBG2OxfU.d.mts.map → control-B2jgQGkQ.d.mts.map} +1 -1
- package/dist/{control-DxX_0Qw4.mjs → control-BeGPfK6d.mjs} +93 -55
- package/dist/control-BeGPfK6d.mjs.map +1 -0
- package/dist/{control-policy-BlVJAbUZ-BjQYqA_a.mjs → control-policy-DVEQWEOE-dVbGW9Xq.mjs} +6 -6
- package/dist/{control-policy-BlVJAbUZ-BjQYqA_a.mjs.map → control-policy-DVEQWEOE-dVbGW9Xq.mjs.map} +1 -1
- package/dist/{data-type-entries-15a-vBdm-vIj5l1u5.mjs → data-type-entries-MxmSzT8p-D8CgbLxS.mjs} +3 -3
- package/dist/{data-type-entries-15a-vBdm-vIj5l1u5.mjs.map → data-type-entries-MxmSzT8p-D8CgbLxS.mjs.map} +1 -1
- package/dist/{data-types-K6tDhu1D-BN--9o1o.mjs → data-types-DnIWGq_1-DTMjYG8M.mjs} +3 -3
- package/dist/{data-types-K6tDhu1D-BN--9o1o.mjs.map → data-types-DnIWGq_1-DTMjYG8M.mjs.map} +1 -1
- package/dist/{default-normalizer-Bf_Fhv4v-CugGfLAe.mjs → default-normalizer-BnxtqsRm-CDjZe4vK.mjs} +3 -3
- package/dist/{default-normalizer-Bf_Fhv4v-CugGfLAe.mjs.map → default-normalizer-BnxtqsRm-CDjZe4vK.mjs.map} +1 -1
- package/dist/{descriptor-meta-D5OipARb-6znWwvjE.mjs → descriptor-meta-642teZF4-CAMY6SnM.mjs} +6 -6
- package/dist/{descriptor-meta-D5OipARb-6znWwvjE.mjs.map → descriptor-meta-642teZF4-CAMY6SnM.mjs.map} +1 -1
- package/dist/{descriptor-meta-runtime-D4a-hsd_-B_YkwgHQ.mjs → descriptor-meta-runtime-CpGl9XzU-CZHs_TNl.mjs} +3 -3
- package/dist/{descriptor-meta-runtime-D4a-hsd_-B_YkwgHQ.mjs.map → descriptor-meta-runtime-CpGl9XzU-CZHs_TNl.mjs.map} +1 -1
- package/dist/descriptor-meta-uNeqfA6R-Rrzkj6Ci.mjs +36 -0
- package/dist/descriptor-meta-uNeqfA6R-Rrzkj6Ci.mjs.map +1 -0
- package/dist/{diff-database-schema-Ce8vWO7g-gdU3XGHC.mjs → diff-database-schema-K7Wr3Cso-BkIytT4i.mjs} +4 -4
- package/dist/{diff-database-schema-Ce8vWO7g-gdU3XGHC.mjs.map → diff-database-schema-K7Wr3Cso-BkIytT4i.mjs.map} +1 -1
- package/dist/{full-text-Li_RyodV.d.mts → full-text-DzMPXaCj.d.mts} +3 -3
- package/dist/{full-text-Li_RyodV.d.mts.map → full-text-DzMPXaCj.d.mts.map} +1 -1
- package/dist/{full-text-collection-method-DtXutLv6-DEBX-ltM.d.mts → full-text-collection-method-B9e_oZFf-dyzLx5i6.d.mts} +5 -5
- package/dist/full-text-collection-method-B9e_oZFf-dyzLx5i6.d.mts.map +1 -0
- package/dist/full-text-index-authoring-Ca6bWXyG.d.mts.map +1 -1
- package/dist/{full-text-index-definition-CwWV12H4-DNafWNux.d.mts → full-text-index-definition-D5iBWLss-FifKlctQ.d.mts} +22 -4
- package/dist/full-text-index-definition-D5iBWLss-FifKlctQ.d.mts.map +1 -0
- package/dist/{infer-psl-contract-B_Bl_RJC-BfJbvDUs.mjs → infer-psl-contract-l55XjKWM-O6kcTBJE.mjs} +91 -194
- package/dist/infer-psl-contract-l55XjKWM-O6kcTBJE.mjs.map +1 -0
- package/dist/migration-CbOh59ZJ.mjs.map +1 -1
- package/dist/{op-factory-call-Bf00O3tt-aQ8OJ00n.mjs → op-factory-call-TVvGnrxe-BYM7yGIk.mjs} +3 -3
- package/dist/{op-factory-call-Bf00O3tt-aQ8OJ00n.mjs.map → op-factory-call-TVvGnrxe-BYM7yGIk.mjs.map} +1 -1
- package/dist/{operation-types-C4VAniFe-D2eX0-ZZ.d.mts → operation-types-BAiYtHkM-BN_YTibJ.d.mts} +22 -17
- package/dist/operation-types-BAiYtHkM-BN_YTibJ.d.mts.map +1 -0
- package/dist/operation-types-CScw-diG.d.mts +1 -0
- package/dist/{pack-BOVET-UW.d.mts → pack-D9gjv6Kw.d.mts} +8 -5
- package/dist/pack-D9gjv6Kw.d.mts.map +1 -0
- package/dist/{planner-ddl-builders-BcJ353Wj-Dfaixf4X.mjs → planner-ddl-builders-DWMjQBmJ-CjtMnGSN.mjs} +4 -4
- package/dist/{planner-ddl-builders-BcJ353Wj-Dfaixf4X.mjs.map → planner-ddl-builders-DWMjQBmJ-CjtMnGSN.mjs.map} +1 -1
- package/dist/{planner-identity-values-BZdomjRU-G521DabU.mjs → planner-identity-values-DwvdO5iZ-C9_lmJx6.mjs} +3 -3
- package/dist/{planner-identity-values-BZdomjRU-G521DabU.mjs.map → planner-identity-values-DwvdO5iZ-C9_lmJx6.mjs.map} +1 -1
- package/dist/{planner-produced-postgres-migration-UY6o1KtK-D8AyKNJX.mjs → planner-produced-postgres-migration-CzGwh41Q-CoO2N7Ka.mjs} +4 -4
- package/dist/{planner-produced-postgres-migration-UY6o1KtK-D8AyKNJX.mjs.map → planner-produced-postgres-migration-CzGwh41Q-CoO2N7Ka.mjs.map} +1 -1
- package/dist/{planner-BnZ7Ma0m-CuFTpofj.mjs → planner-q9c5nQlC-BvjDJEmC.mjs} +7 -7
- package/dist/{planner-BnZ7Ma0m-CuFTpofj.mjs.map → planner-q9c5nQlC-BvjDJEmC.mjs.map} +1 -1
- package/dist/{postgres-codec-traits-BV62PF0L-NuMNArAx.mjs → postgres-codec-traits-DOTVjmpT-B4f6Rkh7.mjs} +3 -3
- package/dist/{postgres-codec-traits-BV62PF0L-NuMNArAx.mjs.map → postgres-codec-traits-DOTVjmpT-B4f6Rkh7.mjs.map} +1 -1
- package/dist/{postgres-contract-view-3yxlqPfK-CRFLsRHu.mjs → postgres-contract-view-D_z_HJ5K-BAzRKiIf.mjs} +6 -6
- package/dist/{postgres-contract-view-3yxlqPfK-CRFLsRHu.mjs.map → postgres-contract-view-D_z_HJ5K-BAzRKiIf.mjs.map} +1 -1
- package/dist/{postgres-migration-DxPGyge8-ChvbfTP4.mjs → postgres-migration-DplG05vQ-Cyy1zJjv.mjs} +8 -8
- package/dist/{postgres-migration-DxPGyge8-ChvbfTP4.mjs.map → postgres-migration-DplG05vQ-Cyy1zJjv.mjs.map} +1 -1
- package/dist/{prisma7-binding-BQ5VOUjh.d.mts → prisma7-binding-Bi4R4axY.d.mts} +8 -5
- package/dist/prisma7-binding-Bi4R4axY.d.mts.map +1 -0
- package/dist/{prisma7-binding-nxvUgQTH.mjs → prisma7-binding-BvuMHLdX.mjs} +18 -7
- package/dist/prisma7-binding-BvuMHLdX.mjs.map +1 -0
- package/dist/{render-ops-Cj_4STo9-hZVcK77c.mjs → render-ops-D7WBk4VN-Ba7n9A9L.mjs} +3 -3
- package/dist/{render-ops-Cj_4STo9-hZVcK77c.mjs.map → render-ops-D7WBk4VN-Ba7n9A9L.mjs.map} +1 -1
- package/dist/{runtime-qn4hL1wO.d.mts → runtime-C1HMiDVY.d.mts} +2 -2
- package/dist/{runtime-qn4hL1wO.d.mts.map → runtime-C1HMiDVY.d.mts.map} +1 -1
- package/dist/{sql-renderer-Q8LMpTcq-twOHNp2T.mjs → sql-renderer-Q8LMpTcq-CliGmy0r.mjs} +2 -2
- package/dist/{sql-renderer-Q8LMpTcq-twOHNp2T.mjs.map → sql-renderer-Q8LMpTcq-CliGmy0r.mjs.map} +1 -1
- package/dist/{sql-utils-CGSJ8fH0.d.mts → sql-utils-B7LfCQCB.d.mts} +2 -2
- package/dist/sql-utils-B7LfCQCB.d.mts.map +1 -0
- package/dist/target.d.mts +16 -17
- package/dist/target.mjs +20 -20
- package/dist/target__aggregates.d.mts +1 -1
- package/dist/target__aggregates.mjs +1 -1
- package/dist/target__codec-types.d.mts +4 -4
- package/dist/target__codecs.d.mts +2 -2
- package/dist/target__codecs.mjs +2 -2
- package/dist/target__control.d.mts +1 -1
- package/dist/target__control.mjs +3 -3
- package/dist/target__data-types.mjs +2 -2
- package/dist/target__default-normalizer.mjs +1 -1
- package/dist/target__diff-database-schema.mjs +1 -1
- package/dist/target__full-text-index-authoring.d.mts +1 -2
- package/dist/target__full-text-index-authoring.mjs +1 -1
- package/dist/target__full-text.d.mts +4 -4
- package/dist/target__issue-planner.mjs +1 -1
- package/dist/target__migration.mjs +2 -2
- package/dist/target__op-factory-call.mjs +1 -1
- package/dist/target__operation-types.d.mts +4 -4
- package/dist/target__pack.d.mts +3 -2
- package/dist/target__pack.mjs +1 -1
- package/dist/target__planner-ddl-builders.mjs +1 -1
- package/dist/target__planner-identity-values.mjs +1 -1
- package/dist/target__planner-produced-postgres-migration.mjs +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 +2 -2
- package/dist/target__runtime.mjs +3 -3
- package/dist/target__runtime.mjs.map +1 -1
- package/dist/target__sql-utils.d.mts +2 -2
- package/dist/{types-Dnrjripb.d.mts → types-DIUPMK41.d.mts} +1 -1
- package/package.json +9 -9
- package/dist/adapter-DXUJlrmB-7Lk8j0kE.mjs.map +0 -1
- package/dist/adapter-giV1nqJs.d.mts +0 -58
- package/dist/adapter-giV1nqJs.d.mts.map +0 -1
- package/dist/aggregates-B6ZQFHFE.mjs.map +0 -1
- package/dist/aggregates-CgqNfj2O.d.mts +0 -10
- package/dist/aggregates-CgqNfj2O.d.mts.map +0 -1
- package/dist/codec-helpers-D0ah5Wb8-wdJJZ_8s.mjs.map +0 -1
- package/dist/codec-types-CY3pawL3.d.mts +0 -2
- package/dist/codec-types-CYsrudBM-DcYPKpS1.d.mts +0 -51
- package/dist/codec-types-CYsrudBM-DcYPKpS1.d.mts.map +0 -1
- package/dist/codecs-Cb5S70Lx-WRSQkpza.mjs.map +0 -1
- package/dist/codecs-y1gOMMt--DKWhYGN5.d.mts.map +0 -1
- package/dist/column-types-Dq7mC_dL.d.mts.map +0 -1
- package/dist/control-0nEwuD8F.d.mts.map +0 -1
- package/dist/control-DxX_0Qw4.mjs.map +0 -1
- package/dist/control-adapter-EatqP8Vh-CYWBxnLn.mjs.map +0 -1
- package/dist/descriptor-meta-DThyh4X8-rA2bozYa.mjs +0 -53
- package/dist/descriptor-meta-DThyh4X8-rA2bozYa.mjs.map +0 -1
- package/dist/full-text-collection-method-DtXutLv6-DEBX-ltM.d.mts.map +0 -1
- package/dist/full-text-index-definition-CwWV12H4-DNafWNux.d.mts.map +0 -1
- package/dist/infer-psl-contract-B_Bl_RJC-BfJbvDUs.mjs.map +0 -1
- package/dist/operation-types-C4VAniFe-D2eX0-ZZ.d.mts.map +0 -1
- package/dist/operation-types-ChXH8kV_.d.mts +0 -1
- package/dist/pack-BOVET-UW.d.mts.map +0 -1
- package/dist/prisma7-binding-BQ5VOUjh.d.mts.map +0 -1
- package/dist/prisma7-binding-nxvUgQTH.mjs.map +0 -1
- package/dist/sql-utils-CGSJ8fH0.d.mts.map +0 -1
- package/dist/text-search-languages-CO6775ih-DMYr9qsC.d.mts +0 -22
- package/dist/text-search-languages-CO6775ih-DMYr9qsC.d.mts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"control-
|
|
1
|
+
{"version":3,"file":"control-B2jgQGkQ.d.mts","names":[],"sources":["../../../../3-targets/6-adapters/postgres/dist/control.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;cAiBc,kCAAkC;mBAC7B;mBACA;WACR;WACA;EACT,YAAY,eAAe,uBAAuB,gBAAgB;;;;;WAKzD,yBAAyB;EAClC,yCAAyC;EACzC,uCAAuC;;;;;;;;;EASvC,MAAM,KAAK,cAAc,iBAAiB,SAAS,0BAA0B;EAC7E,oBAAoB,QAAQ,WAAW,gBAAgB;;;;;;;;EAQvD,sBAAsB,KAAK,cAAc,iBAAiB,UAAU,0BAA0B,QAAQ;;;;;;;;;EAStG,WAAW,QAAQ,sCAAsC,gBAAgB,QAAQ;EACjF,wBAAwB,QAAQ,sCAAsC,gBAAgB,QAAQ;;;;;;;EAO9F,eAAe,QAAQ,uCAAuC,QAAQ,oBAAoB;UAClF;;;;;;;EAOR,WAAW,QAAQ,sCAAsC,iBAAiB,iBAAiB;UACnF;;;;;;EAMR,aAAa,QAAQ,sCAAsC,eAAe;aAC/D;aACA;aACA;MACP;EACJ,WAAW,QAAQ,sCAAsC,eAAe;aAC7D;aACA;aACA;MACP;;;;;EAKJ,aAAa,QAAQ,sCAAsC,eAAe,sBAAsB;aACrF;aACA;aACA;MACP;EACJ,gBAAgB,GAAG,QAAQ,sCAAsC,UAAU,QAAQ,KAAK,QAAQ;EAChG,WAAW,QAAQ,uCAAuC;;;;EAI1D,iBAAiB,QAAQ,sCAAsC,eAAe;aACnE;aACA;aACA;aACA;aACA;aACA;aACA;MACP;UACI;UACA;;;;;;;;;;;;;;;;;;;;;;;;;EAyBR,WAAW,QAAQ,sCAAsC,oBAAoB,kBAAkB,QAAQ;;;;;UAK/F;;;;;;;;;UASA;;;;;;;;;UASA;UACA;;;;;;;UAOA;;;;UAIA;;;;cAII,2BAA2B"}
|
|
@@ -3,22 +3,22 @@ import { s as postgresError } from "./errors-DYyzTYzE-39CV_aMo.mjs";
|
|
|
3
3
|
import { i as quoteIdentifier } from "./sql-utils-Df-nf6eM-Ov1KgjWm.mjs";
|
|
4
4
|
import { t as DEFAULT_NAMESPACE_ID } from "./namespace-ids-xtp_ZY86-Cpp8PTxD.mjs";
|
|
5
5
|
import { t as PostgresNativeEnum } from "./postgres-native-enum-CdP3b_-R-Cgz9KEKx.mjs";
|
|
6
|
-
import { M as setFallbackTemporal } from "./codecs-
|
|
6
|
+
import { M as setFallbackTemporal } from "./codecs-CQaKsvhH-X9bscCr9.mjs";
|
|
7
7
|
import { s as fullTextIndexDefinitionOf } from "./full-text-index-definition-D-QC3DO2-DXbQitDn.mjs";
|
|
8
8
|
import { i as PostgresRlsPolicy, n as PostgresRlsEnablement, o as PostgresRole } from "./postgres-schema-Ysxbqkzr-hFRwS-zT.mjs";
|
|
9
9
|
import { n as computeContentHash } from "./canonicalize-CrN3u_xM-D4MrOqcB.mjs";
|
|
10
|
-
import { m as postgresNowGeneratorIdFor, r as POLICY_BLOCK_KEYWORDS } from "./authoring-
|
|
10
|
+
import { m as postgresNowGeneratorIdFor, r as POLICY_BLOCK_KEYWORDS } from "./authoring-DOWd8Fpc-BE703X_J.mjs";
|
|
11
11
|
import { t as postgresRenderCheckExpressions } from "./check-expressions-CVLs1Cgf-DaMRk-Q4.mjs";
|
|
12
|
-
import { t as postgresTargetDescriptorMeta } from "./descriptor-meta-
|
|
12
|
+
import { t as postgresTargetDescriptorMeta } from "./descriptor-meta-642teZF4-CAMY6SnM.mjs";
|
|
13
13
|
import { a as postgresDiffSubjectGranularity, i as postgresDiffSubjectEntityKind } from "./postgres-table-schema-node-BBkitBQh-DT1T5VWU.mjs";
|
|
14
14
|
import { t as PostgresDatabaseSchemaNode } from "./postgres-role-schema-node-B8Z5i5D--PObwlU2Z.mjs";
|
|
15
15
|
import { r as qualifyTableName } from "./planner-sql-checks-CX37qDix-Gkq38UQQ.mjs";
|
|
16
|
-
import { r as diffPostgresSchema } from "./diff-database-schema-
|
|
17
|
-
import { t as PostgresContractSerializer } from "./postgres-contract-view-
|
|
18
|
-
import { o as postgresContractToSchema } from "./postgres-migration-
|
|
19
|
-
import { t as createPostgresMigrationPlanner } from "./planner-
|
|
16
|
+
import { r as diffPostgresSchema } from "./diff-database-schema-K7Wr3Cso-BkIytT4i.mjs";
|
|
17
|
+
import { t as PostgresContractSerializer } from "./postgres-contract-view-D_z_HJ5K-BAzRKiIf.mjs";
|
|
18
|
+
import { o as postgresContractToSchema } from "./postgres-migration-DplG05vQ-Cyy1zJjv.mjs";
|
|
19
|
+
import { t as createPostgresMigrationPlanner } from "./planner-q9c5nQlC-BvjDJEmC.mjs";
|
|
20
20
|
import { n as MARKER_LOCK_SQL, t as MARKER_LOCK_KEY } from "./marker-lock-DFc1Tfv5-QMJSzMIa.mjs";
|
|
21
|
-
import {
|
|
21
|
+
import { a as buildIndexAttribute, c as buildNativeEnumBlock, d as inferPostgresPslContract, f as namedArg, h as positionalArg, i as buildFullTextIndexAttribute, m as parseDefaultAttributeString, n as buildAttribute, o as buildMapAttribute, r as buildCheckAttribute, s as buildModelConstraintAttribute, t as SYNTHETIC_SPAN } from "./infer-psl-contract-l55XjKWM-O6kcTBJE.mjs";
|
|
22
22
|
import { requiredParamKeys, validateCodecTypeParams } from "@prisma/orm-framework/components/codec";
|
|
23
23
|
import { blindCast } from "@prisma/orm-framework/utils/casts";
|
|
24
24
|
import { dataTypeParams, isSqlDataType, unquotedSqlBaseName } from "@prisma/orm-family-sql/contract/data-type";
|
|
@@ -30,14 +30,14 @@ import { assertDefined, invariant } from "@prisma/orm-framework/utils/assertions
|
|
|
30
30
|
import { composeCheckWirePrefix, computeCheckContentHash, computeIndexContentHash, formatWireName, parseNaming } from "@prisma/orm-family-sql/schema-ir/naming";
|
|
31
31
|
import { ifDefined } from "@prisma/orm-framework/utils/defined";
|
|
32
32
|
import { convertedColumnOf, requiredColumnOf, requiredColumnsOfMigration, rowsWithoutValueFailure, runnerFailure, runnerSuccess, unconvertedFieldOf } from "@prisma/orm-family-sql/family/control";
|
|
33
|
-
import { findAuthoringTypeConstructorCall } from "@prisma/orm-framework/components/authoring";
|
|
33
|
+
import { authoringTypeConstructorArguments, findAuthoringTypeConstructorCall } from "@prisma/orm-framework/components/authoring";
|
|
34
34
|
import { NAME_THE_PSL_SOURCE_LOSES, isPslIdentifier } from "@prisma/orm-framework/psl-parser";
|
|
35
35
|
import { printSqlExpressionLiteral, sqlTextsReadBack } from "@prisma/orm-family-sql/contract/sql-expression";
|
|
36
36
|
import { InternalError } from "@prisma/orm-framework/utils/internal-error";
|
|
37
37
|
import { notOk, ok, okVoid } from "@prisma/orm-framework/utils/result";
|
|
38
38
|
import { SqlSchemaVerifierBase } from "@prisma/orm-family-sql/family/ir";
|
|
39
|
+
import { inferredTypeConstructors, mapDefault, pslTypeArgumentText } from "@prisma/orm-family-sql/family/psl-build";
|
|
39
40
|
import { UNBOUND_PSL_NAMESPACE_NAME, UNSPECIFIED_PSL_NAMESPACE_ID, makePslNamespace, makePslNamespaceEntries } from "@prisma/orm-framework/components/psl-ast";
|
|
40
|
-
import { mapDefault } from "@prisma/orm-family-sql/family/psl-build";
|
|
41
41
|
import { effectiveControlPolicy } from "@prisma/orm-framework/contract/types";
|
|
42
42
|
import { Temporal } from "temporal-polyfill/full/implementation";
|
|
43
43
|
import { SqlQueryError } from "@prisma/orm-family-sql/errors";
|
|
@@ -616,7 +616,6 @@ function refuseColumnWithoutPslType(column, coordinate) {
|
|
|
616
616
|
* argument between its quotes as written, with no escapes.
|
|
617
617
|
*/
|
|
618
618
|
function refuseUnwritableTypeArgument(value, coordinate) {
|
|
619
|
-
if (escapePslString(value) === value) return;
|
|
620
619
|
throw unsupported(`column ${coordinate} takes the type argument ${JSON.stringify(value)}, which a PSL type argument cannot carry.`, "The PSL source reads a string type argument as written between its quotes, with no escapes, so a quote, backslash or line break in it would read back differently.", KEEP_SOURCE, {
|
|
621
620
|
coordinate,
|
|
622
621
|
argument: value
|
|
@@ -1219,34 +1218,15 @@ function refuseUnprintedEntryKinds(namespaceId, entries) {
|
|
|
1219
1218
|
});
|
|
1220
1219
|
}
|
|
1221
1220
|
}
|
|
1222
|
-
/**
|
|
1223
|
-
* The type arguments a native type takes, in the order the PSL type
|
|
1224
|
-
* constructor declares them.
|
|
1225
|
-
*/
|
|
1226
|
-
const TYPE_PARAM_ORDER = [
|
|
1227
|
-
"length",
|
|
1228
|
-
"precision",
|
|
1229
|
-
"scale"
|
|
1230
|
-
];
|
|
1231
|
-
/** The name of the column's data type without parameters, as the type map knows it. */
|
|
1221
|
+
/** The name of the column's data type without parameters. */
|
|
1232
1222
|
function baseTypeName(column, dataTypeLookup, coordinate) {
|
|
1233
1223
|
const dataType = dataTypeLookup.get(column.dataType);
|
|
1234
1224
|
if (dataType === void 0 || !isSqlDataType(dataType)) return refuseColumnWithoutPslType(column, coordinate);
|
|
1235
1225
|
return unquotedSqlBaseName(dataType, dataTypeParams(dataType, column.typeParams));
|
|
1236
1226
|
}
|
|
1237
|
-
/**
|
|
1238
|
-
* Re-composes the parenthesised native type the type map resolves
|
|
1239
|
-
* (`numeric(10,2)`) from a column's base type name and its type parameters.
|
|
1240
|
-
*/
|
|
1241
|
-
function typeMapText(column, baseName) {
|
|
1242
|
-
const args = TYPE_PARAM_ORDER.map((key) => column.typeParams?.[key]).filter((value) => typeof value === "number");
|
|
1243
|
-
return args.length === 0 ? baseName : `${baseName}(${args.join(", ")})`;
|
|
1244
|
-
}
|
|
1245
1227
|
/** A type argument as PSL writes it: a number as written, a string between quotes. */
|
|
1246
1228
|
function typeArgumentText(value, coordinate) {
|
|
1247
|
-
|
|
1248
|
-
refuseUnwritableTypeArgument(value, coordinate);
|
|
1249
|
-
return `"${value}"`;
|
|
1229
|
+
return pslTypeArgumentText(value) ?? refuseUnwritableTypeArgument(String(value), coordinate);
|
|
1250
1230
|
}
|
|
1251
1231
|
function typeCall(path, args) {
|
|
1252
1232
|
const name = path.join(".");
|
|
@@ -1263,28 +1243,28 @@ function typeCall(path, args) {
|
|
|
1263
1243
|
};
|
|
1264
1244
|
}
|
|
1265
1245
|
/**
|
|
1266
|
-
* The call to the
|
|
1267
|
-
*
|
|
1268
|
-
* and type parameters.
|
|
1246
|
+
* The call to the constructor marked `inferred` for the column's data type, the one `contract
|
|
1247
|
+
* infer` writes, when it produces exactly the column's codec and type parameters.
|
|
1269
1248
|
*/
|
|
1270
|
-
function
|
|
1271
|
-
const
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1249
|
+
function inferredConstructorCall(column, inferredConstructors) {
|
|
1250
|
+
const marked = inferredConstructors.get(column.dataType);
|
|
1251
|
+
const args = marked && authoringTypeConstructorArguments(marked.descriptor, column);
|
|
1252
|
+
return marked && args && {
|
|
1253
|
+
path: marked.path,
|
|
1254
|
+
args
|
|
1255
|
+
};
|
|
1276
1256
|
}
|
|
1277
1257
|
/**
|
|
1278
1258
|
* The PSL type position for a storage column: a call to a type constructor the configured stack
|
|
1279
1259
|
* contributes that produces exactly the column's codec, native type and type parameters. The
|
|
1280
|
-
* constructor
|
|
1260
|
+
* constructor `contract infer` writes for the column's data type comes first; otherwise
|
|
1281
1261
|
* the first one in the stack that produces them, such as `DateTime` for a `timestamptz` column read
|
|
1282
1262
|
* as a `Temporal.Instant`, or `pgvector.Vector(3)`. An enum-typed column takes the
|
|
1283
1263
|
* `pg.enum(<Block>)` constructor, named after the value set the column points at; a column typed by
|
|
1284
1264
|
* a domain enum takes that enum's name. A column no PSL type reads back is refused.
|
|
1285
1265
|
*/
|
|
1286
1266
|
function buildColumnType(input) {
|
|
1287
|
-
const { column,
|
|
1267
|
+
const { column, inferredConstructors, authoringTypes, enumBlockNames, coordinate } = input;
|
|
1288
1268
|
const baseName = baseTypeName(column, input.dataTypeLookup, coordinate);
|
|
1289
1269
|
const enumBlockName = column.valueSet?.entityName ?? enumBlockNames.get(baseName);
|
|
1290
1270
|
if (column.codecId === "pg/enum@1" && enumBlockName !== void 0) return {
|
|
@@ -1298,7 +1278,7 @@ function buildColumnType(input) {
|
|
|
1298
1278
|
};
|
|
1299
1279
|
const domainEnumName = column.valueSet?.entityName;
|
|
1300
1280
|
if (domainEnumName !== void 0) return { typeName: domainEnumName };
|
|
1301
|
-
const call =
|
|
1281
|
+
const call = inferredConstructorCall(column, inferredConstructors) ?? findAuthoringTypeConstructorCall(authoringTypes, column);
|
|
1302
1282
|
if (call !== void 0) return typeCall(call.path, call.args.map((value) => typeArgumentText(value, coordinate)));
|
|
1303
1283
|
refuseColumnWithoutPslType(column, coordinate);
|
|
1304
1284
|
}
|
|
@@ -1344,7 +1324,7 @@ function buildMemberType(input) {
|
|
|
1344
1324
|
...ifDefined("many", field.many),
|
|
1345
1325
|
...ifDefined("typeParams", type.typeParams)
|
|
1346
1326
|
}),
|
|
1347
|
-
|
|
1327
|
+
inferredConstructors: input.inferredConstructors,
|
|
1348
1328
|
authoringTypes: input.context.authoringContributions.type,
|
|
1349
1329
|
dataTypeLookup: input.context.dataTypes.lookup,
|
|
1350
1330
|
enumBlockNames: input.enumBlockNames,
|
|
@@ -1365,7 +1345,7 @@ function buildCompositeTypes(input) {
|
|
|
1365
1345
|
const { typeName, typeConstructor } = buildMemberType({
|
|
1366
1346
|
field,
|
|
1367
1347
|
coordinate: `"${input.namespaceId}".${name}.${fieldName}`,
|
|
1368
|
-
|
|
1348
|
+
inferredConstructors: input.inferredConstructors,
|
|
1369
1349
|
context: input.context,
|
|
1370
1350
|
enumBlockNames: input.enumBlockNames,
|
|
1371
1351
|
domainEnums: input.domainEnums
|
|
@@ -1388,7 +1368,7 @@ function buildCompositeTypes(input) {
|
|
|
1388
1368
|
});
|
|
1389
1369
|
}
|
|
1390
1370
|
/** The document's `types { … }` block, one declaration per named storage type. */
|
|
1391
|
-
function buildTypesBlock(contract,
|
|
1371
|
+
function buildTypesBlock(contract, inferredConstructors, context) {
|
|
1392
1372
|
const declarations = [];
|
|
1393
1373
|
for (const [name, instance] of Object.entries(contract.storage.types ?? {})) {
|
|
1394
1374
|
refuseUnwritableName("named type", name);
|
|
@@ -1399,7 +1379,7 @@ function buildTypesBlock(contract, typeMap, context) {
|
|
|
1399
1379
|
nullable: false,
|
|
1400
1380
|
...ifDefined("typeParams", instance.typeParams)
|
|
1401
1381
|
}),
|
|
1402
|
-
|
|
1382
|
+
inferredConstructors,
|
|
1403
1383
|
authoringTypes: context.authoringContributions.type,
|
|
1404
1384
|
dataTypeLookup: context.dataTypes.lookup,
|
|
1405
1385
|
enumBlockNames: /* @__PURE__ */ new Map(),
|
|
@@ -2180,7 +2160,7 @@ function scalarFieldAttributes(input) {
|
|
|
2180
2160
|
* The scalar and value-object fields of one model, one per column its storage names.
|
|
2181
2161
|
*/
|
|
2182
2162
|
function buildScalarFields(input) {
|
|
2183
|
-
const { entry, variant, enums, domainEnums,
|
|
2163
|
+
const { entry, variant, enums, domainEnums, inferredConstructors, context, executionDefaults } = input;
|
|
2184
2164
|
const primaryKeyColumns = variant === void 0 ? entry.table.primaryKey?.columns ?? [] : [];
|
|
2185
2165
|
const fields = [];
|
|
2186
2166
|
for (const [fieldName, fieldStorage] of Object.entries(entry.storage.fields)) {
|
|
@@ -2215,7 +2195,7 @@ function buildScalarFields(input) {
|
|
|
2215
2195
|
});
|
|
2216
2196
|
const columnType = column.typeRef !== void 0 ? { typeName: column.typeRef } : field.type.kind === "valueObject" ? { typeName: field.type.name } : buildColumnType({
|
|
2217
2197
|
column,
|
|
2218
|
-
|
|
2198
|
+
inferredConstructors,
|
|
2219
2199
|
authoringTypes: context.authoringContributions.type,
|
|
2220
2200
|
dataTypeLookup: context.dataTypes.lookup,
|
|
2221
2201
|
enumBlockNames: enums.blockNamesByTypeName,
|
|
@@ -2312,7 +2292,7 @@ function buildModel(all, entry, enums, rlsTables) {
|
|
|
2312
2292
|
variant,
|
|
2313
2293
|
enums,
|
|
2314
2294
|
domainEnums: all.contract.domain.namespaces[entry.namespaceId]?.enum ?? {},
|
|
2315
|
-
|
|
2295
|
+
inferredConstructors: all.inferredConstructors,
|
|
2316
2296
|
context: all.context,
|
|
2317
2297
|
executionDefaults: all.executionDefaults,
|
|
2318
2298
|
defaultDomainEnumNames: new Set(Object.keys(all.defaultDomainEnums)),
|
|
@@ -2377,7 +2357,7 @@ function buildNamespace(all, namespaceId, namespace) {
|
|
|
2377
2357
|
const compositeTypes = buildCompositeTypes({
|
|
2378
2358
|
contract,
|
|
2379
2359
|
namespaceId,
|
|
2380
|
-
|
|
2360
|
+
inferredConstructors: all.inferredConstructors,
|
|
2381
2361
|
context: all.context,
|
|
2382
2362
|
enumBlockNames: enums.blockNamesByTypeName,
|
|
2383
2363
|
domainEnums: all.defaultDomainEnums
|
|
@@ -2428,7 +2408,11 @@ function buildPostgresPslContract(contract, context) {
|
|
|
2428
2408
|
const all = {
|
|
2429
2409
|
contract,
|
|
2430
2410
|
context,
|
|
2431
|
-
|
|
2411
|
+
inferredConstructors: inferredTypeConstructors({
|
|
2412
|
+
authoringTypes: context.authoringContributions.type,
|
|
2413
|
+
codecLookup: context.codecLookup,
|
|
2414
|
+
dataTypeLookup: context.dataTypes.lookup
|
|
2415
|
+
}),
|
|
2432
2416
|
models,
|
|
2433
2417
|
byCoordinate,
|
|
2434
2418
|
variants: new Map(models.map((entry) => [entry, variantInfo(entry, byCoordinate)])),
|
|
@@ -2466,7 +2450,7 @@ function buildPostgresPslContract(contract, context) {
|
|
|
2466
2450
|
kind: "document",
|
|
2467
2451
|
sourceId: "<contract>",
|
|
2468
2452
|
namespaces,
|
|
2469
|
-
...ifDefined("types", buildTypesBlock(contract, all.
|
|
2453
|
+
...ifDefined("types", buildTypesBlock(contract, all.inferredConstructors, context)),
|
|
2470
2454
|
span: SYNTHETIC_SPAN
|
|
2471
2455
|
};
|
|
2472
2456
|
}
|
|
@@ -2777,6 +2761,60 @@ const postgresNativeAuthoringTypes = {
|
|
|
2777
2761
|
index: 0
|
|
2778
2762
|
} }
|
|
2779
2763
|
}
|
|
2764
|
+
},
|
|
2765
|
+
Bit: {
|
|
2766
|
+
kind: "typeConstructor",
|
|
2767
|
+
inferred: true,
|
|
2768
|
+
documentation: "A fixed-length bit string with an optional length in bits.",
|
|
2769
|
+
args: [{
|
|
2770
|
+
kind: "number",
|
|
2771
|
+
name: "length",
|
|
2772
|
+
integer: true,
|
|
2773
|
+
optional: true
|
|
2774
|
+
}],
|
|
2775
|
+
output: {
|
|
2776
|
+
codecId: "pg/bit@1",
|
|
2777
|
+
typeParams: { length: {
|
|
2778
|
+
kind: "arg",
|
|
2779
|
+
index: 0
|
|
2780
|
+
} }
|
|
2781
|
+
}
|
|
2782
|
+
},
|
|
2783
|
+
VarBit: {
|
|
2784
|
+
kind: "typeConstructor",
|
|
2785
|
+
inferred: true,
|
|
2786
|
+
documentation: "A variable-length bit string with an optional maximum length in bits.",
|
|
2787
|
+
args: [{
|
|
2788
|
+
kind: "number",
|
|
2789
|
+
name: "length",
|
|
2790
|
+
integer: true,
|
|
2791
|
+
optional: true
|
|
2792
|
+
}],
|
|
2793
|
+
output: {
|
|
2794
|
+
codecId: "pg/varbit@1",
|
|
2795
|
+
typeParams: { length: {
|
|
2796
|
+
kind: "arg",
|
|
2797
|
+
index: 0
|
|
2798
|
+
} }
|
|
2799
|
+
}
|
|
2800
|
+
},
|
|
2801
|
+
Interval: {
|
|
2802
|
+
kind: "typeConstructor",
|
|
2803
|
+
inferred: true,
|
|
2804
|
+
documentation: "A span of time stored as PostgreSQL interval, with optional fractional-second precision.",
|
|
2805
|
+
args: [{
|
|
2806
|
+
kind: "number",
|
|
2807
|
+
name: "precision",
|
|
2808
|
+
integer: true,
|
|
2809
|
+
optional: true
|
|
2810
|
+
}],
|
|
2811
|
+
output: {
|
|
2812
|
+
codecId: "pg/interval@1",
|
|
2813
|
+
typeParams: { precision: {
|
|
2814
|
+
kind: "arg",
|
|
2815
|
+
index: 0
|
|
2816
|
+
} }
|
|
2817
|
+
}
|
|
2780
2818
|
}
|
|
2781
2819
|
};
|
|
2782
2820
|
/**
|
|
@@ -2841,4 +2879,4 @@ const postgresTargetDescriptor = createPostgresTargetDescriptor();
|
|
|
2841
2879
|
//#endregion
|
|
2842
2880
|
export { postgresTargetDescriptor as i, postgresPslTypeConstructors as n, postgresScalarAuthoringTypes as r, postgresNativeAuthoringTypes as t };
|
|
2843
2881
|
|
|
2844
|
-
//# sourceMappingURL=control-
|
|
2882
|
+
//# sourceMappingURL=control-BeGPfK6d.mjs.map
|