@prisma/orm-target-postgres 8.0.0-rc.20-dev.14 → 8.0.0-rc.20-dev.15
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-BIWKN0d7-BI1J51N4.mjs → adapter-BIWKN0d7-HfXFH4vy.mjs} +5 -5
- package/dist/{adapter-BIWKN0d7-BI1J51N4.mjs.map → adapter-BIWKN0d7-HfXFH4vy.mjs.map} +1 -1
- package/dist/adapter.mjs +5 -5
- package/dist/adapter__adapter.mjs +2 -2
- package/dist/adapter__control.mjs +4 -4
- package/dist/adapter__runtime.mjs +4 -4
- package/dist/adapter__sql-renderer.mjs +1 -1
- package/dist/{authoring-BLkari-V-D1FvcoJg.mjs → authoring-BYl9graG-BTI-XfEW.mjs} +12 -312
- package/dist/authoring-BYl9graG-BTI-XfEW.mjs.map +1 -0
- package/dist/{autoincrement-widths-CC5ZgVXV-CiL5ge45.mjs → autoincrement-widths-D7Uub-uA-DccZpX6Q.mjs} +3 -3
- package/dist/{autoincrement-widths-CC5ZgVXV-CiL5ge45.mjs.map → autoincrement-widths-D7Uub-uA-DccZpX6Q.mjs.map} +1 -1
- package/dist/{check-expressions-Bl0eh1Jt-CCfoIDEB.mjs → check-expressions-BPrbjEKM-CEIP4jTS.mjs} +3 -3
- package/dist/{check-expressions-Bl0eh1Jt-CCfoIDEB.mjs.map → check-expressions-BPrbjEKM-CEIP4jTS.mjs.map} +1 -1
- package/dist/{codec-registry-Cu-Nwsyl-BArjkoQ7.mjs → codec-registry-D8Nsfksc-B5zXDblI.mjs} +4 -4
- package/dist/{codec-registry-Cu-Nwsyl-BArjkoQ7.mjs.map → codec-registry-D8Nsfksc-B5zXDblI.mjs.map} +1 -1
- package/dist/{codecs-BNpSaccO-CLaErrDe.mjs → codecs-BVyoUeNy-DZw_7n3P.mjs} +4 -4
- package/dist/{codecs-BNpSaccO-CLaErrDe.mjs.map → codecs-BVyoUeNy-DZw_7n3P.mjs.map} +1 -1
- package/dist/{contract-contributions-DTGGTwRZ-Bf6l72jg.mjs → contract-contributions-DTGGTwRZ-DUokY6NT.mjs} +8 -8
- package/dist/{contract-contributions-DTGGTwRZ-Bf6l72jg.mjs.map → contract-contributions-DTGGTwRZ-DUokY6NT.mjs.map} +1 -1
- package/dist/{contract-free-q405H_rE.mjs → contract-free-Bjx-Ktot.mjs} +3 -3
- package/dist/{contract-free-q405H_rE.mjs.map → contract-free-Bjx-Ktot.mjs.map} +1 -1
- package/dist/{control-policy-CVRNJsbY-Cljg0_0d.mjs → control-policy-D9yEV-XI-CCDB2v5g.mjs} +9 -9
- package/dist/{control-policy-CVRNJsbY-Cljg0_0d.mjs.map → control-policy-D9yEV-XI-CCDB2v5g.mjs.map} +1 -1
- package/dist/{data-type-entries-BNpstbGO-Cd57I2Q2.mjs → data-type-entries-DhUYJbVb-4NUH6vR_.mjs} +3 -3
- package/dist/{data-type-entries-BNpstbGO-Cd57I2Q2.mjs.map → data-type-entries-DhUYJbVb-4NUH6vR_.mjs.map} +1 -1
- package/dist/{data-types-tjXyQbIR-C76ctfke.mjs → data-types-B7S_CHZd-C9JA40Ir.mjs} +4 -4
- package/dist/{data-types-tjXyQbIR-C76ctfke.mjs.map → data-types-B7S_CHZd-C9JA40Ir.mjs.map} +1 -1
- package/dist/date-time-now-generators-DsGxTwjo-DTb5oTHX.mjs +130 -0
- package/dist/date-time-now-generators-DsGxTwjo-DTb5oTHX.mjs.map +1 -0
- package/dist/{ddl-B6k3Lu9l-BcIKfN82.mjs → ddl-DiUFjVZe-DETlNlJh.mjs} +3 -3
- package/dist/{ddl-B6k3Lu9l-BcIKfN82.mjs.map → ddl-DiUFjVZe-DETlNlJh.mjs.map} +1 -1
- package/dist/{descriptor-meta-I7Ih-0hE-Dl5m2vYH.mjs → descriptor-meta-I7Ih-0hE-BzEpKpQF.mjs} +3 -3
- package/dist/{descriptor-meta-I7Ih-0hE-Dl5m2vYH.mjs.map → descriptor-meta-I7Ih-0hE-BzEpKpQF.mjs.map} +1 -1
- package/dist/descriptor-meta-RxUflZY0-BNMenVO8.mjs +100 -0
- package/dist/descriptor-meta-RxUflZY0-BNMenVO8.mjs.map +1 -0
- package/dist/{diff-database-schema-CXherlyh-CZ68d_H5.mjs → diff-database-schema-j18Gm75j-CNAELOTU.mjs} +9 -9
- package/dist/{diff-database-schema-CXherlyh-CZ68d_H5.mjs.map → diff-database-schema-j18Gm75j-CNAELOTU.mjs.map} +1 -1
- package/dist/{errors-0GfG3o8N-CM3BsoOd.mjs → errors-Di_apgWJ-BLXRTfFj.mjs} +3 -3
- package/dist/errors-Di_apgWJ-BLXRTfFj.mjs.map +1 -0
- package/dist/{full-text-DZkaI8Rj.mjs → full-text-CcHf5wkL.mjs} +3 -3
- package/dist/{full-text-DZkaI8Rj.mjs.map → full-text-CcHf5wkL.mjs.map} +1 -1
- package/dist/{full-text-index-definition-Cqx1_LYV-P_asS2NF.mjs → full-text-index-definition-B0kQDs_M-8N6Slj3l.mjs} +3 -3
- package/dist/{full-text-index-definition-Cqx1_LYV-P_asS2NF.mjs.map → full-text-index-definition-B0kQDs_M-8N6Slj3l.mjs.map} +1 -1
- package/dist/{full-text-parsers-BQ2Szxka-C5Uk-coo.mjs → full-text-parsers-hI_qtk-Q-DqTMF4n2.mjs} +4 -4
- package/dist/{full-text-parsers-BQ2Szxka-C5Uk-coo.mjs.map → full-text-parsers-hI_qtk-Q-DqTMF4n2.mjs.map} +1 -1
- package/dist/{full-text-search-document-BH_aXzI2-jhilBeF9.mjs → full-text-search-document-7AKd6oOw-S-rsh3SZ.mjs} +5 -5
- package/dist/{full-text-search-document-BH_aXzI2-jhilBeF9.mjs.map → full-text-search-document-7AKd6oOw-S-rsh3SZ.mjs.map} +1 -1
- package/dist/{index-types-CQHbUgu9-Cr-h50-J.mjs → index-types-DfnDGeQU-BWcrd_SP.mjs} +3 -3
- package/dist/{index-types-CQHbUgu9-Cr-h50-J.mjs.map → index-types-DfnDGeQU-BWcrd_SP.mjs.map} +1 -1
- package/dist/{infer-psl-contract-DLVFIwIv-BE7SsHDM.mjs → infer-psl-contract-DnTNOWZT-BwBxvl_y.mjs} +8 -8
- package/dist/{infer-psl-contract-DLVFIwIv-BE7SsHDM.mjs.map → infer-psl-contract-DnTNOWZT-BwBxvl_y.mjs.map} +1 -1
- package/dist/migration-Be_iuIpn.mjs.map +1 -1
- package/dist/{native-type-normalizer-Fkw-n7I3.mjs → native-type-normalizer-BpTZ6sm1.mjs} +2 -2
- package/dist/{native-type-normalizer-Fkw-n7I3.mjs.map → native-type-normalizer-BpTZ6sm1.mjs.map} +1 -1
- package/dist/{op-factory-call-pgrknkpg-BW61pr91.mjs → op-factory-call-DI5rMe0F-Cvj8LzGR.mjs} +8 -8
- package/dist/{op-factory-call-pgrknkpg-BW61pr91.mjs.map → op-factory-call-DI5rMe0F-Cvj8LzGR.mjs.map} +1 -1
- package/dist/{pack-BKre_4r5.d.mts → pack-BSTwDeu2.d.mts} +79 -687
- package/dist/pack-BSTwDeu2.d.mts.map +1 -0
- package/dist/{planner-ro2oqvMl-Czh1EHR9.mjs → planner-Bhde2uHk-CSZF9ODS.mjs} +10 -10
- package/dist/{planner-ro2oqvMl-Czh1EHR9.mjs.map → planner-Bhde2uHk-CSZF9ODS.mjs.map} +1 -1
- package/dist/{planner-ddl-builders-B3i8RIDk-Bl7toHkW.mjs → planner-ddl-builders-BHvruDX3-Sw7yWuWE.mjs} +3 -3
- package/dist/{planner-ddl-builders-B3i8RIDk-Bl7toHkW.mjs.map → planner-ddl-builders-BHvruDX3-Sw7yWuWE.mjs.map} +1 -1
- package/dist/{planner-identity-values-CCscfo-A-ClO_dRiZ.mjs → planner-identity-values-Cp0Cvrg7-BxMk9Qaf.mjs} +3 -3
- package/dist/{planner-identity-values-CCscfo-A-ClO_dRiZ.mjs.map → planner-identity-values-Cp0Cvrg7-BxMk9Qaf.mjs.map} +1 -1
- package/dist/{planner-produced-postgres-migration-B888gy9y-ChG4SvFH.mjs → planner-produced-postgres-migration-CT7o4vF9-DHyGaSfZ.mjs} +4 -4
- package/dist/{planner-produced-postgres-migration-B888gy9y-ChG4SvFH.mjs.map → planner-produced-postgres-migration-CT7o4vF9-DHyGaSfZ.mjs.map} +1 -1
- package/dist/{planner-sql-checks-DvVjRXZI-CZff7ZwA.mjs → planner-sql-checks-Dhx-R5GJ-GyHfROia.mjs} +5 -5
- package/dist/{planner-sql-checks-DvVjRXZI-CZff7ZwA.mjs.map → planner-sql-checks-Dhx-R5GJ-GyHfROia.mjs.map} +1 -1
- package/dist/{postgres-codec-traits-BL_Co0ST-CvoZqScE.mjs → postgres-codec-traits-BfhOLlQK-BqSX5cGp.mjs} +3 -3
- package/dist/{postgres-codec-traits-BL_Co0ST-CvoZqScE.mjs.map → postgres-codec-traits-BfhOLlQK-BqSX5cGp.mjs.map} +1 -1
- package/dist/{postgres-contract-view-B83MckYE-C5HdTzw0.mjs → postgres-contract-view-d_EYkS83-Busf8EFd.mjs} +8 -8
- package/dist/{postgres-contract-view-B83MckYE-C5HdTzw0.mjs.map → postgres-contract-view-d_EYkS83-Busf8EFd.mjs.map} +1 -1
- package/dist/{postgres-migration-B72vywyI-Bz1IVjIU.mjs → postgres-migration-CRKs0heQ-BE95T3ql.mjs} +11 -11
- package/dist/{postgres-migration-B72vywyI-Bz1IVjIU.mjs.map → postgres-migration-CRKs0heQ-BE95T3ql.mjs.map} +1 -1
- package/dist/{postgres-schema-uGdd5lv3-CahJcFWL.mjs → postgres-schema-CNNW8eA3-CwosQz5e.mjs} +4 -4
- package/dist/{postgres-schema-uGdd5lv3-CahJcFWL.mjs.map → postgres-schema-CNNW8eA3-CwosQz5e.mjs.map} +1 -1
- package/dist/{prisma7-binding-B-1EN2aJ.mjs → prisma7-binding-BwJtshLc.mjs} +8 -8
- package/dist/{prisma7-binding-B-1EN2aJ.mjs.map → prisma7-binding-BwJtshLc.mjs.map} +1 -1
- package/dist/{prisma7-binding-WvlRdK0W.d.mts → prisma7-binding-CQXZgPCd.d.mts} +79 -687
- package/dist/prisma7-binding-CQXZgPCd.d.mts.map +1 -0
- package/dist/{render-ops-Bcu9Ut4l-DqXsDZ0G.mjs → render-ops-CSWpAFQI-CqyjJlzM.mjs} +4 -4
- package/dist/{render-ops-Bcu9Ut4l-DqXsDZ0G.mjs.map → render-ops-CSWpAFQI-CqyjJlzM.mjs.map} +1 -1
- package/dist/{resolve-ddl-schema-DoD8dGk5-CBXjVWGS.mjs → resolve-ddl-schema-p68Q5F1u-DZAQNXpi.mjs} +3 -3
- package/dist/{resolve-ddl-schema-DoD8dGk5-CBXjVWGS.mjs.map → resolve-ddl-schema-p68Q5F1u-DZAQNXpi.mjs.map} +1 -1
- package/dist/{sql-renderer-BdWJPa5F-DH1baMIk.mjs → sql-renderer-BdWJPa5F-DUvahuXZ.mjs} +3 -3
- package/dist/{sql-renderer-BdWJPa5F-DH1baMIk.mjs.map → sql-renderer-BdWJPa5F-DUvahuXZ.mjs.map} +1 -1
- package/dist/{sql-utils-DUETeYBc-DbbAr6EV.mjs → sql-utils-0j_6QstU-DAfnt5Mu.mjs} +3 -3
- package/dist/{sql-utils-DUETeYBc-DbbAr6EV.mjs.map → sql-utils-0j_6QstU-DAfnt5Mu.mjs.map} +1 -1
- package/dist/target.d.mts +2 -2
- package/dist/target.mjs +31 -30
- package/dist/target__codecs.mjs +2 -2
- package/dist/target__contract-free.mjs +3 -3
- package/dist/target__control.mjs +16 -15
- package/dist/target__control.mjs.map +1 -1
- package/dist/target__data-types.mjs +2 -2
- package/dist/target__diff-database-schema.mjs +1 -1
- package/dist/target__errors.mjs +1 -1
- package/dist/target__full-text-index-authoring.mjs +2 -2
- package/dist/target__full-text.mjs +2 -2
- package/dist/target__issue-planner.mjs +1 -1
- package/dist/target__migration.mjs +2 -2
- package/dist/target__native-type-normalizer.mjs +1 -1
- package/dist/target__op-factory-call.mjs +1 -1
- package/dist/target__pack.d.mts +1 -1
- 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-sql-checks.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.mjs +7 -8
- package/dist/target__runtime.mjs.map +1 -1
- package/dist/target__schema-ir-annotations.mjs +1 -1
- package/dist/target__sql-utils.mjs +3 -3
- package/dist/target__types.mjs +2 -2
- package/package.json +9 -9
- package/dist/authoring-BLkari-V-D1FvcoJg.mjs.map +0 -1
- package/dist/descriptor-meta-BDfFIQHx-C2ewuoHD.mjs +0 -64
- package/dist/descriptor-meta-BDfFIQHx-C2ewuoHD.mjs.map +0 -1
- package/dist/descriptor-meta-runtime-Dt2G0LGV-u14ci_1u.mjs +0 -16
- package/dist/descriptor-meta-runtime-Dt2G0LGV-u14ci_1u.mjs.map +0 -1
- package/dist/errors-0GfG3o8N-CM3BsoOd.mjs.map +0 -1
- package/dist/pack-BKre_4r5.d.mts.map +0 -1
- package/dist/prisma7-binding-WvlRdK0W.d.mts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"autoincrement-widths-
|
|
1
|
+
{"version":3,"file":"autoincrement-widths-D7Uub-uA-DccZpX6Q.mjs","names":[],"sources":["../../../../3-targets/postgres/1-target/dist/autoincrement-widths-D7Uub-uA.mjs"],"sourcesContent":["import { _ as pgInt8, g as pgInt4, h as pgInt2 } from \"./data-types-B7S_CHZd.mjs\";\n//#region src/core/migrations/autoincrement-widths.ts\nconst SMALL = {\n\tserialType: \"SMALLSERIAL\",\n\tsequenceType: \"smallint\",\n\tmaxValue: \"32767\"\n};\nconst REGULAR = {\n\tserialType: \"SERIAL\",\n\tsequenceType: \"integer\",\n\tmaxValue: \"2147483647\"\n};\nconst BIG = {\n\tserialType: \"BIGSERIAL\",\n\tsequenceType: \"bigint\",\n\tmaxValue: \"9223372036854775807\"\n};\nconst WIDTH_BY_COLUMN_TYPE = /* @__PURE__ */ new Map([\n\t[\"int2\", SMALL],\n\t[\"smallint\", SMALL],\n\t[\"int4\", REGULAR],\n\t[\"integer\", REGULAR],\n\t[\"int8\", BIG],\n\t[\"bigint\", BIG]\n]);\n/** The autoincrement width of a column of `columnType`; `undefined` for a column that is not a scalar smallint, integer or bigint. */\nfunction autoincrementWidth(columnType) {\n\treturn WIDTH_BY_COLUMN_TYPE.get(columnType.toLowerCase());\n}\nconst WIDTH_BY_PSEUDO_TYPE = /* @__PURE__ */ new Map([\n\t[\"smallserial\", SMALL],\n\t[\"serial2\", SMALL],\n\t[\"serial\", REGULAR],\n\t[\"serial4\", REGULAR],\n\t[\"bigserial\", BIG],\n\t[\"serial8\", BIG]\n]);\n/** The autoincrement width of a column written with a SERIAL pseudo-type, such as `SERIAL` or `bigserial`; `undefined` for any other type. Postgres stores the column as the width's `sequenceType`. */\nfunction autoincrementWidthOfPseudoType(columnType) {\n\treturn WIDTH_BY_PSEUDO_TYPE.get(columnType.trim().toLowerCase());\n}\nconst WIDTH_BY_DATA_TYPE = /* @__PURE__ */ new Map([\n\t[pgInt2.id, SMALL],\n\t[pgInt4.id, REGULAR],\n\t[pgInt8.id, BIG]\n]);\n/** The autoincrement width of a column whose data type is `dataTypeId`; `undefined` unless it is `pg/int2`, `pg/int4` or `pg/int8`. */\nfunction autoincrementWidthOfDataType(dataTypeId) {\n\treturn WIDTH_BY_DATA_TYPE.get(dataTypeId);\n}\n/** Whether a schema column takes its values from a sequence: a SERIAL column's `nextval(...)` default and an identity column both read as `autoincrement()`. */\nfunction hasAutoincrementDefault(column) {\n\treturn column.resolvedDefault?.kind === \"function\" && column.resolvedDefault.expression === \"autoincrement()\";\n}\n//#endregion\nexport { hasAutoincrementDefault as i, autoincrementWidthOfDataType as n, autoincrementWidthOfPseudoType as r, autoincrementWidth as t };\n\n//# sourceMappingURL=autoincrement-widths-D7Uub-uA.mjs.map"],"mappings":";;AAEA,MAAM,QAAQ;CACb,YAAY;CACZ,cAAc;CACd,UAAU;AACX;AACA,MAAM,UAAU;CACf,YAAY;CACZ,cAAc;CACd,UAAU;AACX;AACA,MAAM,MAAM;CACX,YAAY;CACZ,cAAc;CACd,UAAU;AACX;AACA,MAAM,uCAAuC,IAAI,IAAI;CACpD,CAAC,QAAQ,KAAK;CACd,CAAC,YAAY,KAAK;CAClB,CAAC,QAAQ,OAAO;CAChB,CAAC,WAAW,OAAO;CACnB,CAAC,QAAQ,GAAG;CACZ,CAAC,UAAU,GAAG;AACf,CAAC;;AAED,SAAS,mBAAmB,YAAY;CACvC,OAAO,qBAAqB,IAAI,WAAW,YAAY,CAAC;AACzD;AACA,MAAM,uCAAuC,IAAI,IAAI;CACpD,CAAC,eAAe,KAAK;CACrB,CAAC,WAAW,KAAK;CACjB,CAAC,UAAU,OAAO;CAClB,CAAC,WAAW,OAAO;CACnB,CAAC,aAAa,GAAG;CACjB,CAAC,WAAW,GAAG;AAChB,CAAC;;AAED,SAAS,+BAA+B,YAAY;CACnD,OAAO,qBAAqB,IAAI,WAAW,KAAK,CAAC,CAAC,YAAY,CAAC;AAChE;AACA,MAAM,qCAAqC,IAAI,IAAI;CAClD,CAAC,OAAO,IAAI,KAAK;CACjB,CAAC,OAAO,IAAI,OAAO;CACnB,CAAC,OAAO,IAAI,GAAG;AAChB,CAAC;;AAED,SAAS,6BAA6B,YAAY;CACjD,OAAO,mBAAmB,IAAI,UAAU;AACzC;;AAEA,SAAS,wBAAwB,QAAQ;CACxC,OAAO,OAAO,iBAAiB,SAAS,cAAc,OAAO,gBAAgB,eAAe;AAC7F"}
|
package/dist/{check-expressions-Bl0eh1Jt-CCfoIDEB.mjs → check-expressions-BPrbjEKM-CEIP4jTS.mjs}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as quoteIdentifier, n as escapeLiteral } from "./sql-utils-
|
|
1
|
+
import { i as quoteIdentifier, n as escapeLiteral } from "./sql-utils-0j_6QstU-DAfnt5Mu.mjs";
|
|
2
2
|
import { invariant } from "@prisma/orm-framework/utils/assertions";
|
|
3
|
-
//#region ../../../3-targets/postgres/1-target/dist/check-expressions-
|
|
3
|
+
//#region ../../../3-targets/postgres/1-target/dist/check-expressions-BPrbjEKM.mjs
|
|
4
4
|
/**
|
|
5
5
|
* Renders the checks a Postgres column needs, as opaque predicate text.
|
|
6
6
|
*
|
|
@@ -45,4 +45,4 @@ function arrayLiteral(values) {
|
|
|
45
45
|
//#endregion
|
|
46
46
|
export { postgresRenderCheckExpressions as t };
|
|
47
47
|
|
|
48
|
-
//# sourceMappingURL=check-expressions-
|
|
48
|
+
//# sourceMappingURL=check-expressions-BPrbjEKM-CEIP4jTS.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-expressions-
|
|
1
|
+
{"version":3,"file":"check-expressions-BPrbjEKM-CEIP4jTS.mjs","names":[],"sources":["../../../../3-targets/postgres/1-target/dist/check-expressions-BPrbjEKM.mjs"],"sourcesContent":["import { i as quoteIdentifier, n as escapeLiteral } from \"./sql-utils-0j_6QstU.mjs\";\nimport { invariant } from \"@internal/utils/assertions\";\n//#region src/core/check-expressions.ts\n/**\n* Renders the checks a Postgres column needs, as opaque predicate text.\n*\n* A domain enum has no type-level enforcement, so membership is a\n* predicate: `IN` for a scalar, and `<@` containment for an array — an array\n* column cannot use `IN` at all (`operator does not exist: text[] = text`).\n* Array membership strips NULL elements first, leaving element nullability to\n* the separate element-non-null check emitted for semantically strict lists.\n*\n* Both forms compare members in the column's own type: the `IN` list and\n* the `<@` array literal are untyped, so Postgres reads each member as the\n* column (or element) type. A cast to `text` would compare the type's text\n* output instead, which for `inet` always carries the prefix length.\n*/\nfunction postgresRenderCheckExpressions(input) {\n\tconst candidates = [];\n\tconst column = quoteIdentifier(input.columnName);\n\tconst isMany = input.many !== false;\n\tconst elementNullable = typeof input.many === \"object\" && input.many.elementNullable || \"elementNullable\" in input && input.elementNullable === true;\n\tif (input.memberValues !== void 0) {\n\t\tinvariant(input.memberValues.length > 0, `check for \"${input.tableName}\".\"${input.columnName}\": empty member set; both authoring surfaces reject a member-less enum before rendering`);\n\t\tfor (const value of input.memberValues) invariant(typeof value === \"string\" || Number.isFinite(value), `check for \"${input.tableName}\".\"${input.columnName}\": non-finite numeric member`);\n\t\tcandidates.push({\n\t\t\tkind: \"membership\",\n\t\t\tcolumnName: input.columnName,\n\t\t\texpression: isMany ? `array_remove(${column}, NULL) <@ '${escapeLiteral(arrayLiteral(input.memberValues))}'` : `${column} IN (${input.memberValues.map(sqlLiteral).join(\", \")})`\n\t\t});\n\t}\n\tif (isMany && !elementNullable) candidates.push({\n\t\tkind: \"elementNotNull\",\n\t\tcolumnName: input.columnName,\n\t\texpression: `array_position(${column}, NULL) IS NULL`\n\t});\n\treturn candidates;\n}\nfunction sqlLiteral(value) {\n\treturn typeof value === \"string\" ? `'${escapeLiteral(value)}'` : String(value);\n}\nfunction arrayLiteral(values) {\n\treturn `{${values.map((value) => typeof value === \"string\" ? `\"${value.replace(/[\"\\\\]/g, \"\\\\$&\")}\"` : String(value)).join(\",\")}}`;\n}\n//#endregion\nexport { postgresRenderCheckExpressions as t };\n\n//# sourceMappingURL=check-expressions-BPrbjEKM.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;AAiBA,SAAS,+BAA+B,OAAO;CAC9C,MAAM,aAAa,CAAC;CACpB,MAAM,SAAS,gBAAgB,MAAM,UAAU;CAC/C,MAAM,SAAS,MAAM,SAAS;CAC9B,MAAM,kBAAkB,OAAO,MAAM,SAAS,YAAY,MAAM,KAAK,mBAAmB,qBAAqB,SAAS,MAAM,oBAAoB;CAChJ,IAAI,MAAM,iBAAiB,KAAK,GAAG;EAClC,UAAU,MAAM,aAAa,SAAS,GAAG,cAAc,MAAM,UAAU,KAAK,MAAM,WAAW,wFAAwF;EACrL,KAAK,MAAM,SAAS,MAAM,cAAc,UAAU,OAAO,UAAU,YAAY,OAAO,SAAS,KAAK,GAAG,cAAc,MAAM,UAAU,KAAK,MAAM,WAAW,6BAA6B;EACxL,WAAW,KAAK;GACf,MAAM;GACN,YAAY,MAAM;GAClB,YAAY,SAAS,gBAAgB,OAAO,cAAc,cAAc,aAAa,MAAM,YAAY,CAAC,EAAE,KAAK,GAAG,OAAO,OAAO,MAAM,aAAa,IAAI,UAAU,CAAC,CAAC,KAAK,IAAI,EAAE;EAC/K,CAAC;CACF;CACA,IAAI,UAAU,CAAC,iBAAiB,WAAW,KAAK;EAC/C,MAAM;EACN,YAAY,MAAM;EAClB,YAAY,kBAAkB,OAAO;CACtC,CAAC;CACD,OAAO;AACR;AACA,SAAS,WAAW,OAAO;CAC1B,OAAO,OAAO,UAAU,WAAW,IAAI,cAAc,KAAK,EAAE,KAAK,OAAO,KAAK;AAC9E;AACA,SAAS,aAAa,QAAQ;CAC7B,OAAO,IAAI,OAAO,KAAK,UAAU,OAAO,UAAU,WAAW,IAAI,MAAM,QAAQ,UAAU,MAAM,EAAE,KAAK,OAAO,KAAK,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE;AAChI"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { n as buildPostgresCodecDescriptorRegistry } from "./codec-descriptor-DoR-cTFZ-BlG5Gj-X.mjs";
|
|
2
|
-
import { i as createPostgresBuiltinDataTypeLookup } from "./data-types-
|
|
3
|
-
import { s as codecDescriptors } from "./codecs-
|
|
2
|
+
import { i as createPostgresBuiltinDataTypeLookup } from "./data-types-B7S_CHZd-C9JA40Ir.mjs";
|
|
3
|
+
import { s as codecDescriptors } from "./codecs-BVyoUeNy-DZw_7n3P.mjs";
|
|
4
4
|
import { structuredError } from "@prisma/orm-framework/utils/structured-error";
|
|
5
5
|
import { extractCodecLookup } from "@prisma/orm-framework/components/control";
|
|
6
6
|
import { buildCodecDescriptorRegistry } from "@prisma/orm-family-sql/relational-core/codec-descriptor-registry";
|
|
7
|
-
//#region ../../../3-targets/postgres/1-target/dist/codec-registry-
|
|
7
|
+
//#region ../../../3-targets/postgres/1-target/dist/codec-registry-D8Nsfksc.mjs
|
|
8
8
|
/**
|
|
9
9
|
* Registry of every codec descriptor shipped by `@internal/target-postgres`.
|
|
10
10
|
*
|
|
@@ -58,4 +58,4 @@ function createPostgresBuiltinCodecLookup() {
|
|
|
58
58
|
//#endregion
|
|
59
59
|
export { postgresCodecDescriptorRegistry as a, createPostgresCodecRegistryWithBuiltins as i, assemblePostgresCodecRegistryWithBuiltins as n, postgresCodecRegistry as o, createPostgresBuiltinCodecLookup as r, assemblePostgresCodecRegistry as t };
|
|
60
60
|
|
|
61
|
-
//# sourceMappingURL=codec-registry-
|
|
61
|
+
//# sourceMappingURL=codec-registry-D8Nsfksc-B5zXDblI.mjs.map
|
package/dist/{codec-registry-Cu-Nwsyl-BArjkoQ7.mjs.map → codec-registry-D8Nsfksc-B5zXDblI.mjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codec-registry-
|
|
1
|
+
{"version":3,"file":"codec-registry-D8Nsfksc-B5zXDblI.mjs","names":[],"sources":["../../../../3-targets/postgres/1-target/dist/codec-registry-D8Nsfksc.mjs"],"sourcesContent":["import { t as createPostgresBuiltinDataTypeLookup } from \"./data-types-B7S_CHZd.mjs\";\nimport { n as buildPostgresCodecDescriptorRegistry } from \"./codec-descriptor-DoR-cTFZ.mjs\";\nimport { t as codecDescriptors } from \"./codecs-BVyoUeNy.mjs\";\nimport { structuredError } from \"@internal/utils/structured-error\";\nimport { extractCodecLookup } from \"@internal/framework-components/control\";\nimport { buildCodecDescriptorRegistry } from \"@internal/sql-relational-core/codec-descriptor-registry\";\n//#region src/core/registry.ts\n/**\n* Registry of every codec descriptor shipped by `@internal/target-postgres`.\n*\n* Public consumer surface for the postgres codec set: the postgres adapter and any other consumer that needs to enumerate or look up a postgres codec by id consumes this rather than the raw descriptor array. See ADR 208.\n*/\nconst postgresCodecRegistry = buildCodecDescriptorRegistry(codecDescriptors);\nconst postgresCodecDescriptorRegistry = buildPostgresCodecDescriptorRegistry(codecDescriptors);\n//#endregion\n//#region src/core/codec-registry.ts\n/**\n* A registry of `descriptors`, refusing a codec whose data type `dataTypeLookup` does not have: the\n* SQL renderer writes a parameter's cast from the data type its codec represents.\n*/\nfunction buildPostgresCodecRegistry(descriptors, dataTypeLookup) {\n\tconst descriptorRegistry = buildPostgresCodecDescriptorRegistry(descriptors);\n\tconst validatedDescriptors = Array.from(descriptorRegistry.values());\n\tfor (const descriptor of validatedDescriptors) if (!dataTypeLookup.has(descriptor.dataType)) throw structuredError(\"CONTRACT.DATA_TYPE_UNREGISTERED\", `Codec \"${descriptor.codecId}\" represents data type \"${descriptor.dataType}\", which no component registers.`, {\n\t\twhy: \"A parameter of this codec is written with a cast named by its data type.\",\n\t\tfix: \"Pass the data type beside the codec: in `dataTypes` of createPostgresAdapter, or in the `dataTypes` of the extension that contributes the codec.\",\n\t\tmeta: {\n\t\t\tcodecId: descriptor.codecId,\n\t\t\tdataType: descriptor.dataType\n\t\t}\n\t});\n\tconst registry = {\n\t\t...extractCodecLookup([{\n\t\t\tid: \"postgres-codecs\",\n\t\t\ttypes: { codecTypes: { codecDescriptors: validatedDescriptors } }\n\t\t}]),\n\t\tdescriptorFor: (codecId) => descriptorRegistry.descriptorFor(codecId),\n\t\tvalues: () => descriptorRegistry.values()\n\t};\n\treturn Object.freeze(registry);\n}\nfunction assemblePostgresCodecRegistry(components, dataTypeLookup) {\n\treturn buildPostgresCodecRegistry(components.flatMap((component) => component.types?.codecTypes?.codecDescriptors ?? []), dataTypeLookup);\n}\nfunction assemblePostgresCodecRegistryWithBuiltins(extensions, dataTypeLookup) {\n\treturn buildPostgresCodecRegistry([...postgresCodecDescriptorRegistry.values(), ...extensions.flatMap((extension) => extension.types?.codecTypes?.codecDescriptors ?? [])], dataTypeLookup);\n}\n/** A registry of the built-in codecs and `codecDescriptors`, whose data types `dataTypeLookup` has. */\nfunction createPostgresCodecRegistryWithBuiltins(codecDescriptors = [], dataTypeLookup = createPostgresBuiltinDataTypeLookup()) {\n\treturn buildPostgresCodecRegistry([...postgresCodecDescriptorRegistry.values(), ...codecDescriptors], dataTypeLookup);\n}\n/**\n* Build a coherent PostgreSQL codec registry populated with built-in descriptors only.\n*\n* The returned registry supports both ordinary codec materialization and PostgreSQL target behavior. Stack-composed paths build the same combined registry from their complete ordered descriptor contributions.\n*/\nfunction createPostgresBuiltinCodecLookup() {\n\treturn createPostgresCodecRegistryWithBuiltins();\n}\n//#endregion\nexport { postgresCodecDescriptorRegistry as a, createPostgresCodecRegistryWithBuiltins as i, assemblePostgresCodecRegistryWithBuiltins as n, postgresCodecRegistry as o, createPostgresBuiltinCodecLookup as r, assemblePostgresCodecRegistry as t };\n\n//# sourceMappingURL=codec-registry-D8Nsfksc.mjs.map"],"mappings":";;;;;;;;;;;;AAYA,MAAM,wBAAwB,6BAA6B,gBAAgB;AAC3E,MAAM,kCAAkC,qCAAqC,gBAAgB;;;;;AAO7F,SAAS,2BAA2B,aAAa,gBAAgB;CAChE,MAAM,qBAAqB,qCAAqC,WAAW;CAC3E,MAAM,uBAAuB,MAAM,KAAK,mBAAmB,OAAO,CAAC;CACnE,KAAK,MAAM,cAAc,sBAAsB,IAAI,CAAC,eAAe,IAAI,WAAW,QAAQ,GAAG,MAAM,gBAAgB,mCAAmC,UAAU,WAAW,QAAQ,0BAA0B,WAAW,SAAS,mCAAmC;EACnQ,KAAK;EACL,KAAK;EACL,MAAM;GACL,SAAS,WAAW;GACpB,UAAU,WAAW;EACtB;CACD,CAAC;CACD,MAAM,WAAW;EAChB,GAAG,mBAAmB,CAAC;GACtB,IAAI;GACJ,OAAO,EAAE,YAAY,EAAE,kBAAkB,qBAAqB,EAAE;EACjE,CAAC,CAAC;EACF,gBAAgB,YAAY,mBAAmB,cAAc,OAAO;EACpE,cAAc,mBAAmB,OAAO;CACzC;CACA,OAAO,OAAO,OAAO,QAAQ;AAC9B;AACA,SAAS,8BAA8B,YAAY,gBAAgB;CAClE,OAAO,2BAA2B,WAAW,SAAS,cAAc,UAAU,OAAO,YAAY,oBAAoB,CAAC,CAAC,GAAG,cAAc;AACzI;AACA,SAAS,0CAA0C,YAAY,gBAAgB;CAC9E,OAAO,2BAA2B,CAAC,GAAG,gCAAgC,OAAO,GAAG,GAAG,WAAW,SAAS,cAAc,UAAU,OAAO,YAAY,oBAAoB,CAAC,CAAC,CAAC,GAAG,cAAc;AAC3L;;AAEA,SAAS,wCAAwC,mBAAmB,CAAC,GAAG,iBAAiB,oCAAoC,GAAG;CAC/H,OAAO,2BAA2B,CAAC,GAAG,gCAAgC,OAAO,GAAG,GAAG,gBAAgB,GAAG,cAAc;AACrH;;;;;;AAMA,SAAS,mCAAmC;CAC3C,OAAO,wCAAwC;AAChD"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { A as PG_TIMESTAMP_TEMPORAL_CODEC_ID, C as PG_TEXT_CODEC_ID, D as PG_TIMESTAMP_DATE_CODEC_ID, E as PG_TIMESTAMPTZ_TEMPORAL_CODEC_ID, F as PG_UNBOUNDED_INT_CODEC_ID, I as PG_UUID_CODEC_ID, L as PG_VARBIT_CODEC_ID, M as PG_TIME_STRING_CODEC_ID, N as PG_TIME_TEMPORAL_CODEC_ID, O as PG_TIMESTAMP_INSTANT_CODEC_ID, P as PG_TSQUERY_CODEC_ID, R as PG_VARCHAR_CODEC_ID, S as PG_TEXT_ARRAY_CODEC_ID, T as PG_TIMESTAMPTZ_STRING_CODEC_ID, _ as PG_INTERVAL_STRING_CODEC_ID, a as PG_DATE_STRING_CODEC_ID, b as PG_JSON_CODEC_ID, c as PG_FLOAT4_CODEC_ID, d as PG_INET_CODEC_ID, f as PG_INT2_CODEC_ID, g as PG_INTERVAL_CODEC_ID, h as PG_INT8_NUMBER_CODEC_ID, i as PG_CHAR_CODEC_ID, j as PG_TIMETZ_CODEC_ID, k as PG_TIMESTAMP_STRING_CODEC_ID, l as PG_FLOAT8_CODEC_ID, m as PG_INT8_CODEC_ID, n as PG_BOOL_CODEC_ID, o as PG_DATE_TEMPORAL_CODEC_ID, p as PG_INT4_CODEC_ID, r as PG_BYTEA_CODEC_ID, s as PG_ENUM_CODEC_ID, t as PG_BIT_CODEC_ID, u as PG_FLOAT_CODEC_ID, v as PG_INT_CODEC_ID, w as PG_TIMESTAMPTZ_DATE_CODEC_ID, x as PG_NUMERIC_CODEC_ID, y as PG_JSONB_CODEC_ID } from "./codec-ids-D0wjQdEW-EypD_iZj.mjs";
|
|
2
2
|
import { a as postgresCodec, r as definePostgresCodecs, t as PostgresCodecDescriptor } from "./codec-descriptor-DoR-cTFZ-BlG5Gj-X.mjs";
|
|
3
|
-
import { a as errorTemporalUnavailableForDefault, c as errorTimestampTextWrongType, i as errorTemporalUnavailable, l as postgresError, o as errorTemporalUnrepresentable, r as errorTemporalNonIsoCalendar, s as errorTemporalWrongType, t as errorDateStyleNotIso } from "./errors-
|
|
4
|
-
import { A as pgJsonb, B as pgTimestampStoredText, C as pgInet, D as pgInterval, E as pgInt8, F as pgText, G as pgTsquery, H as pgTimestamptzStoredText, I as pgTextArray, J as pgVarchar, K as pgUuid, L as pgTime, M as pgNumeric, N as pgNumericParams, O as pgIntervalStoredText, P as pgPrecisionParams, Q as postgresYearText, S as pgFloat8, T as pgInt4, U as pgTimetz, V as pgTimestamptz, X as postgresIntervalFields, _ as pgDate, a as formatIsoDuration, b as pgEnumParams, c as microsFromFraction, d as pgBool, f as pgBytea, g as pgCharacterLengthParams, h as pgChar, j as pgJsonbEnumRefusal, k as pgJson, l as pgBit, n as ISO_DURATION, o as intervalFieldsOf, q as pgVarbit, r as MICROS_PER_SECOND, s as isoYearText, t as BYTEA_TEXT, u as pgBitLengthParams, w as pgInt2, x as pgFloat4, y as pgEnum, z as pgTimestamp } from "./data-types-
|
|
3
|
+
import { a as errorTemporalUnavailableForDefault, c as errorTimestampTextWrongType, i as errorTemporalUnavailable, l as postgresError, o as errorTemporalUnrepresentable, r as errorTemporalNonIsoCalendar, s as errorTemporalWrongType, t as errorDateStyleNotIso } from "./errors-Di_apgWJ-BLXRTfFj.mjs";
|
|
4
|
+
import { A as pgJsonb, B as pgTimestampStoredText, C as pgInet, D as pgInterval, E as pgInt8, F as pgText, G as pgTsquery, H as pgTimestamptzStoredText, I as pgTextArray, J as pgVarchar, K as pgUuid, L as pgTime, M as pgNumeric, N as pgNumericParams, O as pgIntervalStoredText, P as pgPrecisionParams, Q as postgresYearText, S as pgFloat8, T as pgInt4, U as pgTimetz, V as pgTimestamptz, X as postgresIntervalFields, _ as pgDate, a as formatIsoDuration, b as pgEnumParams, c as microsFromFraction, d as pgBool, f as pgBytea, g as pgCharacterLengthParams, h as pgChar, j as pgJsonbEnumRefusal, k as pgJson, l as pgBit, n as ISO_DURATION, o as intervalFieldsOf, q as pgVarbit, r as MICROS_PER_SECOND, s as isoYearText, t as BYTEA_TEXT, u as pgBitLengthParams, w as pgInt2, x as pgFloat4, y as pgEnum, z as pgTimestamp } from "./data-types-B7S_CHZd-C9JA40Ir.mjs";
|
|
5
5
|
import { t as PostgresNativeEnum } from "./postgres-native-enum-CdP3b_-R-DgG3pi5p.mjs";
|
|
6
6
|
import { CaseExpr, CastExpr, FunctionCallExpr, LiteralExpr, NullCheckExpr, SqlCharCodec, SqlFloatCodec, SqlIntCodec, SqlRawCodec, SqlTextCodec, SqlVarcharCodec, sqlCharDescriptor, sqlFloatDescriptor, sqlIntDescriptor, sqlRawDescriptor, sqlTextDescriptor, sqlVarcharDescriptor } from "@prisma/orm-family-sql/relational-core/ast";
|
|
7
7
|
import { CodecImpl, SAFE_INTEGER_BIGINT_RANGE, column, dateTimeStoredText, decimalTextBigintLiteral, decimalTextNumberLiteral, floatNumberLiteral, floatToJson, isNonFiniteText, numeralText, readJsonFloat, readJsonIntegerText, refuseJsonValue, renderTsLiteral, storedNumeralText } from "@prisma/orm-framework/components/codec";
|
|
@@ -11,7 +11,7 @@ import { sqlRawDataType } from "@prisma/orm-family-sql/contract/data-type";
|
|
|
11
11
|
import { UNBOUND_NAMESPACE_ID } from "@prisma/orm-framework/components/ir";
|
|
12
12
|
import { ifDefined } from "@prisma/orm-framework/utils/defined";
|
|
13
13
|
import { parse } from "postgres-array";
|
|
14
|
-
//#region ../../../3-targets/postgres/1-target/dist/codecs-
|
|
14
|
+
//#region ../../../3-targets/postgres/1-target/dist/codecs-BVyoUeNy.mjs
|
|
15
15
|
/**
|
|
16
16
|
* A `numeric` value as its canonical decimal text. A number is written out without an exponent,
|
|
17
17
|
* because `numeric` text has no exponent syntax and `toDataTypeValue` refuses one.
|
|
@@ -1947,4 +1947,4 @@ const codecDescriptors = definePostgresCodecs([
|
|
|
1947
1947
|
//#endregion
|
|
1948
1948
|
export { pgTextColumn as A, postgresQualifyColumnType as B, pgIntColumn as C, pgJsonColumn as D, pgIntervalStringDescriptor as E, pgTimetzColumn as F, setFallbackTemporal as H, pgUnboundedIntColumn as I, pgUuidColumn as L, pgTimestampDateDescriptor as M, pgTimestamptzDateColumn as N, pgJsonbColumn as O, pgTimestamptzDateDescriptor as P, pgVarbitColumn as R, pgInt8NumberColumn as S, pgIntervalStringColumn as T, requireTemporal as V, pgFloatColumn as _, PgTimestamptzDateCodec as a, pgInt4Column as b, decodePostgresListText as c, pgBitColumn as d, pgBoolColumn as f, pgFloat8Column as g, pgFloat4Column as h, PgTimestampDateDescriptor as i, pgTimestampDateColumn as j, pgNumericColumn as k, isPgEnumParams as l, pgEnumDescriptor as m, PgIntervalStringDescriptor as n, PgTimestamptzDateDescriptor as o, pgCharColumn as p, PgTimestampDateCodec as r, codecDescriptors as s, PgIntervalStringCodec as t, parsePostgresListText as u, pgInetColumn as v, pgIntervalColumn as w, pgInt8Column as x, pgInt2Column as y, pgVarcharColumn as z };
|
|
1949
1949
|
|
|
1950
|
-
//# sourceMappingURL=codecs-
|
|
1950
|
+
//# sourceMappingURL=codecs-BVyoUeNy-DZw_7n3P.mjs.map
|