@prisma/orm-target-postgres 8.0.0-rc.12-dev.5 → 8.0.0-rc.12-dev.6
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-Br3wVafV-BhRhcsHM.mjs → adapter-Br3wVafV-CQJv2A_3.mjs} +3 -3
- package/dist/{adapter-Br3wVafV-BhRhcsHM.mjs.map → adapter-Br3wVafV-CQJv2A_3.mjs.map} +1 -1
- package/dist/adapter.d.mts +1 -1
- package/dist/adapter.mjs +4 -4
- package/dist/adapter__adapter.mjs +1 -1
- package/dist/adapter__control.d.mts +1 -1
- 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-CntDgOvl-BB-SCspB.mjs → authoring-BN2xWDOP-W9YifksL.mjs} +4 -4
- package/dist/{authoring-CntDgOvl-BB-SCspB.mjs.map → authoring-BN2xWDOP-W9YifksL.mjs.map} +1 -1
- package/dist/{check-expressions-DFTeR0rd-CSxSpyMV.mjs → check-expressions-DLCs-SXx-itMQrUsX.mjs} +3 -3
- package/dist/{check-expressions-DFTeR0rd-CSxSpyMV.mjs.map → check-expressions-DLCs-SXx-itMQrUsX.mjs.map} +1 -1
- package/dist/{contract-free--ds6HUdk.mjs → contract-free-DwIiLIZh.mjs} +3 -3
- package/dist/{contract-free--ds6HUdk.mjs.map → contract-free-DwIiLIZh.mjs.map} +1 -1
- package/dist/{control-YCTaxPln.mjs → control-D1yPbnXZ.mjs} +7 -7
- package/dist/{control-YCTaxPln.mjs.map → control-D1yPbnXZ.mjs.map} +1 -1
- package/dist/{control-adapter-C2Xw0sJP-ST9vPuLe.mjs → control-adapter-C2Xw0sJP-D4khEwB9.mjs} +5 -5
- package/dist/{control-adapter-C2Xw0sJP-ST9vPuLe.mjs.map → control-adapter-C2Xw0sJP-D4khEwB9.mjs.map} +1 -1
- package/dist/{control-policy-BcxPUZKg-CXNkxMuB.mjs → control-policy-oa_igc-e-ncU2iE64.mjs} +6 -6
- package/dist/{control-policy-BcxPUZKg-CXNkxMuB.mjs.map → control-policy-oa_igc-e-ncU2iE64.mjs.map} +1 -1
- package/dist/{ddl-BSSJloez-hJfFqHj7.mjs → ddl-CdYNv79D-BkbF3B6U.mjs} +3 -3
- package/dist/{ddl-BSSJloez-hJfFqHj7.mjs.map → ddl-CdYNv79D-BkbF3B6U.mjs.map} +1 -1
- package/dist/{descriptor-meta-DA340QMX-BeXEFBFh.mjs → descriptor-meta-CjrJ0dyT-DToyOBfC.mjs} +5 -5
- package/dist/{descriptor-meta-DA340QMX-BeXEFBFh.mjs.map → descriptor-meta-CjrJ0dyT-DToyOBfC.mjs.map} +1 -1
- package/dist/{descriptor-meta-ClQ1wGLk-BDPciTA3.mjs → descriptor-meta-ClQ1wGLk-BtFkVYR9.mjs} +2 -2
- package/dist/{descriptor-meta-ClQ1wGLk-BDPciTA3.mjs.map → descriptor-meta-ClQ1wGLk-BtFkVYR9.mjs.map} +1 -1
- package/dist/{diff-database-schema-C3Hukv0R-KMgSujWd.mjs → diff-database-schema--xSPI5GK-B3mQXFbC.mjs} +5 -5
- package/dist/{diff-database-schema-C3Hukv0R-KMgSujWd.mjs.map → diff-database-schema--xSPI5GK-B3mQXFbC.mjs.map} +1 -1
- package/dist/{full-text-index-expression-CFwyNWsy-D8kk6A3M.mjs → full-text-index-expression-ix6TNfZZ-Ct96i2ZE.mjs} +3 -3
- package/dist/{full-text-index-expression-CFwyNWsy-D8kk6A3M.mjs.map → full-text-index-expression-ix6TNfZZ-Ct96i2ZE.mjs.map} +1 -1
- package/dist/{infer-psl-contract-C5NnhoTK-CMLFUFI7.mjs → infer-psl-contract-B9Hs0kKm-Cp7_uC0O.mjs} +3 -3
- package/dist/{infer-psl-contract-C5NnhoTK-CMLFUFI7.mjs.map → infer-psl-contract-B9Hs0kKm-Cp7_uC0O.mjs.map} +1 -1
- package/dist/migration-PTHAY9Cv.mjs.map +1 -1
- package/dist/{op-factory-call-a617HMdz-mXly-rN1.mjs → op-factory-call-Caum7HVy-DNDV6Yjt.mjs} +6 -6
- package/dist/{op-factory-call-a617HMdz-mXly-rN1.mjs.map → op-factory-call-Caum7HVy-DNDV6Yjt.mjs.map} +1 -1
- package/dist/{planner-CG2zRGGE-Dzhd-Su3.mjs → planner-DV8SVMQ0-DhnG4NWX.mjs} +8 -8
- package/dist/{planner-CG2zRGGE-Dzhd-Su3.mjs.map → planner-DV8SVMQ0-DhnG4NWX.mjs.map} +1 -1
- package/dist/{planner-ddl-builders-TSrD4_Aw-CfVU1uui.mjs → planner-ddl-builders-BncbM2oU-DR8NvtdY.mjs} +3 -3
- package/dist/{planner-ddl-builders-TSrD4_Aw-CfVU1uui.mjs.map → planner-ddl-builders-BncbM2oU-DR8NvtdY.mjs.map} +1 -1
- package/dist/{planner-produced-postgres-migration-CIXMGPZU-BKBkedvl.mjs → planner-produced-postgres-migration-DW2Kumus-qpr0dAJl.mjs} +3 -3
- package/dist/{planner-produced-postgres-migration-CIXMGPZU-BKBkedvl.mjs.map → planner-produced-postgres-migration-DW2Kumus-qpr0dAJl.mjs.map} +1 -1
- package/dist/{planner-sql-checks-C8vZmDRu-BimrKoG7.mjs → planner-sql-checks-D53iVGBI-B8TBz3ne.mjs} +4 -4
- package/dist/{planner-sql-checks-C8vZmDRu-BimrKoG7.mjs.map → planner-sql-checks-D53iVGBI-B8TBz3ne.mjs.map} +1 -1
- package/dist/{postgres-contract-view-CGJcdfsz-Bx54F6pK.mjs → postgres-contract-view--CIYRzkr-DHzVwWfc.mjs} +4 -4
- package/dist/{postgres-contract-view-CGJcdfsz-Bx54F6pK.mjs.map → postgres-contract-view--CIYRzkr-DHzVwWfc.mjs.map} +1 -1
- package/dist/{postgres-migration-oBj4-1VV-pn55JdkS.mjs → postgres-migration-BUcYfevN-CDiFadu6.mjs} +5 -5
- package/dist/{postgres-migration-oBj4-1VV-pn55JdkS.mjs.map → postgres-migration-BUcYfevN-CDiFadu6.mjs.map} +1 -1
- package/dist/{postgres-schema-BfUzo1Yn-BLZvsxs9.mjs → postgres-schema-MIh_qSUu-gKCH4OhS.mjs} +3 -3
- package/dist/{postgres-schema-BfUzo1Yn-BLZvsxs9.mjs.map → postgres-schema-MIh_qSUu-gKCH4OhS.mjs.map} +1 -1
- package/dist/{prisma7-binding-BREOn7vP.mjs → prisma7-binding-CAYVRnLp.mjs} +5 -5
- package/dist/{prisma7-binding-BREOn7vP.mjs.map → prisma7-binding-CAYVRnLp.mjs.map} +1 -1
- package/dist/{resolve-ddl-schema-CIvDW3tr-CKGZYLPh.mjs → resolve-ddl-schema-DDbcqhDH-QrDca-Np.mjs} +3 -3
- package/dist/{resolve-ddl-schema-CIvDW3tr-CKGZYLPh.mjs.map → resolve-ddl-schema-DDbcqhDH-QrDca-Np.mjs.map} +1 -1
- package/dist/{sql-renderer-BnTqIzZw-C8YDKp4u.mjs → sql-renderer-BnTqIzZw-jLa_0UiM.mjs} +2 -2
- package/dist/{sql-renderer-BnTqIzZw-C8YDKp4u.mjs.map → sql-renderer-BnTqIzZw-jLa_0UiM.mjs.map} +1 -1
- package/dist/{sql-utils-6j9YTLpr-BCyCBPBg.mjs → sql-utils-Bh-mnsSY-D6hnFPrP.mjs} +12 -6
- package/dist/sql-utils-Bh-mnsSY-D6hnFPrP.mjs.map +1 -0
- package/dist/{sql-utils-9CdIjv89.d.mts → sql-utils-DqFxskY6.d.mts} +2 -2
- package/dist/{sql-utils-9CdIjv89.d.mts.map → sql-utils-DqFxskY6.d.mts.map} +1 -1
- package/dist/target.d.mts +1 -1
- package/dist/target.mjs +19 -19
- package/dist/target__contract-free.mjs +3 -3
- package/dist/target__control.mjs +2 -2
- package/dist/target__diff-database-schema.mjs +1 -1
- 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__pack.mjs +1 -1
- package/dist/target__planner-ddl-builders.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.mjs +1 -1
- package/dist/target__runtime.mjs +2 -2
- package/dist/target__runtime.mjs.map +1 -1
- package/dist/target__schema-ir-annotations.mjs +1 -1
- package/dist/target__sql-utils.d.mts +1 -1
- package/dist/target__sql-utils.mjs +2 -2
- package/dist/target__types.mjs +2 -2
- package/package.json +9 -9
- package/dist/sql-utils-6j9YTLpr-BCyCBPBg.mjs.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { s as postgresError } from "./errors-DYyzTYzE-39CV_aMo.mjs";
|
|
2
|
-
//#region ../../../3-targets/3-targets/postgres/dist/sql-utils-
|
|
2
|
+
//#region ../../../3-targets/3-targets/postgres/dist/sql-utils-Bh-mnsSY.mjs
|
|
3
3
|
/**
|
|
4
4
|
* Shared SQL utility functions for the Postgres target.
|
|
5
5
|
*
|
|
@@ -11,14 +11,20 @@ import { s as postgresError } from "./errors-DYyzTYzE-39CV_aMo.mjs";
|
|
|
11
11
|
* escaping/validation behavior, and the target package is the natural shared
|
|
12
12
|
* home that both adapters can depend on without crossing planes.
|
|
13
13
|
*/
|
|
14
|
-
const
|
|
14
|
+
const MAX_IDENTIFIER_BYTES = 63;
|
|
15
|
+
const MAX_UTF8_BYTES_PER_UTF16_UNIT = 3;
|
|
16
|
+
const utf8 = new TextEncoder();
|
|
17
|
+
/** UTF-8 byte length — the unit PostgreSQL measures identifiers and enum labels in. */
|
|
18
|
+
function byteLength(value) {
|
|
19
|
+
return utf8.encode(value).length;
|
|
20
|
+
}
|
|
15
21
|
/**
|
|
16
22
|
* Validates and quotes a PostgreSQL identifier (table, column, type, schema names).
|
|
17
23
|
*
|
|
18
24
|
* Security validations:
|
|
19
25
|
* - Rejects null bytes which could cause truncation or unexpected behavior
|
|
20
26
|
* - Rejects empty identifiers
|
|
21
|
-
* - Warns on identifiers exceeding PostgreSQL's 63-
|
|
27
|
+
* - Warns on identifiers exceeding PostgreSQL's 63-byte limit
|
|
22
28
|
*
|
|
23
29
|
* @throws `CONTRACT.IDENTIFIER_INVALID` structured error If the identifier contains null bytes or is empty
|
|
24
30
|
*/
|
|
@@ -31,7 +37,7 @@ function quoteIdentifier(identifier) {
|
|
|
31
37
|
value: identifier.replace(/\0/g, "\\0"),
|
|
32
38
|
context: "identifier"
|
|
33
39
|
} });
|
|
34
|
-
if (identifier.length >
|
|
40
|
+
if (identifier.length * MAX_UTF8_BYTES_PER_UTF16_UNIT > MAX_IDENTIFIER_BYTES && byteLength(identifier) > MAX_IDENTIFIER_BYTES) console.warn(`Identifier "${identifier.slice(0, 20)}..." exceeds PostgreSQL's ${MAX_IDENTIFIER_BYTES}-byte limit and will be truncated`);
|
|
35
41
|
return `"${identifier.replace(/"/g, "\"\"")}"`;
|
|
36
42
|
}
|
|
37
43
|
/**
|
|
@@ -79,7 +85,7 @@ function quoteQualifiedName(name) {
|
|
|
79
85
|
* @throws `CONTRACT.IDENTIFIER_INVALID` structured error If the value exceeds the maximum length
|
|
80
86
|
*/
|
|
81
87
|
function validateEnumValueLength(value, enumTypeName) {
|
|
82
|
-
if (
|
|
88
|
+
if (byteLength(value) > MAX_IDENTIFIER_BYTES) throw postgresError("CONTRACT.IDENTIFIER_INVALID", `Enum value "${value.slice(0, 20)}..." for type "${enumTypeName}" exceeds PostgreSQL's ${MAX_IDENTIFIER_BYTES}-byte label limit`, { meta: {
|
|
83
89
|
value,
|
|
84
90
|
context: "enum-label"
|
|
85
91
|
} });
|
|
@@ -87,4 +93,4 @@ function validateEnumValueLength(value, enumTypeName) {
|
|
|
87
93
|
//#endregion
|
|
88
94
|
export { validateEnumValueLength as a, quoteQualifiedName as i, qualifyName as n, quoteIdentifier as r, escapeLiteral as t };
|
|
89
95
|
|
|
90
|
-
//# sourceMappingURL=sql-utils-
|
|
96
|
+
//# sourceMappingURL=sql-utils-Bh-mnsSY-D6hnFPrP.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sql-utils-Bh-mnsSY-D6hnFPrP.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/sql-utils-Bh-mnsSY.mjs"],"sourcesContent":["import { s as postgresError } from \"./errors-DYyzTYzE.mjs\";\n//#region src/core/sql-utils.ts\n/**\n* Shared SQL utility functions for the Postgres target.\n*\n* These functions handle safe SQL identifier and literal escaping\n* with security validations to prevent injection and encoding issues.\n*\n* They live in `target-postgres` because both the control adapter (used at\n* emit time) and the runtime adapter (used at execute time) need the same\n* escaping/validation behavior, and the target package is the natural shared\n* home that both adapters can depend on without crossing planes.\n*/\nconst MAX_IDENTIFIER_BYTES = 63;\nconst MAX_UTF8_BYTES_PER_UTF16_UNIT = 3;\nconst utf8 = new TextEncoder();\n/** UTF-8 byte length — the unit PostgreSQL measures identifiers and enum labels in. */\nfunction byteLength(value) {\n\treturn utf8.encode(value).length;\n}\n/**\n* Validates and quotes a PostgreSQL identifier (table, column, type, schema names).\n*\n* Security validations:\n* - Rejects null bytes which could cause truncation or unexpected behavior\n* - Rejects empty identifiers\n* - Warns on identifiers exceeding PostgreSQL's 63-byte limit\n*\n* @throws `CONTRACT.IDENTIFIER_INVALID` structured error If the identifier contains null bytes or is empty\n*/\nfunction quoteIdentifier(identifier) {\n\tif (identifier.length === 0) throw postgresError(\"CONTRACT.IDENTIFIER_INVALID\", \"Identifier cannot be empty\", { meta: {\n\t\tvalue: identifier,\n\t\tcontext: \"identifier\"\n\t} });\n\tif (identifier.includes(\"\\0\")) throw postgresError(\"CONTRACT.IDENTIFIER_INVALID\", \"Identifier cannot contain null bytes\", { meta: {\n\t\tvalue: identifier.replace(/\\0/g, \"\\\\0\"),\n\t\tcontext: \"identifier\"\n\t} });\n\tif (identifier.length * MAX_UTF8_BYTES_PER_UTF16_UNIT > MAX_IDENTIFIER_BYTES && byteLength(identifier) > MAX_IDENTIFIER_BYTES) console.warn(`Identifier \"${identifier.slice(0, 20)}...\" exceeds PostgreSQL's ${MAX_IDENTIFIER_BYTES}-byte limit and will be truncated`);\n\treturn `\"${identifier.replace(/\"/g, \"\\\"\\\"\")}\"`;\n}\n/**\n* Escapes a string literal for safe use in SQL statements.\n*\n* Security validations:\n* - Rejects null bytes which could cause truncation or unexpected behavior\n*\n* Note: This assumes PostgreSQL's `standard_conforming_strings` is ON (default since PG 9.1).\n* Backslashes are treated as literal characters, not escape sequences.\n*\n* @throws `CONTRACT.IDENTIFIER_INVALID` structured error If the value contains null bytes\n*/\nfunction escapeLiteral(value) {\n\tif (value.includes(\"\\0\")) throw postgresError(\"CONTRACT.IDENTIFIER_INVALID\", \"Literal value cannot contain null bytes\", { meta: {\n\t\tvalue: value.replace(/\\0/g, \"\\\\0\"),\n\t\tcontext: \"literal\"\n\t} });\n\treturn value.replace(/'/g, \"''\");\n}\n/**\n* Builds a qualified name (schema.object) with proper quoting.\n*/\nfunction qualifyName(schemaName, objectName) {\n\treturn `${quoteIdentifier(schemaName)}.${quoteIdentifier(objectName)}`;\n}\n/**\n* Quotes a possibly dot-qualified name segment-by-segment:\n* `order_status` -> `\"order_status\"`, `auth.aal_level` -> `\"auth\".\"aal_level\"`.\n* A single-segment name round-trips to exactly {@link quoteIdentifier}; whole-\n* string quoting (`\"auth.aal_level\"`) would be one wrong identifier.\n*/\nfunction quoteQualifiedName(name) {\n\treturn name.split(\".\").map((segment) => quoteIdentifier(segment)).join(\".\");\n}\n/**\n* Validates that an enum value doesn't exceed PostgreSQL's label length limit.\n*\n* PostgreSQL enum labels have a maximum length of NAMEDATALEN-1 (63 bytes by default).\n* Unlike identifiers, enum labels that exceed this limit cause an error rather than\n* silent truncation.\n*\n* @param value - The enum value to validate\n* @param enumTypeName - Name of the enum type (for error messages)\n* @throws `CONTRACT.IDENTIFIER_INVALID` structured error If the value exceeds the maximum length\n*/\nfunction validateEnumValueLength(value, enumTypeName) {\n\tif (byteLength(value) > MAX_IDENTIFIER_BYTES) throw postgresError(\"CONTRACT.IDENTIFIER_INVALID\", `Enum value \"${value.slice(0, 20)}...\" for type \"${enumTypeName}\" exceeds PostgreSQL's ${MAX_IDENTIFIER_BYTES}-byte label limit`, { meta: {\n\t\tvalue,\n\t\tcontext: \"enum-label\"\n\t} });\n}\n//#endregion\nexport { validateEnumValueLength as a, quoteQualifiedName as i, qualifyName as n, quoteIdentifier as r, escapeLiteral as t };\n\n//# sourceMappingURL=sql-utils-Bh-mnsSY.mjs.map"],"mappings":";;;;;;;;;;;;;AAaA,MAAM,uBAAuB;AAC7B,MAAM,gCAAgC;AACtC,MAAM,OAAO,IAAI,YAAY;;AAE7B,SAAS,WAAW,OAAO;CAC1B,OAAO,KAAK,OAAO,KAAK,CAAC,CAAC;AAC3B;;;;;;;;;;;AAWA,SAAS,gBAAgB,YAAY;CACpC,IAAI,WAAW,WAAW,GAAG,MAAM,cAAc,+BAA+B,8BAA8B,EAAE,MAAM;EACrH,OAAO;EACP,SAAS;CACV,EAAE,CAAC;CACH,IAAI,WAAW,SAAS,IAAI,GAAG,MAAM,cAAc,+BAA+B,wCAAwC,EAAE,MAAM;EACjI,OAAO,WAAW,QAAQ,OAAO,KAAK;EACtC,SAAS;CACV,EAAE,CAAC;CACH,IAAI,WAAW,SAAS,gCAAgC,wBAAwB,WAAW,UAAU,IAAI,sBAAsB,QAAQ,KAAK,eAAe,WAAW,MAAM,GAAG,EAAE,EAAE,4BAA4B,qBAAqB,kCAAkC;CACtQ,OAAO,IAAI,WAAW,QAAQ,MAAM,MAAM,EAAE;AAC7C;;;;;;;;;;;;AAYA,SAAS,cAAc,OAAO;CAC7B,IAAI,MAAM,SAAS,IAAI,GAAG,MAAM,cAAc,+BAA+B,2CAA2C,EAAE,MAAM;EAC/H,OAAO,MAAM,QAAQ,OAAO,KAAK;EACjC,SAAS;CACV,EAAE,CAAC;CACH,OAAO,MAAM,QAAQ,MAAM,IAAI;AAChC;;;;AAIA,SAAS,YAAY,YAAY,YAAY;CAC5C,OAAO,GAAG,gBAAgB,UAAU,EAAE,GAAG,gBAAgB,UAAU;AACpE;;;;;;;AAOA,SAAS,mBAAmB,MAAM;CACjC,OAAO,KAAK,MAAM,GAAG,CAAC,CAAC,KAAK,YAAY,gBAAgB,OAAO,CAAC,CAAC,CAAC,KAAK,GAAG;AAC3E;;;;;;;;;;;;AAYA,SAAS,wBAAwB,OAAO,cAAc;CACrD,IAAI,WAAW,KAAK,IAAI,sBAAsB,MAAM,cAAc,+BAA+B,eAAe,MAAM,MAAM,GAAG,EAAE,EAAE,iBAAiB,aAAa,yBAAyB,qBAAqB,oBAAoB,EAAE,MAAM;EAC1O;EACA,SAAS;CACV,EAAE,CAAC;AACJ"}
|
|
@@ -34,7 +34,7 @@ declare function isFullTextIndexableCodec(codecId: string): boolean;
|
|
|
34
34
|
* Security validations:
|
|
35
35
|
* - Rejects null bytes which could cause truncation or unexpected behavior
|
|
36
36
|
* - Rejects empty identifiers
|
|
37
|
-
* - Warns on identifiers exceeding PostgreSQL's 63-
|
|
37
|
+
* - Warns on identifiers exceeding PostgreSQL's 63-byte limit
|
|
38
38
|
*
|
|
39
39
|
* @throws `CONTRACT.IDENTIFIER_INVALID` structured error If the identifier contains null bytes or is empty
|
|
40
40
|
*/
|
|
@@ -76,4 +76,4 @@ declare function quoteQualifiedName(name: string): string;
|
|
|
76
76
|
declare function validateEnumValueLength(value: string, enumTypeName: string): void;
|
|
77
77
|
//#endregion
|
|
78
78
|
export { quoteQualifiedName as a, quoteIdentifier as i, isFullTextIndexableCodec as n, renderFullTextIndexExpression as o, qualifyName as r, validateEnumValueLength as s, escapeLiteral as t };
|
|
79
|
-
//# sourceMappingURL=sql-utils-
|
|
79
|
+
//# sourceMappingURL=sql-utils-DqFxskY6.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sql-utils-
|
|
1
|
+
{"version":3,"file":"sql-utils-DqFxskY6.d.mts","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/sql-utils.d.mts"],"mappings":";;;;;;;;;;iBASiB,8BAA8B,UAAU,wBAAwB;;;;;;iBAMhE,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;iBAwBzB,gBAAgB;;;;;;;;;;;;iBAYhB,cAAc;;;;iBAId,YAAY,oBAAoB;;;;;;;iBAOhC,mBAAmB;;;;;;;;;;;;iBAYnB,wBAAwB,eAAe"}
|
package/dist/target.d.mts
CHANGED
|
@@ -14,7 +14,7 @@ import "./ddl-B4Rh8ntj.mjs";
|
|
|
14
14
|
import { n as postgresResolveDefault, t as parsePostgresDefault } from "./default-normalizer-ZZ7Y5boE.mjs";
|
|
15
15
|
import { t as normalizeSchemaNativeType } from "./native-type-normalizer-DqJlOTeX.mjs";
|
|
16
16
|
import { n as FullTextSearchLanguage, t as DEFAULT_FULL_TEXT_SEARCH_LANGUAGE } from "./text-search-languages-BzhBMCtK-D26JB2w3.mjs";
|
|
17
|
-
import { a as quoteQualifiedName, i as quoteIdentifier, n as isFullTextIndexableCodec, o as renderFullTextIndexExpression, r as qualifyName, s as validateEnumValueLength, t as escapeLiteral } from "./sql-utils-
|
|
17
|
+
import { a as quoteQualifiedName, i as quoteIdentifier, n as isFullTextIndexableCodec, o as renderFullTextIndexExpression, r as qualifyName, s as validateEnumValueLength, t as escapeLiteral } from "./sql-utils-DqFxskY6.mjs";
|
|
18
18
|
import { t as postgresAggregateDescriptors } from "./aggregates-CgqNfj2O.mjs";
|
|
19
19
|
import { A as PG_TIME_TEMPORAL_CODEC_ID, B as SQL_VARCHAR_CODEC_ID, C as PG_TIMESTAMPTZ_DATE_CODEC_ID, D as PG_TIMESTAMP_TEMPORAL_CODEC_ID, E as PG_TIMESTAMP_STRING_CODEC_ID, F as PG_VARCHAR_CODEC_ID, I as SQL_CHAR_CODEC_ID, L as SQL_FLOAT_CODEC_ID, M as PG_UNBOUNDED_INT_CODEC_ID, N as PG_UUID_CODEC_ID, O as PG_TIMETZ_CODEC_ID, P as PG_VARBIT_CODEC_ID, R as SQL_INT_CODEC_ID, S as PG_TEXT_CODEC_ID, T as PG_TIMESTAMPTZ_TEMPORAL_CODEC_ID, _ as PG_INT_CODEC_ID, a as PG_DATE_STRING_CODEC_ID, b as PG_NUMERIC_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_TSQUERY_CODEC_ID, k as PG_TIME_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_JSONB_CODEC_ID, w as PG_TIMESTAMPTZ_STRING_CODEC_ID, x as PG_TEXT_ARRAY_CODEC_ID, y as PG_JSON_CODEC_ID, z as SQL_TEXT_CODEC_ID } from "./codec-ids-jWpRZjZo-BKIzyx-J.mjs";
|
|
20
20
|
import "./codec-ids-BQRXOwQR.mjs";
|
package/dist/target.mjs
CHANGED
|
@@ -6,40 +6,40 @@ import { s as postgresError, t as errorPostgresMigrationStackMissing } from "./e
|
|
|
6
6
|
import { t as PostgresNativeEnum } from "./postgres-native-enum-CdP3b_-R-Cgz9KEKx.mjs";
|
|
7
7
|
import { C as pgTimestamptzDateColumn, D as pgUuidColumn, E as pgUnboundedIntColumn, O as pgVarbitColumn, S as pgTextColumn, T as pgTimetzColumn, _ as pgIntColumn, a as pgBitColumn, b as pgJsonbColumn, c as pgEnumDescriptor, d as pgFloatColumn, f as pgInetColumn, g as pgInt8NumberColumn, h as pgInt8Column, i as isPgEnumParams, k as pgVarcharColumn, l as pgFloat4Column, m as pgInt4Column, n as PgTimestamptzDateDescriptor, o as pgBoolColumn, p as pgInt2Column, s as pgCharColumn, t as PgTimestamptzDateCodec, u as pgFloat8Column, v as pgIntervalColumn, w as pgTimestamptzDateDescriptor, x as pgNumericColumn, y as pgJsonColumn } from "./codecs-BkaZXa9Y-C8o9DOKH.mjs";
|
|
8
8
|
import { n as postgresCodecRegistry, t as postgresCodecDescriptorRegistry } from "./registry-Bf5BvREu-DJ7g3REJ.mjs";
|
|
9
|
-
import { a as validateEnumValueLength, i as quoteQualifiedName, n as qualifyName, r as quoteIdentifier, t as escapeLiteral } from "./sql-utils-
|
|
10
|
-
import { c as PostgresSchema, d as isPostgresSchema, h as postgresCreateNamespace, i as PostgresRlsPolicy, l as PostgresTableSource, m as policyInputFromSerialized, n as PostgresRlsEnablement, o as PostgresRole, u as PostgresUnboundSchema } from "./postgres-schema-
|
|
9
|
+
import { a as validateEnumValueLength, i as quoteQualifiedName, n as qualifyName, r as quoteIdentifier, t as escapeLiteral } from "./sql-utils-Bh-mnsSY-D6hnFPrP.mjs";
|
|
10
|
+
import { c as PostgresSchema, d as isPostgresSchema, h as postgresCreateNamespace, i as PostgresRlsPolicy, l as PostgresTableSource, m as policyInputFromSerialized, n as PostgresRlsEnablement, o as PostgresRole, u as PostgresUnboundSchema } from "./postgres-schema-MIh_qSUu-gKCH4OhS.mjs";
|
|
11
11
|
import { a as PostgresAlterTable, c as PostgresCreateSchema, d as PostgresDdlNode, f as PostgresDisableRowLevelSecurity, h as PostgresDropType, i as PostgresAlterPolicyRename, l as PostgresCreateTable, m as PostgresDropPolicy, n as DropDefaultAction, o as PostgresCreateIndex, p as PostgresDropIndex, r as PostgresAlterIndexRename, s as PostgresCreatePolicy, t as AddColumnAction, u as PostgresCreateType } from "./nodes-DAvDJLvJ-BBdvFXNa.mjs";
|
|
12
|
-
import { A as toRegclass, D as tableExistsAst, E as rlsPolicyExistsAst, O as tableIsEmptyAst, T as rlsEnabledAst, a as columnDefaultAst, b as extensionExistsAst, c as columnTypeAst, f as createSchema, g as dropDefaultAction, i as alterTable, k as tablePrimaryKeyAst, l as constraintExistsAst, o as columnExistsAst, p as createTable, s as columnNullabilityAst, t as addColumnAction, w as noNullValuesAst, x as indexExistsAst } from "./ddl-
|
|
13
|
-
import { a as jsonb, c as textArray, i as int8, l as timestamptz, n as buildSignMarkerBootstrapQueries, o as pgTable, r as int4, s as text, t as buildControlTableBootstrapQueries, u as timestamptzJsDate } from "./contract-free
|
|
12
|
+
import { A as toRegclass, D as tableExistsAst, E as rlsPolicyExistsAst, O as tableIsEmptyAst, T as rlsEnabledAst, a as columnDefaultAst, b as extensionExistsAst, c as columnTypeAst, f as createSchema, g as dropDefaultAction, i as alterTable, k as tablePrimaryKeyAst, l as constraintExistsAst, o as columnExistsAst, p as createTable, s as columnNullabilityAst, t as addColumnAction, w as noNullValuesAst, x as indexExistsAst } from "./ddl-CdYNv79D-BkbF3B6U.mjs";
|
|
13
|
+
import { a as jsonb, c as textArray, i as int8, l as timestamptz, n as buildSignMarkerBootstrapQueries, o as pgTable, r as int4, s as text, t as buildControlTableBootstrapQueries, u as timestamptzJsDate } from "./contract-free-DwIiLIZh.mjs";
|
|
14
14
|
import { n as postgresResolveDefault, t as parsePostgresDefault } from "./default-normalizer-Coo-llj4-6YPzp_F9.mjs";
|
|
15
|
-
import { n as renderFullTextIndexExpression, t as isFullTextIndexableCodec } from "./full-text-index-expression-
|
|
15
|
+
import { n as renderFullTextIndexExpression, t as isFullTextIndexableCodec } from "./full-text-index-expression-ix6TNfZZ-Ct96i2ZE.mjs";
|
|
16
16
|
import { n as computeContentHash, t as POLICY_OPERATION_PREDICATES } from "./canonicalize-CrN3u_xM-D4MrOqcB.mjs";
|
|
17
17
|
import { t as DEFAULT_FULL_TEXT_SEARCH_LANGUAGE } from "./text-search-languages-RO0HiUDm-CeJ7P8gS.mjs";
|
|
18
|
-
import { a as plainDateTimeNow, i as instantNowControlDescriptor, n as PLAIN_DATE_TIME_NOW_GENERATOR_ID, o as plainDateTimeNowControlDescriptor, r as instantNow, t as INSTANT_NOW_GENERATOR_ID } from "./authoring-
|
|
19
|
-
import { t as postgresRenderCheckExpressions } from "./check-expressions-
|
|
18
|
+
import { a as plainDateTimeNow, i as instantNowControlDescriptor, n as PLAIN_DATE_TIME_NOW_GENERATOR_ID, o as plainDateTimeNowControlDescriptor, r as instantNow, t as INSTANT_NOW_GENERATOR_ID } from "./authoring-BN2xWDOP-W9YifksL.mjs";
|
|
19
|
+
import { t as postgresRenderCheckExpressions } from "./check-expressions-DLCs-SXx-itMQrUsX.mjs";
|
|
20
20
|
import { n as PostgresSchemaNodeKind, r as PostgresTableSchemaNode, t as PostgresNativeEnumSchemaNode } from "./postgres-table-schema-node-BBkitBQh-DT1T5VWU.mjs";
|
|
21
21
|
import { i as PostgresRoleSchemaNode, n as PostgresNamespaceSchemaNode, r as PostgresPolicySchemaNode, t as PostgresDatabaseSchemaNode } from "./postgres-role-schema-node-B8Z5i5D--PObwlU2Z.mjs";
|
|
22
|
-
import { t as resolveDdlSchemaForNamespaceStorage } from "./resolve-ddl-schema-
|
|
23
|
-
import { n as qualifyTableName, t as buildExpectedFormatType } from "./planner-sql-checks-
|
|
24
|
-
import { n as buildColumnTypeSql, r as renderDefaultLiteral, t as buildColumnDefaultSql } from "./planner-ddl-builders-
|
|
25
|
-
import { A as RenameIndexCall, C as DropNativeEnumTypeCall, D as EnableRowLevelSecurityCall, E as DropTableCall, F as createExtension, M as SetDefaultCall, N as SetNotNullCall, O as RawSqlCall, S as DropIndexCall, T as DropPostgresRlsPolicyCall, _ as DisableRowLevelSecurityCall, b as DropConstraintCall, c as AddUniqueCall, d as CreateIndexCall, f as CreateNativeEnumTypeCall, g as DataTransformCall, h as CreateTableCall, i as AddNativeEnumValueCall, j as RenamePostgresRlsPolicyCall, k as RenameCheckConstraintCall, l as AlterColumnTypeCall, m as CreateSchemaCall, n as AddColumnCall, o as AddNotNullColumnWithTempDefaultCall, p as CreatePostgresRlsPolicyCall, r as AddForeignKeyCall, s as AddPrimaryKeyCall, t as AddCheckConstraintCall, u as CreateExtensionCall, v as DropCheckConstraintCall, w as DropNotNullCall, x as DropDefaultCall, y as DropColumnCall } from "./op-factory-call-
|
|
22
|
+
import { t as resolveDdlSchemaForNamespaceStorage } from "./resolve-ddl-schema-DDbcqhDH-QrDca-Np.mjs";
|
|
23
|
+
import { n as qualifyTableName, t as buildExpectedFormatType } from "./planner-sql-checks-D53iVGBI-B8TBz3ne.mjs";
|
|
24
|
+
import { n as buildColumnTypeSql, r as renderDefaultLiteral, t as buildColumnDefaultSql } from "./planner-ddl-builders-BncbM2oU-DR8NvtdY.mjs";
|
|
25
|
+
import { A as RenameIndexCall, C as DropNativeEnumTypeCall, D as EnableRowLevelSecurityCall, E as DropTableCall, F as createExtension, M as SetDefaultCall, N as SetNotNullCall, O as RawSqlCall, S as DropIndexCall, T as DropPostgresRlsPolicyCall, _ as DisableRowLevelSecurityCall, b as DropConstraintCall, c as AddUniqueCall, d as CreateIndexCall, f as CreateNativeEnumTypeCall, g as DataTransformCall, h as CreateTableCall, i as AddNativeEnumValueCall, j as RenamePostgresRlsPolicyCall, k as RenameCheckConstraintCall, l as AlterColumnTypeCall, m as CreateSchemaCall, n as AddColumnCall, o as AddNotNullColumnWithTempDefaultCall, p as CreatePostgresRlsPolicyCall, r as AddForeignKeyCall, s as AddPrimaryKeyCall, t as AddCheckConstraintCall, u as CreateExtensionCall, v as DropCheckConstraintCall, w as DropNotNullCall, x as DropDefaultCall, y as DropColumnCall } from "./op-factory-call-Caum7HVy-DNDV6Yjt.mjs";
|
|
26
26
|
import { n as resolveIdentityValue, t as buildBuiltinIdentityValue } from "./planner-identity-values-BmHn5C6U-BYBbUAyR.mjs";
|
|
27
27
|
import { i as hasUniqueConstraint, n as hasForeignKey, r as hasIndex, t as buildSchemaLookupMap } from "./planner-schema-lookup-kMIVP2y--CdO4VlnF.mjs";
|
|
28
|
-
import { a as planIssues, t as coalesceSubtreeIssues } from "./control-policy-
|
|
29
|
-
import { n as contractToPostgresDatabaseSchemaNode, t as buildPostgresPlanDiff } from "./diff-database-schema-
|
|
30
|
-
import { n as PostgresContractView, t as PostgresContractSerializer } from "./postgres-contract-view-
|
|
28
|
+
import { a as planIssues, t as coalesceSubtreeIssues } from "./control-policy-oa_igc-e-ncU2iE64.mjs";
|
|
29
|
+
import { n as contractToPostgresDatabaseSchemaNode, t as buildPostgresPlanDiff } from "./diff-database-schema--xSPI5GK-B3mQXFbC.mjs";
|
|
30
|
+
import { n as PostgresContractView, t as PostgresContractSerializer } from "./postgres-contract-view--CIYRzkr-DHzVwWfc.mjs";
|
|
31
31
|
import { t as dataTransform } from "./data-transform-Bo32KRbq-BLn1_UG-.mjs";
|
|
32
|
-
import { t as PostgresMigration } from "./postgres-migration-
|
|
32
|
+
import { t as PostgresMigration } from "./postgres-migration-BUcYfevN-CDiFadu6.mjs";
|
|
33
33
|
import { t as renderOps } from "./render-ops-D2vJApKB-B281fzmn.mjs";
|
|
34
34
|
import { t as renderCallsToTypeScript } from "./render-typescript-Dqp1Spgn-B128r1qw.mjs";
|
|
35
|
-
import { t as TypeScriptRenderablePostgresMigration } from "./planner-produced-postgres-migration-
|
|
36
|
-
import { t as createPostgresMigrationPlanner } from "./planner-
|
|
35
|
+
import { t as TypeScriptRenderablePostgresMigration } from "./planner-produced-postgres-migration-DW2Kumus-qpr0dAJl.mjs";
|
|
36
|
+
import { t as createPostgresMigrationPlanner } from "./planner-DV8SVMQ0-DhnG4NWX.mjs";
|
|
37
37
|
import { t as postgresDataTypeEntries } from "./data-type-entries-Fxm2HDZk-D4AAd63w.mjs";
|
|
38
38
|
import { n as parsePostgresListText, t as decodePostgresListText } from "./list-decoder-DXee1orj-K3y-hxiI.mjs";
|
|
39
|
-
import { t as postgresRenderDefault } from "./control-
|
|
39
|
+
import { t as postgresRenderDefault } from "./control-D1yPbnXZ.mjs";
|
|
40
40
|
import { a as plaintoTsquery, i as phrasetoTsquery, o as toTsquery, s as websearchToTsquery } from "./full-text-parsers-96VfzkHS-C8YGYKhj.mjs";
|
|
41
41
|
import { t as tsquery } from "./full-text-RAVq4j8W.mjs";
|
|
42
42
|
import { a as foreignKey, c as primaryKey, i as fn, l as rawSql, n as checkExpression, o as lit, r as col, s as placeholder, t as MigrationCLI, u as unique } from "./migration-PTHAY9Cv.mjs";
|
|
43
43
|
import { t as normalizeSchemaNativeType } from "./native-type-normalizer-yvd3tqv-.mjs";
|
|
44
|
-
import { t as prisma7PostgresBinding } from "./prisma7-binding-
|
|
44
|
+
import { t as prisma7PostgresBinding } from "./prisma7-binding-CAYVRnLp.mjs";
|
|
45
45
|
export { AddCheckConstraintCall, AddColumnAction, AddColumnCall, AddForeignKeyCall, AddNativeEnumValueCall, AddNotNullColumnWithTempDefaultCall, AddPrimaryKeyCall, AddUniqueCall, AlterColumnTypeCall, CreateExtensionCall, CreateIndexCall, CreateNativeEnumTypeCall, CreatePostgresRlsPolicyCall, CreateSchemaCall, CreateTableCall, DEFAULT_FULL_TEXT_SEARCH_LANGUAGE, DataTransformCall, DisableRowLevelSecurityCall, DropCheckConstraintCall, DropColumnCall, DropConstraintCall, DropDefaultAction, DropDefaultCall, DropIndexCall, DropNativeEnumTypeCall, DropNotNullCall, DropPostgresRlsPolicyCall, DropTableCall, EnableRowLevelSecurityCall, INSTANT_NOW_GENERATOR_ID, PostgresMigration as Migration, MigrationCLI, PG_BIT_CODEC_ID, PG_BOOL_CODEC_ID, PG_BYTEA_CODEC_ID, PG_CHAR_CODEC_ID, PG_DATE_STRING_CODEC_ID, PG_DATE_TEMPORAL_CODEC_ID, PG_ENUM_CODEC_ID, PG_FLOAT4_CODEC_ID, PG_FLOAT8_CODEC_ID, PG_FLOAT_CODEC_ID, PG_INET_CODEC_ID, PG_INT2_CODEC_ID, PG_INT4_CODEC_ID, PG_INT8_CODEC_ID, PG_INT8_NUMBER_CODEC_ID, PG_INTERVAL_CODEC_ID, PG_INT_CODEC_ID, PG_JSONB_CODEC_ID, PG_JSON_CODEC_ID, PG_NUMERIC_CODEC_ID, PG_TEXT_ARRAY_CODEC_ID, PG_TEXT_CODEC_ID, PG_TIMESTAMPTZ_DATE_CODEC_ID, PG_TIMESTAMPTZ_STRING_CODEC_ID, PG_TIMESTAMPTZ_TEMPORAL_CODEC_ID, PG_TIMESTAMP_STRING_CODEC_ID, PG_TIMESTAMP_TEMPORAL_CODEC_ID, PG_TIMETZ_CODEC_ID, PG_TIME_STRING_CODEC_ID, PG_TIME_TEMPORAL_CODEC_ID, PG_TSQUERY_CODEC_ID, PG_UNBOUNDED_INT_CODEC_ID, PG_UUID_CODEC_ID, PG_VARBIT_CODEC_ID, PG_VARCHAR_CODEC_ID, PLAIN_DATE_TIME_NOW_GENERATOR_ID, POLICY_OPERATION_PREDICATES, PgTimestamptzDateCodec, PgTimestamptzDateDescriptor, PostgresAlterIndexRename, PostgresAlterPolicyRename, PostgresAlterTable, PostgresCodecDescriptor, PostgresContractSerializer, PostgresContractView, PostgresCreateIndex, PostgresCreatePolicy, PostgresCreateSchema, PostgresCreateTable, PostgresCreateType, PostgresDatabaseSchemaNode, PostgresDdlNode, PostgresDisableRowLevelSecurity, PostgresDropIndex, PostgresDropPolicy, PostgresDropType, PostgresNamespaceSchemaNode, PostgresNativeEnum, PostgresNativeEnumSchemaNode, PostgresPolicySchemaNode, PostgresRlsEnablement, PostgresRlsPolicy, PostgresRole, PostgresRoleSchemaNode, PostgresSchema, PostgresSchemaNodeKind, PostgresTableSchemaNode, PostgresTableSource, PostgresUnboundSchema, RawSqlCall, RenameCheckConstraintCall, RenameIndexCall, RenamePostgresRlsPolicyCall, SQL_CHAR_CODEC_ID, SQL_FLOAT_CODEC_ID, SQL_INT_CODEC_ID, SQL_TEXT_CODEC_ID, SQL_VARCHAR_CODEC_ID, SetDefaultCall, SetNotNullCall, TypeScriptRenderablePostgresMigration, addColumnAction, alterTable, buildBuiltinIdentityValue, buildColumnDefaultSql, buildColumnTypeSql, buildControlTableBootstrapQueries, buildExpectedFormatType, buildPostgresCodecDescriptorRegistry, buildPostgresPlanDiff, buildSchemaLookupMap, buildSignMarkerBootstrapQueries, checkExpression, coalesceSubtreeIssues, col, columnDefaultAst, columnExistsAst, columnNullabilityAst, columnTypeAst, computeContentHash, constraintExistsAst, contractToPostgresDatabaseSchemaNode, createExtension, createPostgresMigrationPlanner, createSchema, createTable, dataTransform, decodePostgresListText, definePostgresCodecs, dropDefaultAction, errorPostgresMigrationStackMissing, escapeLiteral, extensionExistsAst, fn, foreignKey, hasForeignKey, hasIndex, hasUniqueConstraint, indexExistsAst, instantNow, instantNowControlDescriptor, int4, int8, isFullTextIndexableCodec, isPgEnumParams, isPostgresCodecDescriptor, isPostgresSchema, jsonb, lit, noNullValuesAst, normalizeSchemaNativeType, parsePostgresDefault, parsePostgresListText, pgBit, pgBitColumn, pgBool, pgBoolColumn, pgBytea, pgChar, pgCharColumn, pgDate, pgEnum, pgEnumDescriptor, pgFloat4, pgFloat4Column, pgFloat8, pgFloat8Column, pgFloatColumn, pgInet, pgInetColumn, pgInt2, pgInt2Column, pgInt4, pgInt4Column, pgInt8, pgInt8Column, pgInt8NumberColumn, pgIntColumn, pgInterval, pgIntervalColumn, pgJson, pgJsonColumn, pgJsonb, pgJsonbColumn, pgNumeric, pgNumericColumn, pgTable, pgText, pgTextArray, pgTextColumn, pgTime, pgTimestamp, pgTimestamptz, pgTimestamptzDateColumn, pgTimestamptzDateDescriptor, pgTimetz, pgTimetzColumn, pgTsquery, pgUnboundedIntColumn, pgUuid, pgUuidColumn, pgVarbit, pgVarbitColumn, pgVarchar, pgVarcharColumn, phrasetoTsquery, placeholder, plainDateTimeNow, plainDateTimeNowControlDescriptor, plaintoTsquery, planIssues, policyInputFromSerialized, postgresAggregateDescriptors, postgresCodec, postgresCodecDescriptorRegistry, postgresCodecRegistry, postgresCreateNamespace, postgresDataTypeEntries, postgresDataTypes, postgresError, postgresRenderCheckExpressions, postgresRenderDefault, postgresResolveDefault, primaryKey, prisma7PostgresBinding, qualifyName, qualifyTableName, quoteIdentifier, quoteQualifiedName, rawSql, renderCallsToTypeScript, renderDefaultLiteral, renderFullTextIndexExpression, renderOps, resolveDdlSchemaForNamespaceStorage, resolveIdentityValue, rlsEnabledAst, rlsPolicyExistsAst, tableExistsAst, tableIsEmptyAst, tablePrimaryKeyAst, text, textArray, timestamptz, timestamptzJsDate, toRegclass, toTsquery, tsquery, unique, validateEnumValueLength, websearchToTsquery };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as PostgresTableSource } from "./postgres-schema-
|
|
2
|
-
import { A as toRegclass, D as tableExistsAst, E as rlsPolicyExistsAst, O as tableIsEmptyAst, T as rlsEnabledAst, a as columnDefaultAst, b as extensionExistsAst, c as columnTypeAst, f as createSchema, g as dropDefaultAction, i as alterTable, k as tablePrimaryKeyAst, l as constraintExistsAst, o as columnExistsAst, p as createTable, s as columnNullabilityAst, t as addColumnAction, w as noNullValuesAst, x as indexExistsAst } from "./ddl-
|
|
3
|
-
import { a as jsonb, c as textArray, i as int8, l as timestamptz, n as buildSignMarkerBootstrapQueries, o as pgTable, r as int4, s as text, t as buildControlTableBootstrapQueries, u as timestamptzJsDate } from "./contract-free
|
|
1
|
+
import { l as PostgresTableSource } from "./postgres-schema-MIh_qSUu-gKCH4OhS.mjs";
|
|
2
|
+
import { A as toRegclass, D as tableExistsAst, E as rlsPolicyExistsAst, O as tableIsEmptyAst, T as rlsEnabledAst, a as columnDefaultAst, b as extensionExistsAst, c as columnTypeAst, f as createSchema, g as dropDefaultAction, i as alterTable, k as tablePrimaryKeyAst, l as constraintExistsAst, o as columnExistsAst, p as createTable, s as columnNullabilityAst, t as addColumnAction, w as noNullValuesAst, x as indexExistsAst } from "./ddl-CdYNv79D-BkbF3B6U.mjs";
|
|
3
|
+
import { a as jsonb, c as textArray, i as int8, l as timestamptz, n as buildSignMarkerBootstrapQueries, o as pgTable, r as int4, s as text, t as buildControlTableBootstrapQueries, u as timestamptzJsDate } from "./contract-free-DwIiLIZh.mjs";
|
|
4
4
|
export { PostgresTableSource, addColumnAction, alterTable, buildControlTableBootstrapQueries, buildSignMarkerBootstrapQueries, columnDefaultAst, columnExistsAst, columnNullabilityAst, columnTypeAst, constraintExistsAst, createSchema, createTable, dropDefaultAction, extensionExistsAst, indexExistsAst, int4, int8, jsonb, noNullValuesAst, pgTable, rlsEnabledAst, rlsPolicyExistsAst, tableExistsAst, tableIsEmptyAst, tablePrimaryKeyAst, text, textArray, timestamptz, timestamptzJsDate, toRegclass };
|
package/dist/target__control.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as instantNowControlDescriptor, n as PLAIN_DATE_TIME_NOW_GENERATOR_ID, o as plainDateTimeNowControlDescriptor, t as INSTANT_NOW_GENERATOR_ID } from "./authoring-
|
|
1
|
+
import { i as instantNowControlDescriptor, n as PLAIN_DATE_TIME_NOW_GENERATOR_ID, o as plainDateTimeNowControlDescriptor, t as INSTANT_NOW_GENERATOR_ID } from "./authoring-BN2xWDOP-W9YifksL.mjs";
|
|
2
2
|
import { n as parsePostgresListText, t as decodePostgresListText } from "./list-decoder-DXee1orj-K3y-hxiI.mjs";
|
|
3
|
-
import { n as postgresTargetDescriptor, t as postgresRenderDefault } from "./control-
|
|
3
|
+
import { n as postgresTargetDescriptor, t as postgresRenderDefault } from "./control-D1yPbnXZ.mjs";
|
|
4
4
|
export { INSTANT_NOW_GENERATOR_ID, PLAIN_DATE_TIME_NOW_GENERATOR_ID, decodePostgresListText, postgresTargetDescriptor as default, instantNowControlDescriptor, parsePostgresListText, plainDateTimeNowControlDescriptor, postgresRenderDefault };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as buildPostgresPlanDiff } from "./diff-database-schema-
|
|
1
|
+
import { t as buildPostgresPlanDiff } from "./diff-database-schema--xSPI5GK-B3mQXFbC.mjs";
|
|
2
2
|
export { buildPostgresPlanDiff };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as planIssues, t as coalesceSubtreeIssues } from "./control-policy-
|
|
1
|
+
import { a as planIssues, t as coalesceSubtreeIssues } from "./control-policy-oa_igc-e-ncU2iE64.mjs";
|
|
2
2
|
export { coalesceSubtreeIssues, planIssues };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as createExtension } from "./op-factory-call-
|
|
1
|
+
import { F as createExtension } from "./op-factory-call-Caum7HVy-DNDV6Yjt.mjs";
|
|
2
2
|
import { t as dataTransform } from "./data-transform-Bo32KRbq-BLn1_UG-.mjs";
|
|
3
|
-
import { t as PostgresMigration } from "./postgres-migration-
|
|
3
|
+
import { t as PostgresMigration } from "./postgres-migration-BUcYfevN-CDiFadu6.mjs";
|
|
4
4
|
import { a as foreignKey, c as primaryKey, i as fn, l as rawSql, n as checkExpression, o as lit, r as col, s as placeholder, t as MigrationCLI, u as unique } from "./migration-PTHAY9Cv.mjs";
|
|
5
5
|
export { PostgresMigration as Migration, MigrationCLI, checkExpression, col, createExtension, dataTransform, fn, foreignKey, lit, placeholder, primaryKey, rawSql, unique };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as RenameIndexCall, C as DropNativeEnumTypeCall, D as EnableRowLevelSecurityCall, E as DropTableCall, M as SetDefaultCall, N as SetNotNullCall, O as RawSqlCall, S as DropIndexCall, T as DropPostgresRlsPolicyCall, _ as DisableRowLevelSecurityCall, b as DropConstraintCall, c as AddUniqueCall, d as CreateIndexCall, f as CreateNativeEnumTypeCall, g as DataTransformCall, h as CreateTableCall, i as AddNativeEnumValueCall, j as RenamePostgresRlsPolicyCall, k as RenameCheckConstraintCall, l as AlterColumnTypeCall, m as CreateSchemaCall, n as AddColumnCall, o as AddNotNullColumnWithTempDefaultCall, p as CreatePostgresRlsPolicyCall, r as AddForeignKeyCall, s as AddPrimaryKeyCall, t as AddCheckConstraintCall, u as CreateExtensionCall, v as DropCheckConstraintCall, w as DropNotNullCall, x as DropDefaultCall, y as DropColumnCall } from "./op-factory-call-
|
|
1
|
+
import { A as RenameIndexCall, C as DropNativeEnumTypeCall, D as EnableRowLevelSecurityCall, E as DropTableCall, M as SetDefaultCall, N as SetNotNullCall, O as RawSqlCall, S as DropIndexCall, T as DropPostgresRlsPolicyCall, _ as DisableRowLevelSecurityCall, b as DropConstraintCall, c as AddUniqueCall, d as CreateIndexCall, f as CreateNativeEnumTypeCall, g as DataTransformCall, h as CreateTableCall, i as AddNativeEnumValueCall, j as RenamePostgresRlsPolicyCall, k as RenameCheckConstraintCall, l as AlterColumnTypeCall, m as CreateSchemaCall, n as AddColumnCall, o as AddNotNullColumnWithTempDefaultCall, p as CreatePostgresRlsPolicyCall, r as AddForeignKeyCall, s as AddPrimaryKeyCall, t as AddCheckConstraintCall, u as CreateExtensionCall, v as DropCheckConstraintCall, w as DropNotNullCall, x as DropDefaultCall, y as DropColumnCall } from "./op-factory-call-Caum7HVy-DNDV6Yjt.mjs";
|
|
2
2
|
export { AddCheckConstraintCall, AddColumnCall, AddForeignKeyCall, AddNativeEnumValueCall, AddNotNullColumnWithTempDefaultCall, AddPrimaryKeyCall, AddUniqueCall, AlterColumnTypeCall, CreateExtensionCall, CreateIndexCall, CreateNativeEnumTypeCall, CreatePostgresRlsPolicyCall, CreateSchemaCall, CreateTableCall, DataTransformCall, DisableRowLevelSecurityCall, DropCheckConstraintCall, DropColumnCall, DropConstraintCall, DropDefaultCall, DropIndexCall, DropNativeEnumTypeCall, DropNotNullCall, DropPostgresRlsPolicyCall, DropTableCall, EnableRowLevelSecurityCall, RawSqlCall, RenameCheckConstraintCall, RenameIndexCall, RenamePostgresRlsPolicyCall, SetDefaultCall, SetNotNullCall };
|
package/dist/target__pack.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as postgresTargetDescriptorMeta } from "./descriptor-meta-
|
|
1
|
+
import { t as postgresTargetDescriptorMeta } from "./descriptor-meta-CjrJ0dyT-DToyOBfC.mjs";
|
|
2
2
|
export { postgresTargetDescriptorMeta as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as buildColumnTypeSql, r as renderDefaultLiteral, t as buildColumnDefaultSql } from "./planner-ddl-builders-
|
|
1
|
+
import { n as buildColumnTypeSql, r as renderDefaultLiteral, t as buildColumnDefaultSql } from "./planner-ddl-builders-BncbM2oU-DR8NvtdY.mjs";
|
|
2
2
|
export { buildColumnDefaultSql, buildColumnTypeSql, renderDefaultLiteral };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as TypeScriptRenderablePostgresMigration } from "./planner-produced-postgres-migration-
|
|
1
|
+
import { t as TypeScriptRenderablePostgresMigration } from "./planner-produced-postgres-migration-DW2Kumus-qpr0dAJl.mjs";
|
|
2
2
|
export { TypeScriptRenderablePostgresMigration };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as qualifyTableName, t as buildExpectedFormatType } from "./planner-sql-checks-
|
|
1
|
+
import { n as qualifyTableName, t as buildExpectedFormatType } from "./planner-sql-checks-D53iVGBI-B8TBz3ne.mjs";
|
|
2
2
|
export { buildExpectedFormatType, qualifyTableName };
|
package/dist/target__planner.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as contractToPostgresDatabaseSchemaNode } from "./diff-database-schema-
|
|
2
|
-
import { t as createPostgresMigrationPlanner } from "./planner-
|
|
1
|
+
import { n as contractToPostgresDatabaseSchemaNode } from "./diff-database-schema--xSPI5GK-B3mQXFbC.mjs";
|
|
2
|
+
import { t as createPostgresMigrationPlanner } from "./planner-DV8SVMQ0-DhnG4NWX.mjs";
|
|
3
3
|
export { contractToPostgresDatabaseSchemaNode, createPostgresMigrationPlanner };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as prisma7PostgresBinding } from "./prisma7-binding-
|
|
1
|
+
import { t as prisma7PostgresBinding } from "./prisma7-binding-CAYVRnLp.mjs";
|
|
2
2
|
export { prisma7PostgresBinding };
|
package/dist/target__runtime.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { S as PG_TEXT_CODEC_ID, c as PG_FLOAT4_CODEC_ID, j as PG_TSQUERY_CODEC_ID, n as PG_BOOL_CODEC_ID } from "./codec-ids-Cb0yO-IS--e0P2rfI.mjs";
|
|
2
|
-
import { a as plainDateTimeNow, n as PLAIN_DATE_TIME_NOW_GENERATOR_ID, r as instantNow, t as INSTANT_NOW_GENERATOR_ID } from "./authoring-
|
|
2
|
+
import { a as plainDateTimeNow, n as PLAIN_DATE_TIME_NOW_GENERATOR_ID, r as instantNow, t as INSTANT_NOW_GENERATOR_ID } from "./authoring-BN2xWDOP-W9YifksL.mjs";
|
|
3
3
|
import { t as postgresTargetDescriptorMetaRuntime } from "./descriptor-meta-runtime-UwYdV8fD-B_m_Ha8r.mjs";
|
|
4
|
-
import { n as PostgresContractView, t as PostgresContractSerializer } from "./postgres-contract-view-
|
|
4
|
+
import { n as PostgresContractView, t as PostgresContractSerializer } from "./postgres-contract-view--CIYRzkr-DHzVwWfc.mjs";
|
|
5
5
|
import { t as decodePostgresListText } from "./list-decoder-DXee1orj-K3y-hxiI.mjs";
|
|
6
6
|
import { a as plaintoTsquery, i as phrasetoTsquery, n as languageLiteral, o as toTsquery, r as normalizationLiteral, s as websearchToTsquery, t as headlineOptionsLiteral } from "./full-text-parsers-96VfzkHS-C8YGYKhj.mjs";
|
|
7
7
|
import { buildOperation, toExpr } from "@prisma/orm-family-sql/relational-core/expression";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"target__runtime.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/runtime.mjs"],"sourcesContent":["import { S as PG_TEXT_CODEC_ID, c as PG_FLOAT4_CODEC_ID, j as PG_TSQUERY_CODEC_ID, n as PG_BOOL_CODEC_ID } from \"./codec-ids-Cb0yO-IS.mjs\";\nimport { c as PLAIN_DATE_TIME_NOW_GENERATOR_ID, d as INSTANT_NOW_GENERATOR_ID, f as instantNow, l as plainDateTimeNow } from \"./authoring-
|
|
1
|
+
{"version":3,"file":"target__runtime.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/runtime.mjs"],"sourcesContent":["import { S as PG_TEXT_CODEC_ID, c as PG_FLOAT4_CODEC_ID, j as PG_TSQUERY_CODEC_ID, n as PG_BOOL_CODEC_ID } from \"./codec-ids-Cb0yO-IS.mjs\";\nimport { c as PLAIN_DATE_TIME_NOW_GENERATOR_ID, d as INSTANT_NOW_GENERATOR_ID, f as instantNow, l as plainDateTimeNow } from \"./authoring-BN2xWDOP.mjs\";\nimport \"./text-search-languages-RO0HiUDm.mjs\";\nimport { t as postgresTargetDescriptorMetaRuntime } from \"./descriptor-meta-runtime-UwYdV8fD.mjs\";\nimport { n as PostgresContractSerializer, t as PostgresContractView } from \"./postgres-contract-view--CIYRzkr.mjs\";\nimport { t as decodePostgresListText } from \"./list-decoder-DXee1orj.mjs\";\nimport { a as headlineOptionsLiteral, i as websearchToTsquery, n as plaintoTsquery, o as languageLiteral, r as toTsquery, s as normalizationLiteral, t as phrasetoTsquery } from \"./full-text-parsers-96VfzkHS.mjs\";\nimport { buildOperation, toExpr } from \"@internal/sql-relational-core/expression\";\n//#region src/core/query-operations.ts\nconst TEXT_REF = { codecId: PG_TEXT_CODEC_ID };\nconst TSQUERY_REF = { codecId: PG_TSQUERY_CODEC_ID };\nconst languageOf = (options) => options.language ?? \"english\";\nfunction postgresQueryOperations() {\n\treturn {\n\t\tilike: {\n\t\t\tself: { traits: [\"textual\"] },\n\t\t\timpl: (self, pattern) => buildOperation({\n\t\t\t\tmethod: \"ilike\",\n\t\t\t\targs: [toExpr(self), toExpr(pattern, TEXT_REF)],\n\t\t\t\treturns: {\n\t\t\t\t\tcodecId: PG_BOOL_CODEC_ID,\n\t\t\t\t\tnullable: false\n\t\t\t\t},\n\t\t\t\tlowering: {\n\t\t\t\t\ttargetFamily: \"sql\",\n\t\t\t\t\ttemplate: \"{{self}} ILIKE {{arg0}}\"\n\t\t\t\t}\n\t\t\t})\n\t\t},\n\t\tfullTextMatches: {\n\t\t\tself: { traits: [\"textual\"] },\n\t\t\timpl: (self, query, options = {}) => buildOperation({\n\t\t\t\tmethod: \"fullTextMatches\",\n\t\t\t\targs: [\n\t\t\t\t\ttoExpr(self),\n\t\t\t\t\ttoExpr(query, TSQUERY_REF),\n\t\t\t\t\tlanguageLiteral(\"fullTextMatches\", languageOf(options))\n\t\t\t\t],\n\t\t\t\treturns: {\n\t\t\t\t\tcodecId: PG_BOOL_CODEC_ID,\n\t\t\t\t\tnullable: false\n\t\t\t\t},\n\t\t\t\tlowering: {\n\t\t\t\t\ttargetFamily: \"sql\",\n\t\t\t\t\ttemplate: \"to_tsvector({{arg1}}, {{self}}) @@ {{arg0}}\"\n\t\t\t\t}\n\t\t\t})\n\t\t},\n\t\tfullTextRank: {\n\t\t\tself: { traits: [\"textual\"] },\n\t\t\timpl: (self, query, options = {}) => {\n\t\t\t\tconst fn = options.coverDensity === true ? \"ts_rank_cd\" : \"ts_rank\";\n\t\t\t\tconst normalization = options.normalization === void 0 ? void 0 : normalizationLiteral(\"fullTextRank\", options.normalization);\n\t\t\t\tconst vectorAndQuery = \"to_tsvector({{arg1}}, {{self}}), {{arg0}}\";\n\t\t\t\treturn buildOperation({\n\t\t\t\t\tmethod: \"fullTextRank\",\n\t\t\t\t\targs: [\n\t\t\t\t\t\ttoExpr(self),\n\t\t\t\t\t\ttoExpr(query, TSQUERY_REF),\n\t\t\t\t\t\tlanguageLiteral(\"fullTextRank\", languageOf(options)),\n\t\t\t\t\t\t...normalization === void 0 ? [] : [normalization]\n\t\t\t\t\t],\n\t\t\t\t\treturns: {\n\t\t\t\t\t\tcodecId: PG_FLOAT4_CODEC_ID,\n\t\t\t\t\t\tnullable: false\n\t\t\t\t\t},\n\t\t\t\t\tlowering: {\n\t\t\t\t\t\ttargetFamily: \"sql\",\n\t\t\t\t\t\ttemplate: `${fn}(${vectorAndQuery}${normalization === void 0 ? \"\" : \", {{arg2}}\"})`\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tfullTextHeadline: {\n\t\t\tself: { traits: [\"textual\"] },\n\t\t\timpl: (self, query, options = {}) => {\n\t\t\t\tconst headlineOptions = headlineOptionsLiteral(\"fullTextHeadline\", options);\n\t\t\t\tconst base = \"ts_headline({{arg1}}, {{self}}, {{arg0}}\";\n\t\t\t\treturn buildOperation({\n\t\t\t\t\tmethod: \"fullTextHeadline\",\n\t\t\t\t\targs: [\n\t\t\t\t\t\ttoExpr(self),\n\t\t\t\t\t\ttoExpr(query, TSQUERY_REF),\n\t\t\t\t\t\tlanguageLiteral(\"fullTextHeadline\", languageOf(options)),\n\t\t\t\t\t\t...headlineOptions === void 0 ? [] : [headlineOptions]\n\t\t\t\t\t],\n\t\t\t\t\treturns: {\n\t\t\t\t\t\tcodecId: PG_TEXT_CODEC_ID,\n\t\t\t\t\t\tnullable: false\n\t\t\t\t\t},\n\t\t\t\t\tlowering: {\n\t\t\t\t\t\ttargetFamily: \"sql\",\n\t\t\t\t\t\ttemplate: `${base}${headlineOptions === void 0 ? \"\" : \", {{arg2}}\"})`\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\twebsearchToTsquery: { impl: websearchToTsquery },\n\t\ttoTsquery: { impl: toTsquery },\n\t\tplaintoTsquery: { impl: plaintoTsquery },\n\t\tphrasetoTsquery: { impl: phrasetoTsquery }\n\t};\n}\n//#endregion\n//#region src/exports/runtime.ts\n/**\n* Target-postgres deliberately does NOT import `SqlRuntimeTargetDescriptor` from `@internal/sql-runtime`. The target package is a control-plane residence and must not pull the SQL execution-plane package into its dependency closure. The runtime descriptor here is shaped to satisfy the framework's `RuntimeTargetDescriptor` plus the structural `SqlStaticContributions` (`codecs:` returning a descriptor list) that\n* `@internal/sql-runtime` consumers narrow to at composition time.\n*\n* The target itself contributes no codecs — postgres-specific codecs ship from the postgres adapter and from extension packs (pgvector, arktype-json, etc.).\n*/\nconst postgresRuntimeTargetDescriptor = {\n\t...postgresTargetDescriptorMetaRuntime,\n\tcodecs: () => [],\n\tlistDecoder: () => decodePostgresListText,\n\tqueryOperations: () => postgresQueryOperations(),\n\tcreate() {\n\t\treturn {\n\t\t\tfamilyId: \"sql\",\n\t\t\ttargetId: \"postgres\"\n\t\t};\n\t}\n};\n//#endregion\nexport { INSTANT_NOW_GENERATOR_ID, PLAIN_DATE_TIME_NOW_GENERATOR_ID, PostgresContractSerializer, PostgresContractView, decodePostgresListText, postgresRuntimeTargetDescriptor as default, instantNow, plainDateTimeNow };\n\n//# sourceMappingURL=runtime.mjs.map"],"mappings":";;;;;;;;AASA,MAAM,WAAW,EAAE,SAAS,iBAAiB;AAC7C,MAAM,cAAc,EAAE,SAAS,oBAAoB;AACnD,MAAM,cAAc,YAAY,QAAQ,YAAY;AACpD,SAAS,0BAA0B;CAClC,OAAO;EACN,OAAO;GACN,MAAM,EAAE,QAAQ,CAAC,SAAS,EAAE;GAC5B,OAAO,MAAM,YAAY,eAAe;IACvC,QAAQ;IACR,MAAM,CAAC,OAAO,IAAI,GAAG,OAAO,SAAS,QAAQ,CAAC;IAC9C,SAAS;KACR,SAAS;KACT,UAAU;IACX;IACA,UAAU;KACT,cAAc;KACd,UAAU;IACX;GACD,CAAC;EACF;EACA,iBAAiB;GAChB,MAAM,EAAE,QAAQ,CAAC,SAAS,EAAE;GAC5B,OAAO,MAAM,OAAO,UAAU,CAAC,MAAM,eAAe;IACnD,QAAQ;IACR,MAAM;KACL,OAAO,IAAI;KACX,OAAO,OAAO,WAAW;KACzB,gBAAgB,mBAAmB,WAAW,OAAO,CAAC;IACvD;IACA,SAAS;KACR,SAAS;KACT,UAAU;IACX;IACA,UAAU;KACT,cAAc;KACd,UAAU;IACX;GACD,CAAC;EACF;EACA,cAAc;GACb,MAAM,EAAE,QAAQ,CAAC,SAAS,EAAE;GAC5B,OAAO,MAAM,OAAO,UAAU,CAAC,MAAM;IACpC,MAAM,KAAK,QAAQ,iBAAiB,OAAO,eAAe;IAC1D,MAAM,gBAAgB,QAAQ,kBAAkB,KAAK,IAAI,KAAK,IAAI,qBAAqB,gBAAgB,QAAQ,aAAa;IAC5H,MAAM,iBAAiB;IACvB,OAAO,eAAe;KACrB,QAAQ;KACR,MAAM;MACL,OAAO,IAAI;MACX,OAAO,OAAO,WAAW;MACzB,gBAAgB,gBAAgB,WAAW,OAAO,CAAC;MACnD,GAAG,kBAAkB,KAAK,IAAI,CAAC,IAAI,CAAC,aAAa;KAClD;KACA,SAAS;MACR,SAAS;MACT,UAAU;KACX;KACA,UAAU;MACT,cAAc;MACd,UAAU,GAAG,GAAG,GAAG,iBAAiB,kBAAkB,KAAK,IAAI,KAAK,aAAa;KAClF;IACD,CAAC;GACF;EACD;EACA,kBAAkB;GACjB,MAAM,EAAE,QAAQ,CAAC,SAAS,EAAE;GAC5B,OAAO,MAAM,OAAO,UAAU,CAAC,MAAM;IACpC,MAAM,kBAAkB,uBAAuB,oBAAoB,OAAO;IAC1E,MAAM,OAAO;IACb,OAAO,eAAe;KACrB,QAAQ;KACR,MAAM;MACL,OAAO,IAAI;MACX,OAAO,OAAO,WAAW;MACzB,gBAAgB,oBAAoB,WAAW,OAAO,CAAC;MACvD,GAAG,oBAAoB,KAAK,IAAI,CAAC,IAAI,CAAC,eAAe;KACtD;KACA,SAAS;MACR,SAAS;MACT,UAAU;KACX;KACA,UAAU;MACT,cAAc;MACd,UAAU,GAAG,OAAO,oBAAoB,KAAK,IAAI,KAAK,aAAa;KACpE;IACD,CAAC;GACF;EACD;EACA,oBAAoB,EAAE,MAAM,mBAAmB;EAC/C,WAAW,EAAE,MAAM,UAAU;EAC7B,gBAAgB,EAAE,MAAM,eAAe;EACvC,iBAAiB,EAAE,MAAM,gBAAgB;CAC1C;AACD;;;;;;;AASA,MAAM,kCAAkC;CACvC,GAAG;CACH,cAAc,CAAC;CACf,mBAAmB;CACnB,uBAAuB,wBAAwB;CAC/C,SAAS;EACR,OAAO;GACN,UAAU;GACV,UAAU;EACX;CACD;AACD"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as resolveDdlSchemaForNamespaceStorage } from "./resolve-ddl-schema-
|
|
1
|
+
import { t as resolveDdlSchemaForNamespaceStorage } from "./resolve-ddl-schema-DDbcqhDH-QrDca-Np.mjs";
|
|
2
2
|
export { resolveDdlSchemaForNamespaceStorage };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { t as DEFAULT_FULL_TEXT_SEARCH_LANGUAGE } from "./text-search-languages-BzhBMCtK-D26JB2w3.mjs";
|
|
2
|
-
import { a as quoteQualifiedName, i as quoteIdentifier, n as isFullTextIndexableCodec, o as renderFullTextIndexExpression, r as qualifyName, s as validateEnumValueLength, t as escapeLiteral } from "./sql-utils-
|
|
2
|
+
import { a as quoteQualifiedName, i as quoteIdentifier, n as isFullTextIndexableCodec, o as renderFullTextIndexExpression, r as qualifyName, s as validateEnumValueLength, t as escapeLiteral } from "./sql-utils-DqFxskY6.mjs";
|
|
3
3
|
export { DEFAULT_FULL_TEXT_SEARCH_LANGUAGE, escapeLiteral, isFullTextIndexableCodec, qualifyName, quoteIdentifier, quoteQualifiedName, renderFullTextIndexExpression, validateEnumValueLength };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as validateEnumValueLength, i as quoteQualifiedName, n as qualifyName, r as quoteIdentifier, t as escapeLiteral } from "./sql-utils-
|
|
2
|
-
import { n as renderFullTextIndexExpression, t as isFullTextIndexableCodec } from "./full-text-index-expression-
|
|
1
|
+
import { a as validateEnumValueLength, i as quoteQualifiedName, n as qualifyName, r as quoteIdentifier, t as escapeLiteral } from "./sql-utils-Bh-mnsSY-D6hnFPrP.mjs";
|
|
2
|
+
import { n as renderFullTextIndexExpression, t as isFullTextIndexableCodec } from "./full-text-index-expression-ix6TNfZZ-Ct96i2ZE.mjs";
|
|
3
3
|
import { t as DEFAULT_FULL_TEXT_SEARCH_LANGUAGE } from "./text-search-languages-RO0HiUDm-CeJ7P8gS.mjs";
|
|
4
4
|
export { DEFAULT_FULL_TEXT_SEARCH_LANGUAGE, escapeLiteral, isFullTextIndexableCodec, qualifyName, quoteIdentifier, quoteQualifiedName, renderFullTextIndexExpression, validateEnumValueLength };
|
package/dist/target__types.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as PostgresNativeEnum } from "./postgres-native-enum-CdP3b_-R-Cgz9KEKx.mjs";
|
|
2
|
-
import { c as PostgresSchema, d as isPostgresSchema, h as postgresCreateNamespace, i as PostgresRlsPolicy, m as policyInputFromSerialized, n as PostgresRlsEnablement, o as PostgresRole, u as PostgresUnboundSchema } from "./postgres-schema-
|
|
3
|
-
import { t as postgresRenderCheckExpressions } from "./check-expressions-
|
|
2
|
+
import { c as PostgresSchema, d as isPostgresSchema, h as postgresCreateNamespace, i as PostgresRlsPolicy, m as policyInputFromSerialized, n as PostgresRlsEnablement, o as PostgresRole, u as PostgresUnboundSchema } from "./postgres-schema-MIh_qSUu-gKCH4OhS.mjs";
|
|
3
|
+
import { t as postgresRenderCheckExpressions } from "./check-expressions-DLCs-SXx-itMQrUsX.mjs";
|
|
4
4
|
import { n as PostgresSchemaNodeKind, r as PostgresTableSchemaNode, t as PostgresNativeEnumSchemaNode } from "./postgres-table-schema-node-BBkitBQh-DT1T5VWU.mjs";
|
|
5
5
|
import { i as PostgresRoleSchemaNode, n as PostgresNamespaceSchemaNode, r as PostgresPolicySchemaNode, t as PostgresDatabaseSchemaNode } from "./postgres-role-schema-node-B8Z5i5D--PObwlU2Z.mjs";
|
|
6
6
|
export { PostgresDatabaseSchemaNode, PostgresNamespaceSchemaNode, PostgresNativeEnum, PostgresNativeEnumSchemaNode, PostgresPolicySchemaNode, PostgresRlsEnablement, PostgresRlsPolicy, PostgresRole, PostgresRoleSchemaNode, PostgresSchema, PostgresSchemaNodeKind, PostgresTableSchemaNode, PostgresUnboundSchema, isPostgresSchema, policyInputFromSerialized, postgresCreateNamespace, postgresRenderCheckExpressions };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/orm-target-postgres",
|
|
3
|
-
"version": "8.0.0-rc.12-dev.
|
|
3
|
+
"version": "8.0.0-rc.12-dev.6",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
"dist"
|
|
10
10
|
],
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@prisma/orm-family-sql": "8.0.0-rc.12-dev.
|
|
13
|
-
"@prisma/orm-framework": "8.0.0-rc.12-dev.
|
|
14
|
-
"@prisma/orm-toolchain": "8.0.0-rc.12-dev.
|
|
12
|
+
"@prisma/orm-family-sql": "8.0.0-rc.12-dev.6",
|
|
13
|
+
"@prisma/orm-framework": "8.0.0-rc.12-dev.6",
|
|
14
|
+
"@prisma/orm-toolchain": "8.0.0-rc.12-dev.6",
|
|
15
15
|
"@standard-schema/spec": "^1.1.0",
|
|
16
16
|
"@types/node": "26.1.2",
|
|
17
17
|
"@types/pg": "8.20.4",
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
"postgres-array": "2.0.0"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@internal/adapter-postgres": "8.0.0-rc.12-dev.
|
|
26
|
-
"@internal/driver-postgres": "8.0.0-rc.12-dev.
|
|
27
|
-
"@internal/target-postgres": "8.0.0-rc.12-dev.
|
|
28
|
-
"@repo/tsconfig": "8.0.0-rc.12-dev.
|
|
29
|
-
"@repo/tsdown": "8.0.0-rc.12-dev.
|
|
25
|
+
"@internal/adapter-postgres": "8.0.0-rc.12-dev.6",
|
|
26
|
+
"@internal/driver-postgres": "8.0.0-rc.12-dev.6",
|
|
27
|
+
"@internal/target-postgres": "8.0.0-rc.12-dev.6",
|
|
28
|
+
"@repo/tsconfig": "8.0.0-rc.12-dev.6",
|
|
29
|
+
"@repo/tsdown": "8.0.0-rc.12-dev.6",
|
|
30
30
|
"tsdown": "0.22.14",
|
|
31
31
|
"typescript": "5.9.3",
|
|
32
32
|
"vitest": "5.0.0-rc.2"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sql-utils-6j9YTLpr-BCyCBPBg.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/sql-utils-6j9YTLpr.mjs"],"sourcesContent":["import { s as postgresError } from \"./errors-DYyzTYzE.mjs\";\n//#region src/core/sql-utils.ts\n/**\n* Shared SQL utility functions for the Postgres target.\n*\n* These functions handle safe SQL identifier and literal escaping\n* with security validations to prevent injection and encoding issues.\n*\n* They live in `target-postgres` because both the control adapter (used at\n* emit time) and the runtime adapter (used at execute time) need the same\n* escaping/validation behavior, and the target package is the natural shared\n* home that both adapters can depend on without crossing planes.\n*/\nconst MAX_IDENTIFIER_LENGTH = 63;\n/**\n* Validates and quotes a PostgreSQL identifier (table, column, type, schema names).\n*\n* Security validations:\n* - Rejects null bytes which could cause truncation or unexpected behavior\n* - Rejects empty identifiers\n* - Warns on identifiers exceeding PostgreSQL's 63-character limit\n*\n* @throws `CONTRACT.IDENTIFIER_INVALID` structured error If the identifier contains null bytes or is empty\n*/\nfunction quoteIdentifier(identifier) {\n\tif (identifier.length === 0) throw postgresError(\"CONTRACT.IDENTIFIER_INVALID\", \"Identifier cannot be empty\", { meta: {\n\t\tvalue: identifier,\n\t\tcontext: \"identifier\"\n\t} });\n\tif (identifier.includes(\"\\0\")) throw postgresError(\"CONTRACT.IDENTIFIER_INVALID\", \"Identifier cannot contain null bytes\", { meta: {\n\t\tvalue: identifier.replace(/\\0/g, \"\\\\0\"),\n\t\tcontext: \"identifier\"\n\t} });\n\tif (identifier.length > MAX_IDENTIFIER_LENGTH) console.warn(`Identifier \"${identifier.slice(0, 20)}...\" exceeds PostgreSQL's ${MAX_IDENTIFIER_LENGTH}-character limit and will be truncated`);\n\treturn `\"${identifier.replace(/\"/g, \"\\\"\\\"\")}\"`;\n}\n/**\n* Escapes a string literal for safe use in SQL statements.\n*\n* Security validations:\n* - Rejects null bytes which could cause truncation or unexpected behavior\n*\n* Note: This assumes PostgreSQL's `standard_conforming_strings` is ON (default since PG 9.1).\n* Backslashes are treated as literal characters, not escape sequences.\n*\n* @throws `CONTRACT.IDENTIFIER_INVALID` structured error If the value contains null bytes\n*/\nfunction escapeLiteral(value) {\n\tif (value.includes(\"\\0\")) throw postgresError(\"CONTRACT.IDENTIFIER_INVALID\", \"Literal value cannot contain null bytes\", { meta: {\n\t\tvalue: value.replace(/\\0/g, \"\\\\0\"),\n\t\tcontext: \"literal\"\n\t} });\n\treturn value.replace(/'/g, \"''\");\n}\n/**\n* Builds a qualified name (schema.object) with proper quoting.\n*/\nfunction qualifyName(schemaName, objectName) {\n\treturn `${quoteIdentifier(schemaName)}.${quoteIdentifier(objectName)}`;\n}\n/**\n* Quotes a possibly dot-qualified name segment-by-segment:\n* `order_status` -> `\"order_status\"`, `auth.aal_level` -> `\"auth\".\"aal_level\"`.\n* A single-segment name round-trips to exactly {@link quoteIdentifier}; whole-\n* string quoting (`\"auth.aal_level\"`) would be one wrong identifier.\n*/\nfunction quoteQualifiedName(name) {\n\treturn name.split(\".\").map((segment) => quoteIdentifier(segment)).join(\".\");\n}\n/**\n* Validates that an enum value doesn't exceed PostgreSQL's label length limit.\n*\n* PostgreSQL enum labels have a maximum length of NAMEDATALEN-1 (63 bytes by default).\n* Unlike identifiers, enum labels that exceed this limit cause an error rather than\n* silent truncation.\n*\n* @param value - The enum value to validate\n* @param enumTypeName - Name of the enum type (for error messages)\n* @throws `CONTRACT.IDENTIFIER_INVALID` structured error If the value exceeds the maximum length\n*/\nfunction validateEnumValueLength(value, enumTypeName) {\n\tif (new TextEncoder().encode(value).length > MAX_IDENTIFIER_LENGTH) throw postgresError(\"CONTRACT.IDENTIFIER_INVALID\", `Enum value \"${value.slice(0, 20)}...\" for type \"${enumTypeName}\" exceeds PostgreSQL's ${MAX_IDENTIFIER_LENGTH}-byte label limit`, { meta: {\n\t\tvalue,\n\t\tcontext: \"enum-label\"\n\t} });\n}\n//#endregion\nexport { validateEnumValueLength as a, quoteQualifiedName as i, qualifyName as n, quoteIdentifier as r, escapeLiteral as t };\n\n//# sourceMappingURL=sql-utils-6j9YTLpr.mjs.map"],"mappings":";;;;;;;;;;;;;AAaA,MAAM,wBAAwB;;;;;;;;;;;AAW9B,SAAS,gBAAgB,YAAY;CACpC,IAAI,WAAW,WAAW,GAAG,MAAM,cAAc,+BAA+B,8BAA8B,EAAE,MAAM;EACrH,OAAO;EACP,SAAS;CACV,EAAE,CAAC;CACH,IAAI,WAAW,SAAS,IAAI,GAAG,MAAM,cAAc,+BAA+B,wCAAwC,EAAE,MAAM;EACjI,OAAO,WAAW,QAAQ,OAAO,KAAK;EACtC,SAAS;CACV,EAAE,CAAC;CACH,IAAI,WAAW,SAAS,uBAAuB,QAAQ,KAAK,eAAe,WAAW,MAAM,GAAG,EAAE,EAAE,4BAA4B,sBAAsB,uCAAuC;CAC5L,OAAO,IAAI,WAAW,QAAQ,MAAM,MAAM,EAAE;AAC7C;;;;;;;;;;;;AAYA,SAAS,cAAc,OAAO;CAC7B,IAAI,MAAM,SAAS,IAAI,GAAG,MAAM,cAAc,+BAA+B,2CAA2C,EAAE,MAAM;EAC/H,OAAO,MAAM,QAAQ,OAAO,KAAK;EACjC,SAAS;CACV,EAAE,CAAC;CACH,OAAO,MAAM,QAAQ,MAAM,IAAI;AAChC;;;;AAIA,SAAS,YAAY,YAAY,YAAY;CAC5C,OAAO,GAAG,gBAAgB,UAAU,EAAE,GAAG,gBAAgB,UAAU;AACpE;;;;;;;AAOA,SAAS,mBAAmB,MAAM;CACjC,OAAO,KAAK,MAAM,GAAG,CAAC,CAAC,KAAK,YAAY,gBAAgB,OAAO,CAAC,CAAC,CAAC,KAAK,GAAG;AAC3E;;;;;;;;;;;;AAYA,SAAS,wBAAwB,OAAO,cAAc;CACrD,IAAI,IAAI,YAAY,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,SAAS,uBAAuB,MAAM,cAAc,+BAA+B,eAAe,MAAM,MAAM,GAAG,EAAE,EAAE,iBAAiB,aAAa,yBAAyB,sBAAsB,oBAAoB,EAAE,MAAM;EACjQ;EACA,SAAS;CACV,EAAE,CAAC;AACJ"}
|