@prisma/orm-target-postgres 8.0.0-rc.23-dev.10 → 8.0.0-rc.23-dev.12

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.
Files changed (115) hide show
  1. package/dist/{adapter-BRTXHtXv-CTn1Kl9-.mjs → adapter-BRTXHtXv-DBeQuJnG.mjs} +5 -5
  2. package/dist/{adapter-BRTXHtXv-CTn1Kl9-.mjs.map → adapter-BRTXHtXv-DBeQuJnG.mjs.map} +1 -1
  3. package/dist/adapter.mjs +5 -5
  4. package/dist/adapter__adapter.mjs +2 -2
  5. package/dist/adapter__control.mjs +4 -4
  6. package/dist/adapter__runtime.mjs +5 -5
  7. package/dist/adapter__sql-renderer.mjs +1 -1
  8. package/dist/{authoring-BD4uEpBM-DIJiGq4e.mjs → authoring-BbS0bin5-U9tXyzS6.mjs} +6 -6
  9. package/dist/{authoring-BD4uEpBM-DIJiGq4e.mjs.map → authoring-BbS0bin5-U9tXyzS6.mjs.map} +1 -1
  10. package/dist/{autoincrement-widths-B_JzBc-a-R7zoqIc3.mjs → autoincrement-widths-PwZcc5Co-1O2WEMYq.mjs} +3 -3
  11. package/dist/{autoincrement-widths-B_JzBc-a-R7zoqIc3.mjs.map → autoincrement-widths-PwZcc5Co-1O2WEMYq.mjs.map} +1 -1
  12. package/dist/{check-expressions-DL9WtMO5-CUcbN2JG.mjs → check-expressions-Ch-A_NJN-BscDa8xT.mjs} +3 -3
  13. package/dist/{check-expressions-DL9WtMO5-CUcbN2JG.mjs.map → check-expressions-Ch-A_NJN-BscDa8xT.mjs.map} +1 -1
  14. package/dist/{codec-registry-7LHPD8C1-BALCyEB-.mjs → codec-registry-B0LsFn7Z-ej9yKwTq.mjs} +4 -4
  15. package/dist/{codec-registry-7LHPD8C1-BALCyEB-.mjs.map → codec-registry-B0LsFn7Z-ej9yKwTq.mjs.map} +1 -1
  16. package/dist/{codecs-CV-_K-z0-DZc60ccR.mjs → codecs-Bzj3M0Q3-C2oFSIGs.mjs} +4 -4
  17. package/dist/{codecs-CV-_K-z0-DZc60ccR.mjs.map → codecs-Bzj3M0Q3-C2oFSIGs.mjs.map} +1 -1
  18. package/dist/{contract-contributions-n5CdvwA9-CuIvRgJp.mjs → contract-contributions-n5CdvwA9-BgUoiuTT.mjs} +8 -8
  19. package/dist/{contract-contributions-n5CdvwA9-CuIvRgJp.mjs.map → contract-contributions-n5CdvwA9-BgUoiuTT.mjs.map} +1 -1
  20. package/dist/{contract-free-DmNEp1_Y.mjs → contract-free-DiRem1nw.mjs} +3 -3
  21. package/dist/{contract-free-DmNEp1_Y.mjs.map → contract-free-DiRem1nw.mjs.map} +1 -1
  22. package/dist/{control-policy-CR-lrrd1-CESfQKqn.mjs → control-policy-DKnVhEWD-xuJIvCy9.mjs} +9 -9
  23. package/dist/{control-policy-CR-lrrd1-CESfQKqn.mjs.map → control-policy-DKnVhEWD-xuJIvCy9.mjs.map} +1 -1
  24. package/dist/{data-type-entries-dmLDRSOf-BJADXpXD.mjs → data-type-entries-CVxsfjF3-Bd0cSfuG.mjs} +3 -3
  25. package/dist/{data-type-entries-dmLDRSOf-BJADXpXD.mjs.map → data-type-entries-CVxsfjF3-Bd0cSfuG.mjs.map} +1 -1
  26. package/dist/{data-types-B47LbZ3z-DRVqjvQZ.mjs → data-types-DWfwErIu-DF85cgmu.mjs} +4 -4
  27. package/dist/{data-types-B47LbZ3z-DRVqjvQZ.mjs.map → data-types-DWfwErIu-DF85cgmu.mjs.map} +1 -1
  28. package/dist/{date-time-now-generators-BMMGy0vy-BEbt_79F.mjs → date-time-now-generators-BORO1_nc-BdCe3ppq.mjs} +4 -4
  29. package/dist/{date-time-now-generators-BMMGy0vy-BEbt_79F.mjs.map → date-time-now-generators-BORO1_nc-BdCe3ppq.mjs.map} +1 -1
  30. package/dist/{ddl-qu-IzeH4-CFpSpY0X.mjs → ddl-DCQLfg18-BgWGYC7L.mjs} +3 -3
  31. package/dist/{ddl-qu-IzeH4-CFpSpY0X.mjs.map → ddl-DCQLfg18-BgWGYC7L.mjs.map} +1 -1
  32. package/dist/{descriptor-meta-CKsHlt_c-UQ14enZp.mjs → descriptor-meta-CKsHlt_c-DkP2ZqQd.mjs} +3 -3
  33. package/dist/{descriptor-meta-CKsHlt_c-UQ14enZp.mjs.map → descriptor-meta-CKsHlt_c-DkP2ZqQd.mjs.map} +1 -1
  34. package/dist/{descriptor-meta-DWKp5Q1s-DplRJE9N.mjs → descriptor-meta-xBYwG7xG-DWAZTiD5.mjs} +11 -11
  35. package/dist/{descriptor-meta-DWKp5Q1s-DplRJE9N.mjs.map → descriptor-meta-xBYwG7xG-DWAZTiD5.mjs.map} +1 -1
  36. package/dist/{diff-database-schema-CX_XzsE0-BwaMw0Gq.mjs → diff-database-schema-J96mtg_F-BHpzbMoj.mjs} +9 -9
  37. package/dist/{diff-database-schema-CX_XzsE0-BwaMw0Gq.mjs.map → diff-database-schema-J96mtg_F-BHpzbMoj.mjs.map} +1 -1
  38. package/dist/{errors-DpdPXR_L-DailcY-X.mjs → errors-C4-Dp3gI-B5jY5eJj.mjs} +4 -4
  39. package/dist/errors-C4-Dp3gI-B5jY5eJj.mjs.map +1 -0
  40. package/dist/{full-text-B9mXDcsJ.mjs → full-text-DGFJd1R3.mjs} +3 -3
  41. package/dist/{full-text-B9mXDcsJ.mjs.map → full-text-DGFJd1R3.mjs.map} +1 -1
  42. package/dist/{full-text-index-definition-MfjtL-x7-ImaTAFMs.mjs → full-text-index-definition-DzRCaPjb-0USKN1ZI.mjs} +3 -3
  43. package/dist/{full-text-index-definition-MfjtL-x7-ImaTAFMs.mjs.map → full-text-index-definition-DzRCaPjb-0USKN1ZI.mjs.map} +1 -1
  44. package/dist/{full-text-parsers-DIfNR9AQ-tVmTju-Y.mjs → full-text-parsers-D-2uupNS-6woSZ16T.mjs} +4 -4
  45. package/dist/{full-text-parsers-DIfNR9AQ-tVmTju-Y.mjs.map → full-text-parsers-D-2uupNS-6woSZ16T.mjs.map} +1 -1
  46. package/dist/{full-text-search-document-Ceg9d2K0-DJ4MklAU.mjs → full-text-search-document-BqqvjJoC-HaoeMaM5.mjs} +5 -5
  47. package/dist/{full-text-search-document-Ceg9d2K0-DJ4MklAU.mjs.map → full-text-search-document-BqqvjJoC-HaoeMaM5.mjs.map} +1 -1
  48. package/dist/{index-types-B5sQ5Vw0-DfXKO9-v.mjs → index-types-DGrgbAd4-DuGWdvol.mjs} +3 -3
  49. package/dist/{index-types-B5sQ5Vw0-DfXKO9-v.mjs.map → index-types-DGrgbAd4-DuGWdvol.mjs.map} +1 -1
  50. package/dist/{infer-psl-contract-DR0Uie7w-CkaPSdPc.mjs → infer-psl-contract-CAoJuV8y-Da9y8zwV.mjs} +8 -8
  51. package/dist/{infer-psl-contract-DR0Uie7w-CkaPSdPc.mjs.map → infer-psl-contract-CAoJuV8y-Da9y8zwV.mjs.map} +1 -1
  52. package/dist/migration-Be_iuIpn.mjs.map +1 -1
  53. package/dist/{native-type-normalizer-DEN9YgA5.mjs → native-type-normalizer-PGvExTgu.mjs} +2 -2
  54. package/dist/{native-type-normalizer-DEN9YgA5.mjs.map → native-type-normalizer-PGvExTgu.mjs.map} +1 -1
  55. package/dist/{op-factory-call-DlZ_wHv_-Dh_yijWZ.mjs → op-factory-call-THEIwT0J-DQM3Y94S.mjs} +8 -8
  56. package/dist/{op-factory-call-DlZ_wHv_-Dh_yijWZ.mjs.map → op-factory-call-THEIwT0J-DQM3Y94S.mjs.map} +1 -1
  57. package/dist/{planner-BO6cvHnU-DtlizdVY.mjs → planner-BlY3pVTF-B-yPNIGN.mjs} +10 -10
  58. package/dist/{planner-BO6cvHnU-DtlizdVY.mjs.map → planner-BlY3pVTF-B-yPNIGN.mjs.map} +1 -1
  59. package/dist/{planner-ddl-builders-B1gra_GO-gl5gnaqr.mjs → planner-ddl-builders-Ds3Xcsg7-5-bR7xgo.mjs} +3 -3
  60. package/dist/{planner-ddl-builders-B1gra_GO-gl5gnaqr.mjs.map → planner-ddl-builders-Ds3Xcsg7-5-bR7xgo.mjs.map} +1 -1
  61. package/dist/{planner-identity-values-CAnifzzT-D1ncWy3d.mjs → planner-identity-values-CQZbvcx0-BpAvjtip.mjs} +3 -3
  62. package/dist/{planner-identity-values-CAnifzzT-D1ncWy3d.mjs.map → planner-identity-values-CQZbvcx0-BpAvjtip.mjs.map} +1 -1
  63. package/dist/{planner-produced-postgres-migration-BA0ACEpG-Bu613xfQ.mjs → planner-produced-postgres-migration-CorJVpul-dA0T7JYO.mjs} +4 -4
  64. package/dist/{planner-produced-postgres-migration-BA0ACEpG-Bu613xfQ.mjs.map → planner-produced-postgres-migration-CorJVpul-dA0T7JYO.mjs.map} +1 -1
  65. package/dist/{planner-sql-checks-RKQqd_b5-CesTHuGH.mjs → planner-sql-checks-BOdYkh9L-hXxekxJX.mjs} +5 -5
  66. package/dist/{planner-sql-checks-RKQqd_b5-CesTHuGH.mjs.map → planner-sql-checks-BOdYkh9L-hXxekxJX.mjs.map} +1 -1
  67. package/dist/{postgres-codec-traits-DeZiroEE-BACV_wuh.mjs → postgres-codec-traits-D9YEvK6F-BsKaAhCA.mjs} +3 -3
  68. package/dist/{postgres-codec-traits-DeZiroEE-BACV_wuh.mjs.map → postgres-codec-traits-D9YEvK6F-BsKaAhCA.mjs.map} +1 -1
  69. package/dist/{postgres-contract-view-yDfay91x-BBinYMBq.mjs → postgres-contract-view-WtPiaMZp-C-CQAB1E.mjs} +9 -9
  70. package/dist/{postgres-contract-view-yDfay91x-BBinYMBq.mjs.map → postgres-contract-view-WtPiaMZp-C-CQAB1E.mjs.map} +1 -1
  71. package/dist/{postgres-migration-BPr4WRWw-CN_b66o1.mjs → postgres-migration-BuxK0qNO-BgQHf6H6.mjs} +11 -11
  72. package/dist/{postgres-migration-BPr4WRWw-CN_b66o1.mjs.map → postgres-migration-BuxK0qNO-BgQHf6H6.mjs.map} +1 -1
  73. package/dist/{postgres-schema-BBWgs4fX-DWdYxNi8.mjs → postgres-schema-zd_p5Lg2-BdJlG7Cg.mjs} +4 -4
  74. package/dist/{postgres-schema-BBWgs4fX-DWdYxNi8.mjs.map → postgres-schema-zd_p5Lg2-BdJlG7Cg.mjs.map} +1 -1
  75. package/dist/{prisma7-binding-BA8iSLxQ.mjs → prisma7-binding-BDJ3kwsK.mjs} +7 -7
  76. package/dist/{prisma7-binding-BA8iSLxQ.mjs.map → prisma7-binding-BDJ3kwsK.mjs.map} +1 -1
  77. package/dist/{registry-Ctq7UGkA-_DnAcgYm.mjs → registry-D4AyYsXr-CgiiMuFS.mjs} +3 -3
  78. package/dist/{registry-Ctq7UGkA-_DnAcgYm.mjs.map → registry-D4AyYsXr-CgiiMuFS.mjs.map} +1 -1
  79. package/dist/{render-ops-B0ZfUiTN-BdoDg9mi.mjs → render-ops-B5Mh0MpJ-Dc_dH1Sk.mjs} +4 -4
  80. package/dist/{render-ops-B0ZfUiTN-BdoDg9mi.mjs.map → render-ops-B5Mh0MpJ-Dc_dH1Sk.mjs.map} +1 -1
  81. package/dist/{resolve-ddl-schema-DwoTc0nu-CvyB2Tfu.mjs → resolve-ddl-schema-ChjIoY0I-D7TWkRXc.mjs} +3 -3
  82. package/dist/{resolve-ddl-schema-DwoTc0nu-CvyB2Tfu.mjs.map → resolve-ddl-schema-ChjIoY0I-D7TWkRXc.mjs.map} +1 -1
  83. package/dist/{sql-renderer-D6fBWtjL-D1QcI-Cf.mjs → sql-renderer-D6fBWtjL-BOe5jc4e.mjs} +3 -3
  84. package/dist/{sql-renderer-D6fBWtjL-D1QcI-Cf.mjs.map → sql-renderer-D6fBWtjL-BOe5jc4e.mjs.map} +1 -1
  85. package/dist/{sql-utils-VXrIh8dJ-DVxo_Ygp.mjs → sql-utils-CRPhDLp1-wbgQW5TM.mjs} +3 -3
  86. package/dist/{sql-utils-VXrIh8dJ-DVxo_Ygp.mjs.map → sql-utils-CRPhDLp1-wbgQW5TM.mjs.map} +1 -1
  87. package/dist/target.mjs +32 -32
  88. package/dist/target__codecs.mjs +3 -3
  89. package/dist/target__contract-free.mjs +3 -3
  90. package/dist/target__control.mjs +16 -16
  91. package/dist/target__control.mjs.map +1 -1
  92. package/dist/target__data-types.mjs +2 -2
  93. package/dist/target__diff-database-schema.mjs +1 -1
  94. package/dist/target__errors.mjs +1 -1
  95. package/dist/target__full-text-index-authoring.mjs +2 -2
  96. package/dist/target__full-text.mjs +2 -2
  97. package/dist/target__issue-planner.mjs +1 -1
  98. package/dist/target__migration.mjs +1 -1
  99. package/dist/target__native-type-normalizer.mjs +1 -1
  100. package/dist/target__op-factory-call.mjs +1 -1
  101. package/dist/target__pack.mjs +1 -1
  102. package/dist/target__planner-ddl-builders.mjs +1 -1
  103. package/dist/target__planner-identity-values.mjs +1 -1
  104. package/dist/target__planner-produced-postgres-migration.mjs +1 -1
  105. package/dist/target__planner-sql-checks.mjs +1 -1
  106. package/dist/target__planner.mjs +2 -2
  107. package/dist/target__prisma7-binding.mjs +1 -1
  108. package/dist/target__render-ops.mjs +1 -1
  109. package/dist/target__runtime.mjs +7 -7
  110. package/dist/target__runtime.mjs.map +1 -1
  111. package/dist/target__schema-ir-annotations.mjs +1 -1
  112. package/dist/target__sql-utils.mjs +3 -3
  113. package/dist/target__types.mjs +2 -2
  114. package/package.json +10 -10
  115. package/dist/errors-DpdPXR_L-DailcY-X.mjs.map +0 -1
@@ -1,6 +1,6 @@
1
- import { u as postgresError } from "./errors-DpdPXR_L-DailcY-X.mjs";
1
+ import { u as postgresError } from "./errors-C4-Dp3gI-B5jY5eJj.mjs";
2
2
  import { utf8ByteLength } from "@prisma/orm-framework/utils/text";
3
- //#region ../../../3-targets/postgres/1-target/dist/sql-utils-VXrIh8dJ.mjs
3
+ //#region ../../../3-targets/postgres/1-target/dist/sql-utils-CRPhDLp1.mjs
4
4
  /**
5
5
  * Shared SQL utility functions for the Postgres target.
6
6
  *
@@ -140,4 +140,4 @@ function inlineLiteral(value, typeText) {
140
140
  //#endregion
141
141
  export { quoteIdentifier as a, qualifyName as i, escapeLiteral as n, quoteQualifiedName as o, inlineLiteral as r, validateEnumValueLength as s, POSTGRES_QUOTING as t };
142
142
 
143
- //# sourceMappingURL=sql-utils-VXrIh8dJ-DVxo_Ygp.mjs.map
143
+ //# sourceMappingURL=sql-utils-CRPhDLp1-wbgQW5TM.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"sql-utils-VXrIh8dJ-DVxo_Ygp.mjs","names":[],"sources":["../../../../3-targets/postgres/1-target/dist/sql-utils-VXrIh8dJ.mjs"],"sourcesContent":["import { u as postgresError } from \"./errors-DpdPXR_L.mjs\";\nimport { utf8ByteLength } from \"@internal/utils/text\";\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;\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 && utf8ByteLength(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 (utf8ByteLength(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/** The quotes this target's SQL knows, for the check of SQL a migration writes into a statement. */\nconst POSTGRES_QUOTING = [\n\t{\n\t\topen: \"E'\",\n\t\tclose: \"'\",\n\t\tdoubledCloseEscapes: true,\n\t\tbackslashEscapes: true\n\t},\n\t{\n\t\topen: \"'\",\n\t\tclose: \"'\",\n\t\tdoubledCloseEscapes: true,\n\t\tbackslashEscapes: false\n\t},\n\t{\n\t\topen: \"\\\"\",\n\t\tclose: \"\\\"\",\n\t\tdoubledCloseEscapes: true,\n\t\tbackslashEscapes: false\n\t}\n];\nfunction isTextLikeTypeText(typeText) {\n\treturn typeText === \"text\" || typeText === \"varchar\" || typeText.startsWith(\"varchar(\") || typeText === \"character varying\" || typeText.startsWith(\"character varying(\") || typeText === \"char\" || typeText.startsWith(\"char(\") || typeText === \"character\" || typeText.startsWith(\"character(\");\n}\nfunction literalNeedsCast(value, typeText) {\n\tif (typeof value === \"number\") return !Number.isFinite(value);\n\tif (typeof value === \"string\") return !isTextLikeTypeText(typeText);\n\treturn typeof value === \"object\" && value !== null;\n}\n/** A value's literal without a cast: SQL NULL, a bare number or boolean, or quoted text. */\nfunction literalText(value) {\n\tif (value === null) return \"NULL\";\n\tif (typeof value === \"boolean\") return value ? \"true\" : \"false\";\n\tif (typeof value === \"number\") return Number.isFinite(value) ? String(value) : `'${String(value)}'`;\n\tif (typeof value === \"bigint\") return String(value);\n\tif (typeof value === \"string\") return `'${escapeLiteral(value)}'`;\n\tif (value instanceof Uint8Array) return `'\\\\x${Array.from(value).map((b) => b.toString(16).padStart(2, \"0\")).join(\"\")}'`;\n\tif (typeof value === \"object\") return `'${escapeLiteral(JSON.stringify(value))}'`;\n\tthrow postgresError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `pgRenderDdlExecuteRequest: unexpected wire type \"${typeof value}\"`, { meta: { wireType: typeof value } });\n}\n/**\n* A value as DDL writes it for a column of `typeText`: `ARRAY[...]` of each element's literal, cast to the list type, for a list written to a list type, and otherwise the value's literal, cast to the column type where PostgreSQL would read it as another type. `value` is what the driver exchanges for the column, with a `Date` already written as text.\n*/\nfunction inlineLiteral(value, typeText) {\n\tif (Array.isArray(value) && typeText.endsWith(\"[]\")) {\n\t\tif (value.length === 0) return \"'{}'\";\n\t\treturn `ARRAY[${value.map(literalText).join(\", \")}]::${typeText}`;\n\t}\n\tconst text = literalText(value);\n\treturn literalNeedsCast(value, typeText) ? `${text}::${typeText}` : text;\n}\n//#endregion\nexport { quoteIdentifier as a, qualifyName as i, escapeLiteral as n, quoteQualifiedName as o, inlineLiteral as r, validateEnumValueLength as s, POSTGRES_QUOTING as t };\n\n//# sourceMappingURL=sql-utils-VXrIh8dJ.mjs.map"],"mappings":"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"}
1
+ {"version":3,"file":"sql-utils-CRPhDLp1-wbgQW5TM.mjs","names":[],"sources":["../../../../3-targets/postgres/1-target/dist/sql-utils-CRPhDLp1.mjs"],"sourcesContent":["import { u as postgresError } from \"./errors-C4-Dp3gI.mjs\";\nimport { utf8ByteLength } from \"@internal/utils/text\";\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;\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 && utf8ByteLength(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 (utf8ByteLength(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/** The quotes this target's SQL knows, for the check of SQL a migration writes into a statement. */\nconst POSTGRES_QUOTING = [\n\t{\n\t\topen: \"E'\",\n\t\tclose: \"'\",\n\t\tdoubledCloseEscapes: true,\n\t\tbackslashEscapes: true\n\t},\n\t{\n\t\topen: \"'\",\n\t\tclose: \"'\",\n\t\tdoubledCloseEscapes: true,\n\t\tbackslashEscapes: false\n\t},\n\t{\n\t\topen: \"\\\"\",\n\t\tclose: \"\\\"\",\n\t\tdoubledCloseEscapes: true,\n\t\tbackslashEscapes: false\n\t}\n];\nfunction isTextLikeTypeText(typeText) {\n\treturn typeText === \"text\" || typeText === \"varchar\" || typeText.startsWith(\"varchar(\") || typeText === \"character varying\" || typeText.startsWith(\"character varying(\") || typeText === \"char\" || typeText.startsWith(\"char(\") || typeText === \"character\" || typeText.startsWith(\"character(\");\n}\nfunction literalNeedsCast(value, typeText) {\n\tif (typeof value === \"number\") return !Number.isFinite(value);\n\tif (typeof value === \"string\") return !isTextLikeTypeText(typeText);\n\treturn typeof value === \"object\" && value !== null;\n}\n/** A value's literal without a cast: SQL NULL, a bare number or boolean, or quoted text. */\nfunction literalText(value) {\n\tif (value === null) return \"NULL\";\n\tif (typeof value === \"boolean\") return value ? \"true\" : \"false\";\n\tif (typeof value === \"number\") return Number.isFinite(value) ? String(value) : `'${String(value)}'`;\n\tif (typeof value === \"bigint\") return String(value);\n\tif (typeof value === \"string\") return `'${escapeLiteral(value)}'`;\n\tif (value instanceof Uint8Array) return `'\\\\x${Array.from(value).map((b) => b.toString(16).padStart(2, \"0\")).join(\"\")}'`;\n\tif (typeof value === \"object\") return `'${escapeLiteral(JSON.stringify(value))}'`;\n\tthrow postgresError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `pgRenderDdlExecuteRequest: unexpected wire type \"${typeof value}\"`, { meta: { wireType: typeof value } });\n}\n/**\n* A value as DDL writes it for a column of `typeText`: `ARRAY[...]` of each element's literal, cast to the list type, for a list written to a list type, and otherwise the value's literal, cast to the column type where PostgreSQL would read it as another type. `value` is what the driver exchanges for the column, with a `Date` already written as text.\n*/\nfunction inlineLiteral(value, typeText) {\n\tif (Array.isArray(value) && typeText.endsWith(\"[]\")) {\n\t\tif (value.length === 0) return \"'{}'\";\n\t\treturn `ARRAY[${value.map(literalText).join(\", \")}]::${typeText}`;\n\t}\n\tconst text = literalText(value);\n\treturn literalNeedsCast(value, typeText) ? `${text}::${typeText}` : text;\n}\n//#endregion\nexport { quoteIdentifier as a, qualifyName as i, escapeLiteral as n, quoteQualifiedName as o, inlineLiteral as r, validateEnumValueLength as s, POSTGRES_QUOTING as t };\n\n//# sourceMappingURL=sql-utils-CRPhDLp1.mjs.map"],"mappings":"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"}
package/dist/target.mjs CHANGED
@@ -1,47 +1,47 @@
1
1
  import { A as PG_TIMESTAMP_INSTANT_CODEC_ID, B as PG_VARCHAR_CODEC_ID, C as PG_OID_CODEC_ID, D as PG_TIMESTAMPTZ_STRING_CODEC_ID, E as PG_TIMESTAMPTZ_DATE_CODEC_ID, F as PG_TIME_TEMPORAL_CODEC_ID, G as SQL_RAW_CODEC_ID, H as SQL_CHAR_CODEC_ID, I as PG_TSQUERY_CODEC_ID, K as SQL_TEXT_CODEC_ID, L as PG_UNBOUNDED_INT_CODEC_ID, M as PG_TIMESTAMP_TEMPORAL_CODEC_ID, N as PG_TIMETZ_CODEC_ID, O as PG_TIMESTAMPTZ_TEMPORAL_CODEC_ID, P as PG_TIME_STRING_CODEC_ID, R as PG_UUID_CODEC_ID, S as PG_NUMERIC_CODEC_ID, T as PG_TEXT_CODEC_ID, U as SQL_FLOAT_CODEC_ID, V as PG_XML_CODEC_ID, W as SQL_INT_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_TIMESTAMP_STRING_CODEC_ID, k as PG_TIMESTAMP_DATE_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, q as SQL_VARCHAR_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_TEXT_ARRAY_CODEC_ID, x as PG_MONEY_CODEC_ID, y as PG_JSONB_CODEC_ID, z as PG_VARBIT_CODEC_ID } from "./codec-ids-2htdtS66-CJPMZv1t.mjs";
2
2
  import { t as postgresAggregateDescriptors } from "./aggregates-BNste-08.mjs";
3
3
  import { a as postgresCodec, i as isPostgresCodecDescriptor, n as buildPostgresCodecDescriptorRegistry, r as definePostgresCodecs, t as PostgresCodecDescriptor } from "./codec-descriptor-DBeD0UlS-BfvrE-KZ.mjs";
4
- import { r as errorPostgresMigrationStackMissing, u as postgresError } from "./errors-DpdPXR_L-DailcY-X.mjs";
5
- import { a as quoteIdentifier, i as qualifyName, n as escapeLiteral, o as quoteQualifiedName, r as inlineLiteral, s as validateEnumValueLength } from "./sql-utils-VXrIh8dJ-DVxo_Ygp.mjs";
6
- import { $ as pgXml, A as pgJson, B as pgTextArray, C as pgFloat8, D as pgInt8, E as pgInt4, F as pgNumeric, G as pgTimestamptz, H as pgTimeStoredText, I as pgNumericParams, J as pgTimetzStoredText, K as pgTimestamptzStoredText, L as pgOid, M as pgJsonbEnumRefusal, N as pgMoney, O as pgInterval, P as pgMoneyStoredText, Q as pgVarchar, R as pgPrecisionParams, S as pgFloat4, T as pgInt2, U as pgTimestamp, V as pgTime, W as pgTimestampStoredText, X as pgUuid, Y as pgTsquery, Z as pgVarbit, _ as pgCharacterLengthParams, b as pgEnum, d as pgBitLengthParams, et as postgresDataTypes, f as pgBool, g as pgChar, it as qualifiedEnumName, j as pgJsonb, l as moneyTextOfCents, nt as postgresTextDataTypes, o as isPgOid, p as pgBytea, q as pgTimetz, r as createPostgresBuiltinDataTypeLookup, u as pgBit, v as pgDate, w as pgInet, x as pgEnumParams, y as pgDateStoredText, z as pgText } from "./data-types-B47LbZ3z-DRVqjvQZ.mjs";
4
+ import { r as errorPostgresMigrationStackMissing, u as postgresError } from "./errors-C4-Dp3gI-B5jY5eJj.mjs";
5
+ import { a as quoteIdentifier, i as qualifyName, n as escapeLiteral, o as quoteQualifiedName, r as inlineLiteral, s as validateEnumValueLength } from "./sql-utils-CRPhDLp1-wbgQW5TM.mjs";
6
+ import { $ as pgXml, A as pgJson, B as pgTextArray, C as pgFloat8, D as pgInt8, E as pgInt4, F as pgNumeric, G as pgTimestamptz, H as pgTimeStoredText, I as pgNumericParams, J as pgTimetzStoredText, K as pgTimestamptzStoredText, L as pgOid, M as pgJsonbEnumRefusal, N as pgMoney, O as pgInterval, P as pgMoneyStoredText, Q as pgVarchar, R as pgPrecisionParams, S as pgFloat4, T as pgInt2, U as pgTimestamp, V as pgTime, W as pgTimestampStoredText, X as pgUuid, Y as pgTsquery, Z as pgVarbit, _ as pgCharacterLengthParams, b as pgEnum, d as pgBitLengthParams, et as postgresDataTypes, f as pgBool, g as pgChar, it as qualifiedEnumName, j as pgJsonb, l as moneyTextOfCents, nt as postgresTextDataTypes, o as isPgOid, p as pgBytea, q as pgTimetz, r as createPostgresBuiltinDataTypeLookup, u as pgBit, v as pgDate, w as pgInet, x as pgEnumParams, y as pgDateStoredText, z as pgText } from "./data-types-DWfwErIu-DF85cgmu.mjs";
7
7
  import { t as PostgresNativeEnum } from "./postgres-native-enum-CdP3b_-R-DgG3pi5p.mjs";
8
- import { A as pgNumericColumn, B as pgVarbitColumn, C as pgIntColumn, D as pgJsonColumn, E as pgIntervalStringDescriptor, F as pgTimestamptzDateColumn, H as pgXmlColumn, I as pgTimestamptzDateDescriptor, L as pgTimetzColumn, M as pgTextColumn, N as pgTimestampDateColumn, O as pgJsonbColumn, P as pgTimestampDateDescriptor, R as pgUnboundedIntColumn, S as pgInt8NumberColumn, T as pgIntervalStringColumn, V as pgVarcharColumn, _ as pgFloatColumn, a as PgTimestamptzDateCodec, b as pgInt4Column, c as decodePostgresListText, d as pgBitColumn, f as pgBoolColumn, g as pgFloat8Column, h as pgFloat4Column, i as PgTimestampDateDescriptor, j as pgOidColumn, k as pgMoneyColumn, l as isPgEnumParams, m as pgEnumDescriptor, n as PgIntervalStringDescriptor, o as PgTimestamptzDateDescriptor, p as pgCharColumn, r as PgTimestampDateCodec, t as PgIntervalStringCodec, u as parsePostgresListText, v as pgInetColumn, w as pgIntervalColumn, x as pgInt8Column, y as pgInt2Column, z as pgUuidColumn } from "./codecs-CV-_K-z0-DZc60ccR.mjs";
9
- import { n as postgresCodecRegistry, t as postgresCodecDescriptorRegistry } from "./registry-Ctq7UGkA-_DnAcgYm.mjs";
10
- import { i as createPostgresCodecRegistryWithBuiltins, n as assemblePostgresCodecRegistryWithBuiltins, r as createPostgresBuiltinCodecLookup, t as assemblePostgresCodecRegistry } from "./codec-registry-7LHPD8C1-BALCyEB-.mjs";
11
- import { f as weightGroupsOf, l as fullTextIndexProblems, n as FULL_TEXT_INDEX_TYPE, o as describeFullTextIndexProblem, t as DEFAULT_FULL_TEXT_SEARCH_LANGUAGE } from "./full-text-index-definition-MfjtL-x7-ImaTAFMs.mjs";
12
- import { _ as policyInputFromSerialized, c as PostgresRole, d as PostgresTableSource, f as PostgresUnboundSchema, i as PostgresRlsEnablement, m as isPostgresSchema, o as PostgresRlsPolicy, t as PostgresExtension, u as PostgresSchema, v as postgresCreateNamespace } from "./postgres-schema-BBWgs4fX-DWdYxNi8.mjs";
8
+ import { A as pgNumericColumn, B as pgVarbitColumn, C as pgIntColumn, D as pgJsonColumn, E as pgIntervalStringDescriptor, F as pgTimestamptzDateColumn, H as pgXmlColumn, I as pgTimestamptzDateDescriptor, L as pgTimetzColumn, M as pgTextColumn, N as pgTimestampDateColumn, O as pgJsonbColumn, P as pgTimestampDateDescriptor, R as pgUnboundedIntColumn, S as pgInt8NumberColumn, T as pgIntervalStringColumn, V as pgVarcharColumn, _ as pgFloatColumn, a as PgTimestamptzDateCodec, b as pgInt4Column, c as decodePostgresListText, d as pgBitColumn, f as pgBoolColumn, g as pgFloat8Column, h as pgFloat4Column, i as PgTimestampDateDescriptor, j as pgOidColumn, k as pgMoneyColumn, l as isPgEnumParams, m as pgEnumDescriptor, n as PgIntervalStringDescriptor, o as PgTimestamptzDateDescriptor, p as pgCharColumn, r as PgTimestampDateCodec, t as PgIntervalStringCodec, u as parsePostgresListText, v as pgInetColumn, w as pgIntervalColumn, x as pgInt8Column, y as pgInt2Column, z as pgUuidColumn } from "./codecs-Bzj3M0Q3-C2oFSIGs.mjs";
9
+ import { n as postgresCodecRegistry, t as postgresCodecDescriptorRegistry } from "./registry-D4AyYsXr-CgiiMuFS.mjs";
10
+ import { i as createPostgresCodecRegistryWithBuiltins, n as assemblePostgresCodecRegistryWithBuiltins, r as createPostgresBuiltinCodecLookup, t as assemblePostgresCodecRegistry } from "./codec-registry-B0LsFn7Z-ej9yKwTq.mjs";
11
+ import { f as weightGroupsOf, l as fullTextIndexProblems, n as FULL_TEXT_INDEX_TYPE, o as describeFullTextIndexProblem, t as DEFAULT_FULL_TEXT_SEARCH_LANGUAGE } from "./full-text-index-definition-DzRCaPjb-0USKN1ZI.mjs";
12
+ import { _ as policyInputFromSerialized, c as PostgresRole, d as PostgresTableSource, f as PostgresUnboundSchema, i as PostgresRlsEnablement, m as isPostgresSchema, o as PostgresRlsPolicy, t as PostgresExtension, u as PostgresSchema, v as postgresCreateNamespace } from "./postgres-schema-zd_p5Lg2-BdJlG7Cg.mjs";
13
13
  import { _ as PostgresDropIndex, a as PostgresAlterIndexRename, b as PostgresDropType, c as PostgresAlterTable, d as PostgresCreatePolicy, f as PostgresCreateSchema, g as PostgresDisableRowLevelSecurity, h as PostgresDdlNode, i as DropDefaultAction, l as PostgresAlterTableSetSchema, m as PostgresCreateType, n as AddConstraintAction, o as PostgresAlterPolicyRename, p as PostgresCreateTable, r as AlterColumnTypeAction, s as PostgresAlterSchemaRename, t as AddColumnAction, u as PostgresCreateIndex, v as PostgresDropPolicy, y as PostgresDropSchema } from "./nodes-G8VTh4PM-DNvIhHag.mjs";
14
- import { A as extensionInSchemaAst, F as noNullValuesAst, G as tableIsEmptyAst, H as sequenceNameAvailableAst, K as tablePrimaryKeyAst, L as rlsEnabledAst, M as indexExistsAst, W as tableExistsAst, _ as constraintExistsAst, b as createSchema, d as columnExistsAst, f as columnNullabilityAst, k as extensionExistsAst, l as columnDefaultAst, m as columnTypeAst, n as addConstraintAction, q as toRegclass, r as alterColumnTypeAction, s as alterTable, t as addColumnAction, u as columnDefaultSequenceAst, w as dropDefaultAction, x as createTable, z as rlsPolicyExistsAst } from "./ddl-qu-IzeH4-CFpSpY0X.mjs";
15
- 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-DmNEp1_Y.mjs";
14
+ import { A as extensionInSchemaAst, F as noNullValuesAst, G as tableIsEmptyAst, H as sequenceNameAvailableAst, K as tablePrimaryKeyAst, L as rlsEnabledAst, M as indexExistsAst, W as tableExistsAst, _ as constraintExistsAst, b as createSchema, d as columnExistsAst, f as columnNullabilityAst, k as extensionExistsAst, l as columnDefaultAst, m as columnTypeAst, n as addConstraintAction, q as toRegclass, r as alterColumnTypeAction, s as alterTable, t as addColumnAction, u as columnDefaultSequenceAst, w as dropDefaultAction, x as createTable, z as rlsPolicyExistsAst } from "./ddl-DCQLfg18-BgWGYC7L.mjs";
15
+ 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-DiRem1nw.mjs";
16
16
  import { i as policyRoleList, n as POLICY_OPERATION_PREDICATES, r as computeContentHash, t as POLICY_COMMAND_SQL } from "./canonicalize-RdxoUHao-FTTkizfe.mjs";
17
- import { t as postgresCodecTraitsOf } from "./postgres-codec-traits-DeZiroEE-BACV_wuh.mjs";
18
- import { c as postgresScalarTypes, o as postgresExplicitTypes } from "./authoring-BD4uEpBM-DIJiGq4e.mjs";
19
- import { t as postgresRenderCheckExpressions } from "./check-expressions-DL9WtMO5-CUcbN2JG.mjs";
20
- import { a as postgresNowGenerators, i as postgresNowGeneratorControlDescriptors } from "./date-time-now-generators-BMMGy0vy-BEbt_79F.mjs";
21
- import { t as postgresDataTypeEntries } from "./data-type-entries-dmLDRSOf-BJADXpXD.mjs";
17
+ import { t as postgresCodecTraitsOf } from "./postgres-codec-traits-D9YEvK6F-BsKaAhCA.mjs";
18
+ import { c as postgresScalarTypes, o as postgresExplicitTypes } from "./authoring-BbS0bin5-U9tXyzS6.mjs";
19
+ import { t as postgresRenderCheckExpressions } from "./check-expressions-Ch-A_NJN-BscDa8xT.mjs";
20
+ import { a as postgresNowGenerators, i as postgresNowGeneratorControlDescriptors } from "./date-time-now-generators-BORO1_nc-BdCe3ppq.mjs";
21
+ import { t as postgresDataTypeEntries } from "./data-type-entries-CVxsfjF3-Bd0cSfuG.mjs";
22
22
  import { i as PostgresTableSchemaNode, n as PostgresNativeEnumSchemaNode, r as PostgresSchemaNodeKind, t as PostgresExtensionSchemaNode } from "./postgres-table-schema-node-OQRI_GIM-DhOVxH8-.mjs";
23
23
  import { i as PostgresRoleSchemaNode, n as PostgresNamespaceSchemaNode, r as PostgresPolicySchemaNode, t as PostgresDatabaseSchemaNode } from "./postgres-role-schema-node-yFPLQ6U0-ZCPXs-lG.mjs";
24
24
  import { n as readPostgresDefault, t as postgresResolveDefault } from "./default-normalizer-BqK6XxdC-2OUb2ybG.mjs";
25
- import { n as renderFullTextIndexDocument } from "./full-text-search-document-Ceg9d2K0-DJ4MklAU.mjs";
26
- import { r as resolveDdlSchemaForNamespaceStorage } from "./resolve-ddl-schema-DwoTc0nu-CvyB2Tfu.mjs";
27
- import { a as stackDataTypes, i as qualifyTableName, t as alterTypeCheck } from "./planner-sql-checks-RKQqd_b5-CesTHuGH.mjs";
28
- import { A as EnableRowLevelSecurityCall, B as RenameStoredKeyCall, C as DropExtensionCall, D as DropPostgresRlsPolicyCall, E as DropNotNullCall, F as RenameColumnCall, G as SetExtensionSchemaCall, H as ReplaceStoredValueCall, I as RenameConstraintCall, K as SetNotNullCall, L as RenameIndexCall, M as RawSqlCall, N as RemoveStoredKeyCall, O as DropSchemaCall, P as RemoveStoredValueCall, R as RenamePostgresRlsPolicyCall, S as DropDefaultCall, T as DropNativeEnumTypeCall, V as RenameTableCall, W as SetDefaultCall, _ as DeleteRowsCall, a as AddNativeEnumValueCall, b as DropColumnCall, c as AddUniqueCall, d as CreateIndexCall, f as CreateNativeEnumTypeCall, g as DataTransformCall, h as CreateTableCall, i as AddForeignKeyCall, j as FillStoredKeyCall, k as DropTableCall, l as AlterColumnTypeCall, m as CreateSchemaCall, n as AddColumnCall, o as AddPrimaryKeyCall, p as CreatePostgresRlsPolicyCall, q as SetTableSchemaCall, r as AddColumnWithTemporaryDefaultCall, s as AddRequiredColumnToEmptyTableCall, t as AddCheckConstraintCall, u as CreateExtensionCall, v as DisableRowLevelSecurityCall, w as DropIndexCall, x as DropConstraintCall, y as DropCheckConstraintCall, z as RenameSchemaCall } from "./op-factory-call-DlZ_wHv_-Dh_yijWZ.mjs";
29
- import { t as buildColumnTypeSql } from "./planner-ddl-builders-B1gra_GO-gl5gnaqr.mjs";
30
- import { n as resolveIdentityValue, t as buildBuiltinIdentityValue } from "./planner-identity-values-CAnifzzT-D1ncWy3d.mjs";
31
- import { a as planIssues, t as coalesceSubtreeIssues } from "./control-policy-CR-lrrd1-CESfQKqn.mjs";
32
- import { n as contractToPostgresDatabaseSchemaNode, t as buildPostgresPlanDiff } from "./diff-database-schema-CX_XzsE0-BwaMw0Gq.mjs";
33
- import { n as PostgresContractView, t as PostgresContractSerializer } from "./postgres-contract-view-yDfay91x-BBinYMBq.mjs";
25
+ import { n as renderFullTextIndexDocument } from "./full-text-search-document-BqqvjJoC-HaoeMaM5.mjs";
26
+ import { r as resolveDdlSchemaForNamespaceStorage } from "./resolve-ddl-schema-ChjIoY0I-D7TWkRXc.mjs";
27
+ import { a as stackDataTypes, i as qualifyTableName, t as alterTypeCheck } from "./planner-sql-checks-BOdYkh9L-hXxekxJX.mjs";
28
+ import { A as EnableRowLevelSecurityCall, B as RenameStoredKeyCall, C as DropExtensionCall, D as DropPostgresRlsPolicyCall, E as DropNotNullCall, F as RenameColumnCall, G as SetExtensionSchemaCall, H as ReplaceStoredValueCall, I as RenameConstraintCall, K as SetNotNullCall, L as RenameIndexCall, M as RawSqlCall, N as RemoveStoredKeyCall, O as DropSchemaCall, P as RemoveStoredValueCall, R as RenamePostgresRlsPolicyCall, S as DropDefaultCall, T as DropNativeEnumTypeCall, V as RenameTableCall, W as SetDefaultCall, _ as DeleteRowsCall, a as AddNativeEnumValueCall, b as DropColumnCall, c as AddUniqueCall, d as CreateIndexCall, f as CreateNativeEnumTypeCall, g as DataTransformCall, h as CreateTableCall, i as AddForeignKeyCall, j as FillStoredKeyCall, k as DropTableCall, l as AlterColumnTypeCall, m as CreateSchemaCall, n as AddColumnCall, o as AddPrimaryKeyCall, p as CreatePostgresRlsPolicyCall, q as SetTableSchemaCall, r as AddColumnWithTemporaryDefaultCall, s as AddRequiredColumnToEmptyTableCall, t as AddCheckConstraintCall, u as CreateExtensionCall, v as DisableRowLevelSecurityCall, w as DropIndexCall, x as DropConstraintCall, y as DropCheckConstraintCall, z as RenameSchemaCall } from "./op-factory-call-THEIwT0J-DQM3Y94S.mjs";
29
+ import { t as buildColumnTypeSql } from "./planner-ddl-builders-Ds3Xcsg7-5-bR7xgo.mjs";
30
+ import { n as resolveIdentityValue, t as buildBuiltinIdentityValue } from "./planner-identity-values-CQZbvcx0-BpAvjtip.mjs";
31
+ import { a as planIssues, t as coalesceSubtreeIssues } from "./control-policy-DKnVhEWD-xuJIvCy9.mjs";
32
+ import { n as contractToPostgresDatabaseSchemaNode, t as buildPostgresPlanDiff } from "./diff-database-schema-J96mtg_F-BHpzbMoj.mjs";
33
+ import { n as PostgresContractView, t as PostgresContractSerializer } from "./postgres-contract-view-WtPiaMZp-C-CQAB1E.mjs";
34
34
  import { t as dataTransform } from "./data-transform-h9agBu_c-RlC5A7aY.mjs";
35
- import { t as PostgresMigration } from "./postgres-migration-BPr4WRWw-CN_b66o1.mjs";
36
- import { t as renderOps } from "./render-ops-B0ZfUiTN-BdoDg9mi.mjs";
35
+ import { t as PostgresMigration } from "./postgres-migration-BuxK0qNO-BgQHf6H6.mjs";
36
+ import { t as renderOps } from "./render-ops-B5Mh0MpJ-Dc_dH1Sk.mjs";
37
37
  import { t as renderCallsToTypeScript } from "./render-typescript-Dqp1Spgn-B4mJhuVr.mjs";
38
- import { t as TypeScriptRenderablePostgresMigration } from "./planner-produced-postgres-migration-BA0ACEpG-Bu613xfQ.mjs";
39
- import { t as createPostgresMigrationPlanner } from "./planner-BO6cvHnU-DtlizdVY.mjs";
38
+ import { t as TypeScriptRenderablePostgresMigration } from "./planner-produced-postgres-migration-CorJVpul-dA0T7JYO.mjs";
39
+ import { t as createPostgresMigrationPlanner } from "./planner-BlY3pVTF-B-yPNIGN.mjs";
40
40
  import { n as MARKER_LOCK_SQL, t as MARKER_LOCK_KEY } from "./marker-lock-DFc1Tfv5-BkBKBRE3.mjs";
41
- import { c as toTsquery, l as websearchToTsquery, n as fullTextDocument, o as phrasetoTsquery, s as plaintoTsquery, t as FullTextDocument } from "./full-text-parsers-DIfNR9AQ-tVmTju-Y.mjs";
42
- import { t as tsquery } from "./full-text-B9mXDcsJ.mjs";
41
+ import { c as toTsquery, l as websearchToTsquery, n as fullTextDocument, o as phrasetoTsquery, s as plaintoTsquery, t as FullTextDocument } from "./full-text-parsers-D-2uupNS-6woSZ16T.mjs";
42
+ import { t as tsquery } from "./full-text-DGFJd1R3.mjs";
43
43
  import { a as foreignKey, c as primaryKey, d as unique, i as fn, l as rawSql, n as checkExpression, o as lit, r as col, s as placeholder, t as MigrationCLI, u as sql } from "./migration-Be_iuIpn.mjs";
44
- import { t as introspectedTypeText } from "./native-type-normalizer-DEN9YgA5.mjs";
44
+ import { t as introspectedTypeText } from "./native-type-normalizer-PGvExTgu.mjs";
45
45
  import { i as hasUniqueConstraint, n as hasForeignKey, r as hasIndex, t as buildSchemaLookupMap } from "./planner-schema-lookup-BbUY9oVy.mjs";
46
- import { t as prisma7PostgresBinding } from "./prisma7-binding-BA8iSLxQ.mjs";
46
+ import { t as prisma7PostgresBinding } from "./prisma7-binding-BDJ3kwsK.mjs";
47
47
  export { AddCheckConstraintCall, AddColumnAction, AddColumnCall, AddColumnWithTemporaryDefaultCall, AddConstraintAction, AddForeignKeyCall, AddNativeEnumValueCall, AddPrimaryKeyCall, AddRequiredColumnToEmptyTableCall, AddUniqueCall, AlterColumnTypeAction, AlterColumnTypeCall, CreateExtensionCall, CreateIndexCall, CreateNativeEnumTypeCall, CreatePostgresRlsPolicyCall, CreateSchemaCall, CreateTableCall, DEFAULT_FULL_TEXT_SEARCH_LANGUAGE, DataTransformCall, DeleteRowsCall, DisableRowLevelSecurityCall, DropCheckConstraintCall, DropColumnCall, DropConstraintCall, DropDefaultAction, DropDefaultCall, DropExtensionCall, DropIndexCall, DropNativeEnumTypeCall, DropNotNullCall, DropPostgresRlsPolicyCall, DropSchemaCall, DropTableCall, EnableRowLevelSecurityCall, FULL_TEXT_INDEX_TYPE, FillStoredKeyCall, FullTextDocument, MARKER_LOCK_KEY, MARKER_LOCK_SQL, 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_INTERVAL_STRING_CODEC_ID, PG_INT_CODEC_ID, PG_JSONB_CODEC_ID, PG_JSON_CODEC_ID, PG_MONEY_CODEC_ID, PG_NUMERIC_CODEC_ID, PG_OID_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_DATE_CODEC_ID, PG_TIMESTAMP_INSTANT_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, PG_XML_CODEC_ID, POLICY_COMMAND_SQL, POLICY_OPERATION_PREDICATES, PgIntervalStringCodec, PgIntervalStringDescriptor, PgTimestampDateCodec, PgTimestampDateDescriptor, PgTimestamptzDateCodec, PgTimestamptzDateDescriptor, PostgresAlterIndexRename, PostgresAlterPolicyRename, PostgresAlterSchemaRename, PostgresAlterTable, PostgresAlterTableSetSchema, PostgresCodecDescriptor, PostgresContractSerializer, PostgresContractView, PostgresCreateIndex, PostgresCreatePolicy, PostgresCreateSchema, PostgresCreateTable, PostgresCreateType, PostgresDatabaseSchemaNode, PostgresDdlNode, PostgresDisableRowLevelSecurity, PostgresDropIndex, PostgresDropPolicy, PostgresDropSchema, PostgresDropType, PostgresExtension, PostgresExtensionSchemaNode, PostgresNamespaceSchemaNode, PostgresNativeEnum, PostgresNativeEnumSchemaNode, PostgresPolicySchemaNode, PostgresRlsEnablement, PostgresRlsPolicy, PostgresRole, PostgresRoleSchemaNode, PostgresSchema, PostgresSchemaNodeKind, PostgresTableSchemaNode, PostgresTableSource, PostgresUnboundSchema, RawSqlCall, RemoveStoredKeyCall, RemoveStoredValueCall, RenameColumnCall, RenameConstraintCall, RenameIndexCall, RenamePostgresRlsPolicyCall, RenameSchemaCall, RenameStoredKeyCall, RenameTableCall, ReplaceStoredValueCall, SQL_CHAR_CODEC_ID, SQL_FLOAT_CODEC_ID, SQL_INT_CODEC_ID, SQL_RAW_CODEC_ID, SQL_TEXT_CODEC_ID, SQL_VARCHAR_CODEC_ID, SetDefaultCall, SetExtensionSchemaCall, SetNotNullCall, SetTableSchemaCall, TypeScriptRenderablePostgresMigration, addColumnAction, addConstraintAction, alterColumnTypeAction, alterTable, alterTypeCheck, assemblePostgresCodecRegistry, assemblePostgresCodecRegistryWithBuiltins, buildBuiltinIdentityValue, buildColumnTypeSql, buildControlTableBootstrapQueries, buildPostgresCodecDescriptorRegistry, buildPostgresPlanDiff, buildSchemaLookupMap, buildSignMarkerBootstrapQueries, checkExpression, coalesceSubtreeIssues, col, columnDefaultAst, columnDefaultSequenceAst, columnExistsAst, columnNullabilityAst, columnTypeAst, computeContentHash, constraintExistsAst, contractToPostgresDatabaseSchemaNode, createPostgresBuiltinCodecLookup, createPostgresBuiltinDataTypeLookup, createPostgresCodecRegistryWithBuiltins, createPostgresMigrationPlanner, createSchema, createTable, dataTransform, decodePostgresListText, definePostgresCodecs, describeFullTextIndexProblem, dropDefaultAction, errorPostgresMigrationStackMissing, escapeLiteral, extensionExistsAst, extensionInSchemaAst, fn, foreignKey, fullTextDocument, fullTextIndexProblems, hasForeignKey, hasIndex, hasUniqueConstraint, indexExistsAst, inlineLiteral, int4, int8, introspectedTypeText, isPgEnumParams, isPgOid, isPostgresCodecDescriptor, isPostgresSchema, jsonb, lit, moneyTextOfCents, noNullValuesAst, parsePostgresListText, pgBit, pgBitColumn, pgBitLengthParams, pgBool, pgBoolColumn, pgBytea, pgChar, pgCharColumn, pgCharacterLengthParams, pgDate, pgDateStoredText, pgEnum, pgEnumDescriptor, pgEnumParams, pgFloat4, pgFloat4Column, pgFloat8, pgFloat8Column, pgFloatColumn, pgInet, pgInetColumn, pgInt2, pgInt2Column, pgInt4, pgInt4Column, pgInt8, pgInt8Column, pgInt8NumberColumn, pgIntColumn, pgInterval, pgIntervalColumn, pgIntervalStringColumn, pgIntervalStringDescriptor, pgJson, pgJsonColumn, pgJsonb, pgJsonbColumn, pgJsonbEnumRefusal, pgMoney, pgMoneyColumn, pgMoneyStoredText, pgNumeric, pgNumericColumn, pgNumericParams, pgOid, pgOidColumn, pgPrecisionParams, pgTable, pgText, pgTextArray, pgTextColumn, pgTime, pgTimeStoredText, pgTimestamp, pgTimestampDateColumn, pgTimestampDateDescriptor, pgTimestampStoredText, pgTimestamptz, pgTimestamptzDateColumn, pgTimestamptzDateDescriptor, pgTimestamptzStoredText, pgTimetz, pgTimetzColumn, pgTimetzStoredText, pgTsquery, pgUnboundedIntColumn, pgUuid, pgUuidColumn, pgVarbit, pgVarbitColumn, pgVarchar, pgVarcharColumn, pgXml, pgXmlColumn, phrasetoTsquery, placeholder, plaintoTsquery, planIssues, policyInputFromSerialized, policyRoleList, postgresAggregateDescriptors, postgresCodec, postgresCodecDescriptorRegistry, postgresCodecRegistry, postgresCodecTraitsOf, postgresCreateNamespace, postgresDataTypeEntries, postgresDataTypes, postgresError, postgresExplicitTypes, postgresNowGeneratorControlDescriptors, postgresNowGenerators, postgresRenderCheckExpressions, postgresResolveDefault, postgresScalarTypes, postgresTextDataTypes, primaryKey, prisma7PostgresBinding, qualifiedEnumName, qualifyName, qualifyTableName, quoteIdentifier, quoteQualifiedName, rawSql, readPostgresDefault, renderCallsToTypeScript, renderFullTextIndexDocument, renderOps, resolveDdlSchemaForNamespaceStorage, resolveIdentityValue, rlsEnabledAst, rlsPolicyExistsAst, sequenceNameAvailableAst, sql, stackDataTypes, tableExistsAst, tableIsEmptyAst, tablePrimaryKeyAst, text, textArray, timestamptz, timestamptzJsDate, toRegclass, toTsquery, tsquery, unique, validateEnumValueLength, websearchToTsquery, weightGroupsOf };
@@ -1,4 +1,4 @@
1
- import { A as pgNumericColumn, B as pgVarbitColumn, C as pgIntColumn, D as pgJsonColumn, E as pgIntervalStringDescriptor, F as pgTimestamptzDateColumn, H as pgXmlColumn, I as pgTimestamptzDateDescriptor, L as pgTimetzColumn, M as pgTextColumn, N as pgTimestampDateColumn, O as pgJsonbColumn, P as pgTimestampDateDescriptor, R as pgUnboundedIntColumn, S as pgInt8NumberColumn, T as pgIntervalStringColumn, V as pgVarcharColumn, _ as pgFloatColumn, a as PgTimestamptzDateCodec, b as pgInt4Column, d as pgBitColumn, f as pgBoolColumn, g as pgFloat8Column, h as pgFloat4Column, i as PgTimestampDateDescriptor, j as pgOidColumn, k as pgMoneyColumn, l as isPgEnumParams, m as pgEnumDescriptor, n as PgIntervalStringDescriptor, o as PgTimestamptzDateDescriptor, p as pgCharColumn, r as PgTimestampDateCodec, t as PgIntervalStringCodec, u as parsePostgresListText, v as pgInetColumn, w as pgIntervalColumn, x as pgInt8Column, y as pgInt2Column, z as pgUuidColumn } from "./codecs-CV-_K-z0-DZc60ccR.mjs";
2
- import { n as postgresCodecRegistry, t as postgresCodecDescriptorRegistry } from "./registry-Ctq7UGkA-_DnAcgYm.mjs";
3
- import { i as createPostgresCodecRegistryWithBuiltins, n as assemblePostgresCodecRegistryWithBuiltins, r as createPostgresBuiltinCodecLookup, t as assemblePostgresCodecRegistry } from "./codec-registry-7LHPD8C1-BALCyEB-.mjs";
1
+ import { A as pgNumericColumn, B as pgVarbitColumn, C as pgIntColumn, D as pgJsonColumn, E as pgIntervalStringDescriptor, F as pgTimestamptzDateColumn, H as pgXmlColumn, I as pgTimestamptzDateDescriptor, L as pgTimetzColumn, M as pgTextColumn, N as pgTimestampDateColumn, O as pgJsonbColumn, P as pgTimestampDateDescriptor, R as pgUnboundedIntColumn, S as pgInt8NumberColumn, T as pgIntervalStringColumn, V as pgVarcharColumn, _ as pgFloatColumn, a as PgTimestamptzDateCodec, b as pgInt4Column, d as pgBitColumn, f as pgBoolColumn, g as pgFloat8Column, h as pgFloat4Column, i as PgTimestampDateDescriptor, j as pgOidColumn, k as pgMoneyColumn, l as isPgEnumParams, m as pgEnumDescriptor, n as PgIntervalStringDescriptor, o as PgTimestamptzDateDescriptor, p as pgCharColumn, r as PgTimestampDateCodec, t as PgIntervalStringCodec, u as parsePostgresListText, v as pgInetColumn, w as pgIntervalColumn, x as pgInt8Column, y as pgInt2Column, z as pgUuidColumn } from "./codecs-Bzj3M0Q3-C2oFSIGs.mjs";
2
+ import { n as postgresCodecRegistry, t as postgresCodecDescriptorRegistry } from "./registry-D4AyYsXr-CgiiMuFS.mjs";
3
+ import { i as createPostgresCodecRegistryWithBuiltins, n as assemblePostgresCodecRegistryWithBuiltins, r as createPostgresBuiltinCodecLookup, t as assemblePostgresCodecRegistry } from "./codec-registry-B0LsFn7Z-ej9yKwTq.mjs";
4
4
  export { PgIntervalStringCodec, PgIntervalStringDescriptor, PgTimestampDateCodec, PgTimestampDateDescriptor, PgTimestamptzDateCodec, PgTimestamptzDateDescriptor, assemblePostgresCodecRegistry, assemblePostgresCodecRegistryWithBuiltins, createPostgresBuiltinCodecLookup, createPostgresCodecRegistryWithBuiltins, isPgEnumParams, parsePostgresListText, pgBitColumn, pgBoolColumn, pgCharColumn, pgEnumDescriptor, pgFloat4Column, pgFloat8Column, pgFloatColumn, pgInetColumn, pgInt2Column, pgInt4Column, pgInt8Column, pgInt8NumberColumn, pgIntColumn, pgIntervalColumn, pgIntervalStringColumn, pgIntervalStringDescriptor, pgJsonColumn, pgJsonbColumn, pgMoneyColumn, pgNumericColumn, pgOidColumn, pgTextColumn, pgTimestampDateColumn, pgTimestampDateDescriptor, pgTimestamptzDateColumn, pgTimestamptzDateDescriptor, pgTimetzColumn, pgUnboundedIntColumn, pgUuidColumn, pgVarbitColumn, pgVarcharColumn, pgXmlColumn, postgresCodecDescriptorRegistry, postgresCodecRegistry };
@@ -1,4 +1,4 @@
1
- import { d as PostgresTableSource } from "./postgres-schema-BBWgs4fX-DWdYxNi8.mjs";
2
- import { A as extensionInSchemaAst, F as noNullValuesAst, G as tableIsEmptyAst, H as sequenceNameAvailableAst, K as tablePrimaryKeyAst, L as rlsEnabledAst, M as indexExistsAst, W as tableExistsAst, _ as constraintExistsAst, b as createSchema, d as columnExistsAst, f as columnNullabilityAst, k as extensionExistsAst, l as columnDefaultAst, m as columnTypeAst, n as addConstraintAction, q as toRegclass, r as alterColumnTypeAction, s as alterTable, t as addColumnAction, u as columnDefaultSequenceAst, w as dropDefaultAction, x as createTable, z as rlsPolicyExistsAst } from "./ddl-qu-IzeH4-CFpSpY0X.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-DmNEp1_Y.mjs";
1
+ import { d as PostgresTableSource } from "./postgres-schema-zd_p5Lg2-BdJlG7Cg.mjs";
2
+ import { A as extensionInSchemaAst, F as noNullValuesAst, G as tableIsEmptyAst, H as sequenceNameAvailableAst, K as tablePrimaryKeyAst, L as rlsEnabledAst, M as indexExistsAst, W as tableExistsAst, _ as constraintExistsAst, b as createSchema, d as columnExistsAst, f as columnNullabilityAst, k as extensionExistsAst, l as columnDefaultAst, m as columnTypeAst, n as addConstraintAction, q as toRegclass, r as alterColumnTypeAction, s as alterTable, t as addColumnAction, u as columnDefaultSequenceAst, w as dropDefaultAction, x as createTable, z as rlsPolicyExistsAst } from "./ddl-DCQLfg18-BgWGYC7L.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-DiRem1nw.mjs";
4
4
  export { PostgresTableSource, addColumnAction, addConstraintAction, alterColumnTypeAction, alterTable, buildControlTableBootstrapQueries, buildSignMarkerBootstrapQueries, columnDefaultAst, columnDefaultSequenceAst, columnExistsAst, columnNullabilityAst, columnTypeAst, constraintExistsAst, createSchema, createTable, dropDefaultAction, extensionExistsAst, extensionInSchemaAst, indexExistsAst, int4, int8, jsonb, noNullValuesAst, pgTable, rlsEnabledAst, rlsPolicyExistsAst, sequenceNameAvailableAst, tableExistsAst, tableIsEmptyAst, tablePrimaryKeyAst, text, textArray, timestamptz, timestamptzJsDate, toRegclass };
@@ -1,26 +1,26 @@
1
1
  import { T as PG_TEXT_CODEC_ID, s as PG_ENUM_CODEC_ID } from "./codec-ids-2htdtS66-CJPMZv1t.mjs";
2
- import { u as postgresError } from "./errors-DpdPXR_L-DailcY-X.mjs";
3
- import { a as quoteIdentifier } from "./sql-utils-VXrIh8dJ-DVxo_Ygp.mjs";
2
+ import { u as postgresError } from "./errors-C4-Dp3gI-B5jY5eJj.mjs";
3
+ import { a as quoteIdentifier } from "./sql-utils-CRPhDLp1-wbgQW5TM.mjs";
4
4
  import { t as DEFAULT_NAMESPACE_ID } from "./namespace-ids-xtp_ZY86-Cxc0dBbO.mjs";
5
5
  import { t as PostgresNativeEnum } from "./postgres-native-enum-CdP3b_-R-DgG3pi5p.mjs";
6
- import { c as decodePostgresListText, u as parsePostgresListText } from "./codecs-CV-_K-z0-DZc60ccR.mjs";
7
- import { s as fullTextIndexDefinitionOf } from "./full-text-index-definition-MfjtL-x7-ImaTAFMs.mjs";
8
- import { c as PostgresRole, i as PostgresRlsEnablement, o as PostgresRlsPolicy, t as PostgresExtension } from "./postgres-schema-BBWgs4fX-DWdYxNi8.mjs";
6
+ import { c as decodePostgresListText, u as parsePostgresListText } from "./codecs-Bzj3M0Q3-C2oFSIGs.mjs";
7
+ import { s as fullTextIndexDefinitionOf } from "./full-text-index-definition-DzRCaPjb-0USKN1ZI.mjs";
8
+ import { c as PostgresRole, i as PostgresRlsEnablement, o as PostgresRlsPolicy, t as PostgresExtension } from "./postgres-schema-zd_p5Lg2-BdJlG7Cg.mjs";
9
9
  import { r as computeContentHash } from "./canonicalize-RdxoUHao-FTTkizfe.mjs";
10
- import { c as postgresScalarTypes, o as postgresExplicitTypes, t as POLICY_BLOCK_KEYWORDS } from "./authoring-BD4uEpBM-DIJiGq4e.mjs";
11
- import { t as postgresRenderCheckExpressions } from "./check-expressions-DL9WtMO5-CUcbN2JG.mjs";
12
- import { i as postgresNowGeneratorControlDescriptors } from "./date-time-now-generators-BMMGy0vy-BEbt_79F.mjs";
13
- import { t as postgresTargetDescriptorMeta } from "./descriptor-meta-DWKp5Q1s-DplRJE9N.mjs";
10
+ import { c as postgresScalarTypes, o as postgresExplicitTypes, t as POLICY_BLOCK_KEYWORDS } from "./authoring-BbS0bin5-U9tXyzS6.mjs";
11
+ import { t as postgresRenderCheckExpressions } from "./check-expressions-Ch-A_NJN-BscDa8xT.mjs";
12
+ import { i as postgresNowGeneratorControlDescriptors } from "./date-time-now-generators-BORO1_nc-BdCe3ppq.mjs";
13
+ import { t as postgresTargetDescriptorMeta } from "./descriptor-meta-xBYwG7xG-DWAZTiD5.mjs";
14
14
  import { o as postgresDiffSubjectEntityKind, s as postgresDiffSubjectGranularity } from "./postgres-table-schema-node-OQRI_GIM-DhOVxH8-.mjs";
15
15
  import { t as PostgresDatabaseSchemaNode } from "./postgres-role-schema-node-yFPLQ6U0-ZCPXs-lG.mjs";
16
- import { i as qualifyTableName } from "./planner-sql-checks-RKQqd_b5-CesTHuGH.mjs";
17
- import { U as SCHEMA_OBJECTS_SQL, X as dropCheckConstraintId, Z as holdingStoredValue, it as schemaObjectsSummary, nt as schemaBlockingObjects, rt as schemaContentsOf } from "./op-factory-call-DlZ_wHv_-Dh_yijWZ.mjs";
18
- import { r as diffPostgresSchema } from "./diff-database-schema-CX_XzsE0-BwaMw0Gq.mjs";
19
- import { t as PostgresContractSerializer } from "./postgres-contract-view-yDfay91x-BBinYMBq.mjs";
20
- import { o as postgresContractToSchema } from "./postgres-migration-BPr4WRWw-CN_b66o1.mjs";
21
- import { n as postgresMarkedRemoval, r as postgresStoredValueCallClasses, t as createPostgresMigrationPlanner } from "./planner-BO6cvHnU-DtlizdVY.mjs";
16
+ import { i as qualifyTableName } from "./planner-sql-checks-BOdYkh9L-hXxekxJX.mjs";
17
+ import { U as SCHEMA_OBJECTS_SQL, X as dropCheckConstraintId, Z as holdingStoredValue, it as schemaObjectsSummary, nt as schemaBlockingObjects, rt as schemaContentsOf } from "./op-factory-call-THEIwT0J-DQM3Y94S.mjs";
18
+ import { r as diffPostgresSchema } from "./diff-database-schema-J96mtg_F-BHpzbMoj.mjs";
19
+ import { t as PostgresContractSerializer } from "./postgres-contract-view-WtPiaMZp-C-CQAB1E.mjs";
20
+ import { o as postgresContractToSchema } from "./postgres-migration-BuxK0qNO-BgQHf6H6.mjs";
21
+ import { n as postgresMarkedRemoval, r as postgresStoredValueCallClasses, t as createPostgresMigrationPlanner } from "./planner-BlY3pVTF-B-yPNIGN.mjs";
22
22
  import { n as MARKER_LOCK_SQL, t as MARKER_LOCK_KEY } from "./marker-lock-DFc1Tfv5-BkBKBRE3.mjs";
23
- import { _ as positionalArg, a as buildFullTextIndexAttribute, c as buildModelConstraintAttribute, f as inferPostgresPslContract, g as parseDefaultAttributeString, i as buildExtensionBlock, l as buildNativeEnumBlock, n as buildAttribute, o as buildIndexAttribute, p as namedArg, r as buildCheckAttribute, s as buildMapAttribute, t as SYNTHETIC_SPAN, v as typeArgument } from "./infer-psl-contract-DR0Uie7w-CkaPSdPc.mjs";
23
+ import { _ as positionalArg, a as buildFullTextIndexAttribute, c as buildModelConstraintAttribute, f as inferPostgresPslContract, g as parseDefaultAttributeString, i as buildExtensionBlock, l as buildNativeEnumBlock, n as buildAttribute, o as buildIndexAttribute, p as namedArg, r as buildCheckAttribute, s as buildMapAttribute, t as SYNTHETIC_SPAN, v as typeArgument } from "./infer-psl-contract-CAoJuV8y-Da9y8zwV.mjs";
24
24
  import { dataTypeParams, requiredParamKeys, validateCodecTypeParams } from "@prisma/orm-framework/components/codec";
25
25
  import { blindCast } from "@prisma/orm-framework/utils/casts";
26
26
  import { InternalError } from "@prisma/orm-framework/utils/internal-error";