@prisma/orm-target-postgres 8.0.0-rc.14-dev.20 → 8.0.0-rc.14-dev.21

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 (85) hide show
  1. package/dist/{adapter-zLXT8Yxm-BX8ynGWu.mjs → adapter-CBoNuaSX-Lqzxy-Qt.mjs} +3 -3
  2. package/dist/{adapter-zLXT8Yxm-BX8ynGWu.mjs.map → adapter-CBoNuaSX-Lqzxy-Qt.mjs.map} +1 -1
  3. package/dist/{adapter-DmDLDsVW.d.mts → adapter-PLCU5rSG.d.mts} +3 -3
  4. package/dist/{adapter-DmDLDsVW.d.mts.map → adapter-PLCU5rSG.d.mts.map} +1 -1
  5. package/dist/adapter.d.mts +2 -2
  6. package/dist/adapter.mjs +2 -2
  7. package/dist/adapter__adapter.d.mts +1 -1
  8. package/dist/adapter__adapter.mjs +1 -1
  9. package/dist/adapter__control.d.mts +1 -1
  10. package/dist/adapter__control.mjs +2 -2
  11. package/dist/adapter__control.mjs.map +1 -1
  12. package/dist/adapter__runtime.mjs +1 -1
  13. package/dist/adapter__runtime.mjs.map +1 -1
  14. package/dist/{contract-free-C0GQe4X_.mjs → contract-free-DeK6m1dy.mjs} +2 -2
  15. package/dist/{contract-free-C0GQe4X_.mjs.map → contract-free-DeK6m1dy.mjs.map} +1 -1
  16. package/dist/{contract-free-DFF0Xo-V.d.mts → contract-free-DlLLhKi4.d.mts} +2 -2
  17. package/dist/{contract-free-DFF0Xo-V.d.mts.map → contract-free-DlLLhKi4.d.mts.map} +1 -1
  18. package/dist/{control-CoZVI8XA.d.mts → control-RTK8NJRT.d.mts} +3 -3
  19. package/dist/{control-CoZVI8XA.d.mts.map → control-RTK8NJRT.d.mts.map} +1 -1
  20. package/dist/{control-adapter-DlHDFQw4-Awa40s5_.mjs → control-adapter-Rzj1Wx4j-om2RNriu.mjs} +12 -12
  21. package/dist/control-adapter-Rzj1Wx4j-om2RNriu.mjs.map +1 -0
  22. package/dist/{control-policy-B_b8ZqDi-zNYBao6-.mjs → control-policy-BDZr0Xz9-C6OPekoo.mjs} +3 -3
  23. package/dist/{control-policy-B_b8ZqDi-zNYBao6-.mjs.map → control-policy-BDZr0Xz9-C6OPekoo.mjs.map} +1 -1
  24. package/dist/{control-9MzjJLOE.mjs → control-xdedZDo5.mjs} +4 -4
  25. package/dist/{control-9MzjJLOE.mjs.map → control-xdedZDo5.mjs.map} +1 -1
  26. package/dist/ddl-B-WjvCal.d.mts +1 -0
  27. package/dist/{ddl-C6M0Hkbe-BSSauy2X.mjs → ddl-BQFDVert-CcDdETee.mjs} +17 -5
  28. package/dist/ddl-BQFDVert-CcDdETee.mjs.map +1 -0
  29. package/dist/{diff-database-schema-Cd6igMdS-CD3R7EC4.mjs → diff-database-schema-D_U4h-Ne-Dr3N_Zhs.mjs} +3 -3
  30. package/dist/{diff-database-schema-Cd6igMdS-CD3R7EC4.mjs.map → diff-database-schema-D_U4h-Ne-Dr3N_Zhs.mjs.map} +1 -1
  31. package/dist/{issue-planner-WWpJ3gOQ.d.mts → issue-planner-BdnqkLvV.d.mts} +2 -2
  32. package/dist/{issue-planner-WWpJ3gOQ.d.mts.map → issue-planner-BdnqkLvV.d.mts.map} +1 -1
  33. package/dist/{migration-DwqTcQ5d.d.mts → migration-D7F66l-1.d.mts} +3 -3
  34. package/dist/{migration-DwqTcQ5d.d.mts.map → migration-D7F66l-1.d.mts.map} +1 -1
  35. package/dist/migration-PTHAY9Cv.mjs.map +1 -1
  36. package/dist/{nodes-DAvDJLvJ-BBdvFXNa.mjs → nodes-Bm2a7z6e-BXTXyzZv.mjs} +3 -6
  37. package/dist/nodes-Bm2a7z6e-BXTXyzZv.mjs.map +1 -0
  38. package/dist/{nodes-BU-V-aZA-RqwPH68u.d.mts → nodes-C1fPapnK-j0AK7Gcj.d.mts} +21 -19
  39. package/dist/{nodes-BU-V-aZA-RqwPH68u.d.mts.map → nodes-C1fPapnK-j0AK7Gcj.d.mts.map} +1 -1
  40. package/dist/{op-factory-call-DYkz28kP-4BmpSB4B.mjs → op-factory-call-BeXmjOLn-Cm9tMP0i.mjs} +12 -12
  41. package/dist/op-factory-call-BeXmjOLn-Cm9tMP0i.mjs.map +1 -0
  42. package/dist/{op-factory-call-CmhDgfov-BjHdIpND.d.mts → op-factory-call-CaEALaar-Nh0fSxQY.d.mts} +3 -12
  43. package/dist/op-factory-call-CaEALaar-Nh0fSxQY.d.mts.map +1 -0
  44. package/dist/op-factory-call-DVz_g8zS.d.mts +1 -0
  45. package/dist/{planner-fD25Vk53.d.mts → planner-DECxo-qa.d.mts} +2 -2
  46. package/dist/{planner-fD25Vk53.d.mts.map → planner-DECxo-qa.d.mts.map} +1 -1
  47. package/dist/{planner-produced-postgres-migration-C3-L3nmn-BnqXdB_l.mjs → planner-produced-postgres-migration-BHWUCdp0-CPa2RncE.mjs} +3 -3
  48. package/dist/{planner-produced-postgres-migration-C3-L3nmn-BnqXdB_l.mjs.map → planner-produced-postgres-migration-BHWUCdp0-CPa2RncE.mjs.map} +1 -1
  49. package/dist/planner-produced-postgres-migration-BMfo2BlI.d.mts +1 -0
  50. package/dist/{planner-produced-postgres-migration-CMGC3vS6-CGdYLZFB.d.mts → planner-produced-postgres-migration-DE2Ia9Ba-hYITaAdW.d.mts} +3 -3
  51. package/dist/planner-produced-postgres-migration-DE2Ia9Ba-hYITaAdW.d.mts.map +1 -0
  52. package/dist/{planner-CbuWXI6E-CrlrOSd3.mjs → planner-rr-edfu0-5jOaQ-Xj.mjs} +7 -7
  53. package/dist/{planner-CbuWXI6E-CrlrOSd3.mjs.map → planner-rr-edfu0-5jOaQ-Xj.mjs.map} +1 -1
  54. package/dist/{postgres-migration-vpMSrXLQ-CJ72Zey3.d.mts → postgres-migration-BCzAcFmN-Bz_I02Gc.d.mts} +3 -3
  55. package/dist/{postgres-migration-vpMSrXLQ-CJ72Zey3.d.mts.map → postgres-migration-BCzAcFmN-Bz_I02Gc.d.mts.map} +1 -1
  56. package/dist/{postgres-migration-4qSv6qtX-Cj41qUBf.mjs → postgres-migration-Brm-aBQE-CatENAfZ.mjs} +5 -5
  57. package/dist/{postgres-migration-4qSv6qtX-Cj41qUBf.mjs.map → postgres-migration-Brm-aBQE-CatENAfZ.mjs.map} +1 -1
  58. package/dist/target.d.mts +12 -12
  59. package/dist/target.mjs +10 -10
  60. package/dist/target__contract-free.d.mts +1 -1
  61. package/dist/target__contract-free.mjs +2 -2
  62. package/dist/target__control.mjs +2 -2
  63. package/dist/target__ddl.d.mts +3 -3
  64. package/dist/target__ddl.mjs +1 -1
  65. package/dist/target__diff-database-schema.mjs +1 -1
  66. package/dist/target__issue-planner.d.mts +1 -1
  67. package/dist/target__issue-planner.mjs +1 -1
  68. package/dist/target__migration.d.mts +2 -2
  69. package/dist/target__migration.mjs +2 -2
  70. package/dist/target__op-factory-call.d.mts +2 -2
  71. package/dist/target__op-factory-call.mjs +1 -1
  72. package/dist/target__planner-produced-postgres-migration.d.mts +2 -2
  73. package/dist/target__planner-produced-postgres-migration.mjs +1 -1
  74. package/dist/target__planner.d.mts +1 -1
  75. package/dist/target__planner.mjs +2 -2
  76. package/package.json +9 -9
  77. package/dist/control-adapter-DlHDFQw4-Awa40s5_.mjs.map +0 -1
  78. package/dist/ddl-B4Rh8ntj.d.mts +0 -1
  79. package/dist/ddl-C6M0Hkbe-BSSauy2X.mjs.map +0 -1
  80. package/dist/nodes-DAvDJLvJ-BBdvFXNa.mjs.map +0 -1
  81. package/dist/op-factory-call-CmhDgfov-BjHdIpND.d.mts.map +0 -1
  82. package/dist/op-factory-call-DYkz28kP-4BmpSB4B.mjs.map +0 -1
  83. package/dist/op-factory-call-DbjizP4b.d.mts +0 -1
  84. package/dist/planner-produced-postgres-migration-CMGC3vS6-CGdYLZFB.d.mts.map +0 -1
  85. package/dist/planner-produced-postgres-migration-DJFPEI7l.d.mts +0 -1
@@ -1,9 +1,9 @@
1
1
  import { i as createPostgresCodecRegistryWithBuiltins } from "./codecs-DMPbfU3s.mjs";
2
2
  import { n as renderLoweredSql, t as adapterError } from "./sql-renderer-CgUgFbU4-CujcTVwf.mjs";
3
- import { t as PostgresControlAdapter } from "./control-adapter-DlHDFQw4-Awa40s5_.mjs";
3
+ import { t as PostgresControlAdapter } from "./control-adapter-Rzj1Wx4j-om2RNriu.mjs";
4
4
  import { isDdlNode } from "@prisma/orm-family-sql/relational-core/ast";
5
5
  import { APP_SPACE_ID } from "@prisma/orm-framework/components/control";
6
- //#region ../../../3-targets/6-adapters/postgres/dist/adapter-zLXT8Yxm.mjs
6
+ //#region ../../../3-targets/6-adapters/postgres/dist/adapter-CBoNuaSX.mjs
7
7
  const defaultCapabilities = Object.freeze({
8
8
  postgres: {
9
9
  orderBy: true,
@@ -95,4 +95,4 @@ function createPostgresAdapterWithCodecRegistry(codecRegistry) {
95
95
  //#endregion
96
96
  export { createPostgresAdapterWithCodecRegistry as n, postgresRawCodecInferer as r, createPostgresAdapter as t };
97
97
 
98
- //# sourceMappingURL=adapter-zLXT8Yxm-BX8ynGWu.mjs.map
98
+ //# sourceMappingURL=adapter-CBoNuaSX-Lqzxy-Qt.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"adapter-zLXT8Yxm-BX8ynGWu.mjs","names":[],"sources":["../../../../3-targets/6-adapters/postgres/dist/adapter-zLXT8Yxm.mjs"],"sourcesContent":["import { n as adapterError, t as renderLoweredSql } from \"./sql-renderer-CgUgFbU4.mjs\";\nimport { t as PostgresControlAdapter } from \"./control-adapter-DlHDFQw4.mjs\";\nimport { APP_SPACE_ID } from \"@internal/framework-components/control\";\nimport { isDdlNode } from \"@internal/sql-relational-core/ast\";\nimport { createPostgresCodecRegistryWithBuiltins } from \"@internal/target-postgres/codecs\";\n//#region src/core/adapter.ts\nconst defaultCapabilities = Object.freeze({\n\tpostgres: {\n\t\torderBy: true,\n\t\tlimit: true,\n\t\tlateral: true,\n\t\tjsonAgg: true,\n\t\treturning: true,\n\t\tdistinctOn: true\n\t},\n\tsql: {\n\t\tenums: true,\n\t\treturning: true,\n\t\tdefaultInInsert: true,\n\t\tlateral: true,\n\t\tscalarList: true,\n\t\tcheckConstraint: true,\n\t\tinsertOnConflictSkip: true,\n\t\tinsertOnConflictWithoutTarget: true\n\t}\n});\nvar PostgresAdapterImpl = class {\n\tfamilyId = \"sql\";\n\ttargetId = \"postgres\";\n\tprofile;\n\tcodecRegistry;\n\tconstructor(codecRegistry, profileId) {\n\t\tthis.codecRegistry = codecRegistry;\n\t\tconst controlAdapter = new PostgresControlAdapter(codecRegistry);\n\t\tthis.profile = Object.freeze({\n\t\t\tid: profileId ?? \"postgres/default@1\",\n\t\t\ttarget: \"postgres\",\n\t\t\tcapabilities: defaultCapabilities,\n\t\t\treadMarker: (queryable) => controlAdapter.readMarkerDiscriminated({\n\t\t\t\tfamilyId: \"sql\",\n\t\t\t\ttargetId: \"postgres\",\n\t\t\t\tquery: async (sql, params) => {\n\t\t\t\t\tconst rows = [];\n\t\t\t\t\tfor await (const row of queryable.query({\n\t\t\t\t\t\tsql,\n\t\t\t\t\t\t...params === void 0 ? {} : { params }\n\t\t\t\t\t})) rows.push(row);\n\t\t\t\t\treturn { rows };\n\t\t\t\t},\n\t\t\t\tclose: async () => {}\n\t\t\t}, APP_SPACE_ID)\n\t\t});\n\t}\n\tlower(ast, context) {\n\t\tif (isDdlNode(ast)) throw adapterError(\"RUNTIME.DDL_UNSUPPORTED\", \"lower() does not lower DDL on the runtime adapter — DDL lowering is a control-plane concern handled by the control adapter.\", { meta: { surface: \"runtime-adapter\" } });\n\t\treturn renderLoweredSql(ast, context.contract, this.codecRegistry);\n\t}\n};\nconst INT4_MIN = -2147483648;\nconst INT4_MAX = 2147483647;\n/**\n* The codec a bare JS number is bound through.\n*\n* An integer picks the narrowest column type that holds it: `int4` while it\n* fits the signed 32-bit range, `int8` (number-valued) up to the safe-integer\n* limit. Past that limit a JS number is no longer an exact integer, so it\n* binds as `float8` rather than pretending to a precision it does not have.\n*/\nfunction inferNumberCodecId(value) {\n\tif (!Number.isSafeInteger(value)) return \"pg/float8@1\";\n\treturn value >= INT4_MIN && value <= INT4_MAX ? \"pg/int4@1\" : \"pg/int8number@1\";\n}\n/**\n* Codec-id lookup for bare-literal interpolations used by `fns.raw` on a postgres client. Contributed as the descriptor's static `rawCodecInferer` slot.\n*\n* The ids are versioned because that is how the codec registry keys them: lowering resolves an interpolated value's codec by exact id through `descriptorFor`.\n*/\nconst postgresRawCodecInferer = { inferCodec(value) {\n\tswitch (typeof value) {\n\t\tcase \"number\": return inferNumberCodecId(value);\n\t\tcase \"bigint\": return \"pg/int8@1\";\n\t\tcase \"string\": return \"pg/text@1\";\n\t\tcase \"boolean\": return \"pg/bool@1\";\n\t\tcase \"object\": if (value instanceof Uint8Array) return \"pg/bytea@1\";\n\t}\n\tthrow adapterError(\"RUNTIME.RAW_SQL_UNSUPPORTED_INTERPOLATION\", \"unsupported JS value type for raw-SQL interpolation: wrap this value in `param(...)` with an explicit codec\", { meta: { valueType: typeof value } });\n} };\nfunction createPostgresAdapter(options) {\n\tconst codecRegistry = createPostgresCodecRegistryWithBuiltins(options?.codecDescriptors);\n\treturn Object.freeze(new PostgresAdapterImpl(codecRegistry, options?.profileId));\n}\nfunction createPostgresAdapterWithCodecRegistry(codecRegistry) {\n\treturn Object.freeze(new PostgresAdapterImpl(codecRegistry));\n}\n//#endregion\nexport { createPostgresAdapterWithCodecRegistry as n, postgresRawCodecInferer as r, createPostgresAdapter as t };\n\n//# sourceMappingURL=adapter-zLXT8Yxm.mjs.map"],"mappings":";;;;;;AAMA,MAAM,sBAAsB,OAAO,OAAO;CACzC,UAAU;EACT,SAAS;EACT,OAAO;EACP,SAAS;EACT,SAAS;EACT,WAAW;EACX,YAAY;CACb;CACA,KAAK;EACJ,OAAO;EACP,WAAW;EACX,iBAAiB;EACjB,SAAS;EACT,YAAY;EACZ,iBAAiB;EACjB,sBAAsB;EACtB,+BAA+B;CAChC;AACD,CAAC;AACD,IAAI,sBAAsB,MAAM;CAC/B,WAAW;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wCAAwC,SAAS,gBAAgB;CACvF,OAAO,OAAO,OAAO,IAAI,oBAAoB,eAAe,SAAS,SAAS,CAAC;AAChF;AACA,SAAS,uCAAuC,eAAe;CAC9D,OAAO,OAAO,OAAO,IAAI,oBAAoB,aAAa,CAAC;AAC5D"}
1
+ {"version":3,"file":"adapter-CBoNuaSX-Lqzxy-Qt.mjs","names":[],"sources":["../../../../3-targets/6-adapters/postgres/dist/adapter-CBoNuaSX.mjs"],"sourcesContent":["import { n as adapterError, t as renderLoweredSql } from \"./sql-renderer-CgUgFbU4.mjs\";\nimport { t as PostgresControlAdapter } from \"./control-adapter-Rzj1Wx4j.mjs\";\nimport { APP_SPACE_ID } from \"@internal/framework-components/control\";\nimport { isDdlNode } from \"@internal/sql-relational-core/ast\";\nimport { createPostgresCodecRegistryWithBuiltins } from \"@internal/target-postgres/codecs\";\n//#region src/core/adapter.ts\nconst defaultCapabilities = Object.freeze({\n\tpostgres: {\n\t\torderBy: true,\n\t\tlimit: true,\n\t\tlateral: true,\n\t\tjsonAgg: true,\n\t\treturning: true,\n\t\tdistinctOn: true\n\t},\n\tsql: {\n\t\tenums: true,\n\t\treturning: true,\n\t\tdefaultInInsert: true,\n\t\tlateral: true,\n\t\tscalarList: true,\n\t\tcheckConstraint: true,\n\t\tinsertOnConflictSkip: true,\n\t\tinsertOnConflictWithoutTarget: true\n\t}\n});\nvar PostgresAdapterImpl = class {\n\tfamilyId = \"sql\";\n\ttargetId = \"postgres\";\n\tprofile;\n\tcodecRegistry;\n\tconstructor(codecRegistry, profileId) {\n\t\tthis.codecRegistry = codecRegistry;\n\t\tconst controlAdapter = new PostgresControlAdapter(codecRegistry);\n\t\tthis.profile = Object.freeze({\n\t\t\tid: profileId ?? \"postgres/default@1\",\n\t\t\ttarget: \"postgres\",\n\t\t\tcapabilities: defaultCapabilities,\n\t\t\treadMarker: (queryable) => controlAdapter.readMarkerDiscriminated({\n\t\t\t\tfamilyId: \"sql\",\n\t\t\t\ttargetId: \"postgres\",\n\t\t\t\tquery: async (sql, params) => {\n\t\t\t\t\tconst rows = [];\n\t\t\t\t\tfor await (const row of queryable.query({\n\t\t\t\t\t\tsql,\n\t\t\t\t\t\t...params === void 0 ? {} : { params }\n\t\t\t\t\t})) rows.push(row);\n\t\t\t\t\treturn { rows };\n\t\t\t\t},\n\t\t\t\tclose: async () => {}\n\t\t\t}, APP_SPACE_ID)\n\t\t});\n\t}\n\tlower(ast, context) {\n\t\tif (isDdlNode(ast)) throw adapterError(\"RUNTIME.DDL_UNSUPPORTED\", \"lower() does not lower DDL on the runtime adapter — DDL lowering is a control-plane concern handled by the control adapter.\", { meta: { surface: \"runtime-adapter\" } });\n\t\treturn renderLoweredSql(ast, context.contract, this.codecRegistry);\n\t}\n};\nconst INT4_MIN = -2147483648;\nconst INT4_MAX = 2147483647;\n/**\n* The codec a bare JS number is bound through.\n*\n* An integer picks the narrowest column type that holds it: `int4` while it\n* fits the signed 32-bit range, `int8` (number-valued) up to the safe-integer\n* limit. Past that limit a JS number is no longer an exact integer, so it\n* binds as `float8` rather than pretending to a precision it does not have.\n*/\nfunction inferNumberCodecId(value) {\n\tif (!Number.isSafeInteger(value)) return \"pg/float8@1\";\n\treturn value >= INT4_MIN && value <= INT4_MAX ? \"pg/int4@1\" : \"pg/int8number@1\";\n}\n/**\n* Codec-id lookup for bare-literal interpolations used by `fns.raw` on a postgres client. Contributed as the descriptor's static `rawCodecInferer` slot.\n*\n* The ids are versioned because that is how the codec registry keys them: lowering resolves an interpolated value's codec by exact id through `descriptorFor`.\n*/\nconst postgresRawCodecInferer = { inferCodec(value) {\n\tswitch (typeof value) {\n\t\tcase \"number\": return inferNumberCodecId(value);\n\t\tcase \"bigint\": return \"pg/int8@1\";\n\t\tcase \"string\": return \"pg/text@1\";\n\t\tcase \"boolean\": return \"pg/bool@1\";\n\t\tcase \"object\": if (value instanceof Uint8Array) return \"pg/bytea@1\";\n\t}\n\tthrow adapterError(\"RUNTIME.RAW_SQL_UNSUPPORTED_INTERPOLATION\", \"unsupported JS value type for raw-SQL interpolation: wrap this value in `param(...)` with an explicit codec\", { meta: { valueType: typeof value } });\n} };\nfunction createPostgresAdapter(options) {\n\tconst codecRegistry = createPostgresCodecRegistryWithBuiltins(options?.codecDescriptors);\n\treturn Object.freeze(new PostgresAdapterImpl(codecRegistry, options?.profileId));\n}\nfunction createPostgresAdapterWithCodecRegistry(codecRegistry) {\n\treturn Object.freeze(new PostgresAdapterImpl(codecRegistry));\n}\n//#endregion\nexport { createPostgresAdapterWithCodecRegistry as n, postgresRawCodecInferer as r, createPostgresAdapter as t };\n\n//# sourceMappingURL=adapter-CBoNuaSX.mjs.map"],"mappings":";;;;;;AAMA,MAAM,sBAAsB,OAAO,OAAO;CACzC,UAAU;EACT,SAAS;EACT,OAAO;EACP,SAAS;EACT,SAAS;EACT,WAAW;EACX,YAAY;CACb;CACA,KAAK;EACJ,OAAO;EACP,WAAW;EACX,iBAAiB;EACjB,SAAS;EACT,YAAY;EACZ,iBAAiB;EACjB,sBAAsB;EACtB,+BAA+B;CAChC;AACD,CAAC;AACD,IAAI,sBAAsB,MAAM;CAC/B,WAAW;CACX,WAAW;CACX;CACA;CACA,YAAY,eAAe,WAAW;EACrC,KAAK,gBAAgB;EACrB,MAAM,iBAAiB,IAAI,uBAAuB,aAAa;EAC/D,KAAK,UAAU,OAAO,OAAO;GAC5B,IAAI,aAAa;GACjB,QAAQ;GACR,cAAc;GACd,aAAa,cAAc,eAAe,wBAAwB;IACjE,UAAU;IACV,UAAU;IACV,OAAO,OAAO,KAAK,WAAW;KAC7B,MAAM,OAAO,CAAC;KACd,WAAW,MAAM,OAAO,UAAU,MAAM;MACvC;MACA,GAAG,WAAW,KAAK,IAAI,CAAC,IAAI,EAAE,OAAO;KACtC,CAAC,GAAG,KAAK,KAAK,GAAG;KACjB,OAAO,EAAE,KAAK;IACf;IACA,OAAO,YAAY,CAAC;GACrB,GAAG,YAAY;EAChB,CAAC;CACF;CACA,MAAM,KAAK,SAAS;EACnB,IAAI,UAAU,GAAG,GAAG,MAAM,aAAa,2BAA2B,+HAA+H,EAAE,MAAM,EAAE,SAAS,kBAAkB,EAAE,CAAC;EACzO,OAAO,iBAAiB,KAAK,QAAQ,UAAU,KAAK,aAAa;CAClE;AACD;AACA,MAAM,WAAW;AACjB,MAAM,WAAW;;;;;;;;;AASjB,SAAS,mBAAmB,OAAO;CAClC,IAAI,CAAC,OAAO,cAAc,KAAK,GAAG,OAAO;CACzC,OAAO,SAAS,YAAY,SAAS,WAAW,cAAc;AAC/D;;;;;;AAMA,MAAM,0BAA0B,EAAE,WAAW,OAAO;CACnD,QAAQ,OAAO,OAAf;EACC,KAAK,UAAU,OAAO,mBAAmB,KAAK;EAC9C,KAAK,UAAU,OAAO;EACtB,KAAK,UAAU,OAAO;EACtB,KAAK,WAAW,OAAO;EACvB,KAAK,UAAU,IAAI,iBAAiB,YAAY,OAAO;CACxD;CACA,MAAM,aAAa,6CAA6C,+GAA+G,EAAE,MAAM,EAAE,WAAW,OAAO,MAAM,EAAE,CAAC;AACrN,EAAE;AACF,SAAS,sBAAsB,SAAS;CACvC,MAAM,gBAAgB,wCAAwC,SAAS,gBAAgB;CACvF,OAAO,OAAO,OAAO,IAAI,oBAAoB,eAAe,SAAS,SAAS,CAAC;AAChF;AACA,SAAS,uCAAuC,eAAe;CAC9D,OAAO,OAAO,OAAO,IAAI,oBAAoB,aAAa,CAAC;AAC5D"}
@@ -1,8 +1,8 @@
1
1
  import { t as PostgresContract } from "./postgres-schema-Xsjt3RKO-Buv2X8ai.mjs";
2
2
  import { c as PostgresLoweredStatement, s as PostgresAdapterOptions } from "./types-BPubHbiE-BzhJ05fG.mjs";
3
3
  import { r as PostgresCodecRegistry } from "./codecs-Ba3gUr67.mjs";
4
- import { h as PostgresDdlNode } from "./nodes-BU-V-aZA-RqwPH68u.mjs";
5
- import "./ddl-B4Rh8ntj.mjs";
4
+ import { g as PostgresDdlNode } from "./nodes-C1fPapnK-j0AK7Gcj.mjs";
5
+ import "./ddl-B-WjvCal.mjs";
6
6
  import { Adapter, AdapterProfile, AnyQueryAst, LowererContext } from "@prisma/orm-family-sql/relational-core/ast";
7
7
  import { RawCodecInferer } from "@prisma/orm-family-sql/relational-core/expression";
8
8
  //#region ../../../3-targets/6-adapters/postgres/dist/adapter.d.mts
@@ -24,4 +24,4 @@ declare const postgresRawCodecInferer: RawCodecInferer;
24
24
  declare function createPostgresAdapter(options?: PostgresAdapterOptions): Readonly<PostgresAdapterImpl>;
25
25
  //#endregion
26
26
  export { postgresRawCodecInferer as n, createPostgresAdapter as t };
27
- //# sourceMappingURL=adapter-DmDLDsVW.d.mts.map
27
+ //# sourceMappingURL=adapter-PLCU5rSG.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"adapter-DmDLDsVW.d.mts","names":[],"sources":["../../../../3-targets/6-adapters/postgres/dist/adapter.d.mts"],"mappings":";;;;;;;;;cAMc,+BAA+B,QAAQ,aAAa,kBAAkB;WACzE;WACA;WACA,SAAS;mBACD;EACjB,YAAY,eAAe,uBAAuB;EAClD,MAAM,KAAK,cAAc,iBAAiB,SAAS,eAAe,oBAAoB;;;;;;;cAO1E,yBAAyB;iBACtB,sBAAsB,UAAU,yBAAyB,SAAS"}
1
+ {"version":3,"file":"adapter-PLCU5rSG.d.mts","names":[],"sources":["../../../../3-targets/6-adapters/postgres/dist/adapter.d.mts"],"mappings":";;;;;;;;;cAMc,+BAA+B,QAAQ,aAAa,kBAAkB;WACzE;WACA;WACA,SAAS;mBACD;EACjB,YAAY,eAAe,uBAAuB;EAClD,MAAM,KAAK,cAAc,iBAAiB,SAAS,eAAe,oBAAoB;;;;;;;cAO1E,yBAAyB;iBACtB,sBAAsB,UAAU,yBAAyB,SAAS"}
@@ -1,12 +1,12 @@
1
1
  import { t as PostgresContract } from "./postgres-schema-Xsjt3RKO-Buv2X8ai.mjs";
2
2
  import { a as OrderClause, c as PostgresLoweredStatement, d as StorageTable, i as Expr, l as SelectAst, n as ColumnRef, o as ParamRef, r as Direction, s as PostgresAdapterOptions, t as BinaryExpr, u as StorageColumn } from "./types-BPubHbiE-BzhJ05fG.mjs";
3
3
  import { o as createPostgresBuiltinCodecLookup, r as PostgresCodecRegistry, s as createPostgresCodecRegistryWithBuiltins } from "./codecs-Ba3gUr67.mjs";
4
- import { n as postgresRawCodecInferer, t as createPostgresAdapter } from "./adapter-DmDLDsVW.mjs";
4
+ import { n as postgresRawCodecInferer, t as createPostgresAdapter } from "./adapter-PLCU5rSG.mjs";
5
5
  import { C as timestamptzTemporalColumn, E as varcharColumn, S as timestamptzStringColumn, T as varbitColumn, _ as timeStringColumn, a as dateStringColumn, b as timestampTemporalColumn, c as float8Column, d as int8Column, f as intervalColumn, g as textColumn, h as numericColumn, i as charColumn, l as int2Column, m as jsonbColumn, n as boolColumn, o as dateTemporalColumn, p as jsonColumn, r as byteaColumn, s as float4Column, t as bitColumn, u as int4Column, v as timeTemporalColumn, w as timetzColumn, x as timestamptzJsDateColumn, y as timestampStringColumn } from "./column-types-C_d8NCMy.mjs";
6
6
  import { t as parsePostgresDefault } from "./default-normalizer-ZZ7Y5boE.mjs";
7
7
  import { i as normalizeSchemaNativeType } from "./native-type-normalizer-BFo5tSyh.mjs";
8
8
  import { i as quoteIdentifier, r as qualifyName, t as escapeLiteral } from "./sql-utils-DqFxskY6.mjs";
9
- import { t as PostgresControlAdapter } from "./control-CoZVI8XA.mjs";
9
+ import { t as PostgresControlAdapter } from "./control-RTK8NJRT.mjs";
10
10
  import { t as SqlRuntimeAdapter } from "./runtime-4QFzvcCp.mjs";
11
11
  import { t as renderLoweredSql } from "./sql-renderer-Bd07vbru.mjs";
12
12
  import "./types-CUt2h1U-.mjs";
package/dist/adapter.mjs CHANGED
@@ -3,7 +3,7 @@ import { n as qualifyName, r as quoteIdentifier, t as escapeLiteral } from "./sq
3
3
  import { t as parsePostgresDefault } from "./default-normalizer-Cb7nWBUa-DXchlOUk.mjs";
4
4
  import { n as normalizeSchemaNativeType } from "./native-type-normalizer-CW6g9Fut-C5lMRRjS.mjs";
5
5
  import { n as renderLoweredSql } from "./sql-renderer-CgUgFbU4-CujcTVwf.mjs";
6
- import { t as PostgresControlAdapter } from "./control-adapter-DlHDFQw4-Awa40s5_.mjs";
7
- import { r as postgresRawCodecInferer, t as createPostgresAdapter } from "./adapter-zLXT8Yxm-BX8ynGWu.mjs";
6
+ import { t as PostgresControlAdapter } from "./control-adapter-Rzj1Wx4j-om2RNriu.mjs";
7
+ import { r as postgresRawCodecInferer, t as createPostgresAdapter } from "./adapter-CBoNuaSX-Lqzxy-Qt.mjs";
8
8
  import { C as timestamptzTemporalColumn, E as varcharColumn, S as timestamptzStringColumn, T as varbitColumn, _ as timeStringColumn, a as dateStringColumn, b as timestampTemporalColumn, c as float8Column, d as int8Column, f as intervalColumn, g as textColumn, h as numericColumn, i as charColumn, l as int2Column, m as jsonbColumn, n as boolColumn, o as dateTemporalColumn, p as jsonColumn, r as byteaColumn, s as float4Column, t as bitColumn, u as int4Column, v as timeTemporalColumn, w as timetzColumn, x as timestamptzJsDateColumn, y as timestampStringColumn } from "./column-types-CB_qVLNC.mjs";
9
9
  export { PostgresControlAdapter, bitColumn, boolColumn, byteaColumn, charColumn, createPostgresAdapter, createPostgresBuiltinCodecLookup, createPostgresCodecRegistryWithBuiltins, dateStringColumn, dateTemporalColumn, escapeLiteral, float4Column, float8Column, int2Column, int4Column, int8Column, intervalColumn, jsonColumn, jsonbColumn, normalizeSchemaNativeType, numericColumn, parsePostgresDefault, postgresRawCodecInferer, qualifyName, quoteIdentifier, renderLoweredSql, textColumn, timeStringColumn, timeTemporalColumn, timestampStringColumn, timestampTemporalColumn, timestamptzJsDateColumn, timestamptzStringColumn, timestamptzTemporalColumn, timetzColumn, varbitColumn, varcharColumn };
@@ -1,2 +1,2 @@
1
- import { n as postgresRawCodecInferer, t as createPostgresAdapter } from "./adapter-DmDLDsVW.mjs";
1
+ import { n as postgresRawCodecInferer, t as createPostgresAdapter } from "./adapter-PLCU5rSG.mjs";
2
2
  export { createPostgresAdapter, postgresRawCodecInferer };
@@ -1,2 +1,2 @@
1
- import { r as postgresRawCodecInferer, t as createPostgresAdapter } from "./adapter-zLXT8Yxm-BX8ynGWu.mjs";
1
+ import { r as postgresRawCodecInferer, t as createPostgresAdapter } from "./adapter-CBoNuaSX-Lqzxy-Qt.mjs";
2
2
  export { createPostgresAdapter, postgresRawCodecInferer };
@@ -2,5 +2,5 @@ import { o as createPostgresBuiltinCodecLookup, s as createPostgresCodecRegistry
2
2
  import { t as parsePostgresDefault } from "./default-normalizer-ZZ7Y5boE.mjs";
3
3
  import { i as normalizeSchemaNativeType } from "./native-type-normalizer-BFo5tSyh.mjs";
4
4
  import { i as quoteIdentifier, r as qualifyName, t as escapeLiteral } from "./sql-utils-DqFxskY6.mjs";
5
- import { n as postgresAdapterDescriptor, t as PostgresControlAdapter } from "./control-CoZVI8XA.mjs";
5
+ import { n as postgresAdapterDescriptor, t as PostgresControlAdapter } from "./control-RTK8NJRT.mjs";
6
6
  export { PostgresControlAdapter, createPostgresBuiltinCodecLookup, createPostgresCodecRegistryWithBuiltins, postgresAdapterDescriptor as default, escapeLiteral, normalizeSchemaNativeType, parsePostgresDefault, qualifyName, quoteIdentifier };
@@ -4,8 +4,8 @@ import { a as instantNowControlDescriptor, s as plainDateTimeNowControlDescripto
4
4
  import { t as parsePostgresDefault } from "./default-normalizer-Cb7nWBUa-DXchlOUk.mjs";
5
5
  import { n as normalizeSchemaNativeType } from "./native-type-normalizer-CW6g9Fut-C5lMRRjS.mjs";
6
6
  import { t as postgresDataTypeEntries } from "./data-type-entries-BDSHvsdE-Bbe1cdbR.mjs";
7
- import { n as postgresScalarAuthoringTypes, t as postgresNativeAuthoringTypes } from "./control-9MzjJLOE.mjs";
8
- import { t as PostgresControlAdapter } from "./control-adapter-DlHDFQw4-Awa40s5_.mjs";
7
+ import { n as postgresScalarAuthoringTypes, t as postgresNativeAuthoringTypes } from "./control-xdedZDo5.mjs";
8
+ import { t as PostgresControlAdapter } from "./control-adapter-Rzj1Wx4j-om2RNriu.mjs";
9
9
  import { t as postgresAdapterDescriptorMeta } from "./descriptor-meta-BEigA5Gj-BJLRWRFj.mjs";
10
10
  import { timestampNowControlDescriptor } from "@prisma/orm-framework/components/control";
11
11
  import { int, num, oneOf, optional } from "@prisma/orm-framework/psl-parser";
@@ -1 +1 @@
1
- {"version":3,"file":"adapter__control.mjs","names":[],"sources":["../../../../3-targets/6-adapters/postgres/dist/control.mjs"],"sourcesContent":["import { t as PostgresControlAdapter } from \"./control-adapter-DlHDFQw4.mjs\";\nimport { t as postgresAdapterDescriptorMeta } from \"./descriptor-meta-BEigA5Gj.mjs\";\nimport { timestampNowControlDescriptor } from \"@internal/framework-components/control\";\nimport { assemblePostgresCodecRegistry, createPostgresBuiltinCodecLookup, createPostgresCodecRegistryWithBuiltins } from \"@internal/target-postgres/codecs\";\nimport { parsePostgresDefault } from \"@internal/target-postgres/default-normalizer\";\nimport { normalizeSchemaNativeType } from \"@internal/target-postgres/native-type-normalizer\";\nimport { escapeLiteral, qualifyName, quoteIdentifier } from \"@internal/target-postgres/sql-utils\";\nimport { postgresDataTypeEntries } from \"@internal/target-postgres/data-types\";\nimport { builtinGeneratorRegistryMetadata } from \"@internal/ids\";\nimport { int, num, oneOf, optional } from \"@internal/psl-parser\";\nimport { instantNowControlDescriptor, plainDateTimeNowControlDescriptor, postgresNativeAuthoringTypes, postgresScalarAuthoringTypes } from \"@internal/target-postgres/control\";\n//#region src/core/control-mutation-defaults.ts\nfunction executionGenerator(id, params) {\n\treturn {\n\t\tok: true,\n\t\tvalue: {\n\t\t\tkind: \"execution\",\n\t\t\tgenerated: {\n\t\t\t\tkind: \"generator\",\n\t\t\t\tid,\n\t\t\t\t...params ? { params } : {}\n\t\t\t}\n\t\t}\n\t};\n}\nfunction lowerAutoincrement() {\n\treturn {\n\t\tok: true,\n\t\tvalue: {\n\t\t\tkind: \"storage\",\n\t\t\tdefaultValue: {\n\t\t\t\tkind: \"function\",\n\t\t\t\texpression: \"autoincrement()\"\n\t\t\t}\n\t\t}\n\t};\n}\nfunction lowerNow() {\n\treturn {\n\t\tok: true,\n\t\tvalue: {\n\t\t\tkind: \"storage\",\n\t\t\tdefaultValue: {\n\t\t\t\tkind: \"function\",\n\t\t\t\texpression: \"now()\"\n\t\t\t}\n\t\t}\n\t};\n}\nfunction lowerUlid() {\n\treturn executionGenerator(\"ulid\");\n}\nfunction lowerUuid(input) {\n\treturn input.call.args[\"version\"] === 7 ? executionGenerator(\"uuidv7\") : executionGenerator(\"uuidv4\");\n}\nfunction lowerCuid() {\n\treturn executionGenerator(\"cuid2\");\n}\nfunction lowerNanoid(input) {\n\tconst size = input.call.args[\"size\"];\n\treturn typeof size === \"number\" ? executionGenerator(\"nanoid\", { size }) : executionGenerator(\"nanoid\");\n}\nconst nowSig = { documentation: \"Uses the current database timestamp as the default value.\" };\nconst autoincrementSig = { documentation: \"Generates an increasing integer value in the database.\" };\nconst ulidSig = { documentation: \"Generates a ULID when a value is not supplied.\" };\nconst uuidSig = {\n\tdocumentation: \"Generates a UUID when a value is not supplied.\",\n\tpositional: [{\n\t\tkey: \"version\",\n\t\ttype: optional(oneOf(num(4), num(7))),\n\t\tdocumentation: \"The UUID version: `4` or `7`. Defaults to `4`.\"\n\t}]\n};\nconst cuidSig = {\n\tdocumentation: \"Generates a CUID2 identifier when a value is not supplied.\",\n\tpositional: [{\n\t\tkey: \"version\",\n\t\ttype: num(2),\n\t\tdocumentation: \"The CUID version. Only `2` is supported.\"\n\t}]\n};\nconst nanoidSig = {\n\tdocumentation: \"Generates a Nano ID when a value is not supplied.\",\n\tpositional: [{\n\t\tkey: \"size\",\n\t\ttype: optional(int({\n\t\t\tmin: 2,\n\t\t\tmax: 255\n\t\t})),\n\t\tdocumentation: \"The identifier length, from `2` through `255`. Omit to use the generator default.\"\n\t}]\n};\nconst postgresDefaultFunctionRegistryEntries = [\n\t[\"autoincrement\", {\n\t\tsignature: autoincrementSig,\n\t\tlower: lowerAutoincrement,\n\t\tusageSignatures: [\"autoincrement()\"]\n\t}],\n\t[\"now\", {\n\t\tsignature: nowSig,\n\t\tlower: lowerNow,\n\t\tusageSignatures: [\"now()\"]\n\t}],\n\t[\"uuid\", {\n\t\tsignature: uuidSig,\n\t\tlower: lowerUuid,\n\t\tusageSignatures: [\n\t\t\t\"uuid()\",\n\t\t\t\"uuid(4)\",\n\t\t\t\"uuid(7)\"\n\t\t]\n\t}],\n\t[\"cuid\", {\n\t\tsignature: cuidSig,\n\t\tlower: lowerCuid,\n\t\tusageSignatures: [\"cuid(2)\"]\n\t}],\n\t[\"ulid\", {\n\t\tsignature: ulidSig,\n\t\tlower: lowerUlid,\n\t\tusageSignatures: [\"ulid()\"]\n\t}],\n\t[\"nanoid\", {\n\t\tsignature: nanoidSig,\n\t\tlower: lowerNanoid,\n\t\tusageSignatures: [\"nanoid()\", \"nanoid(<2-255>)\"]\n\t}]\n];\nconst postgresAuthoringTypes = {\n\t...postgresScalarAuthoringTypes,\n\t...postgresNativeAuthoringTypes\n};\nfunction createPostgresDefaultFunctionRegistry() {\n\treturn new Map(postgresDefaultFunctionRegistryEntries);\n}\nfunction createPostgresMutationDefaultGeneratorDescriptors() {\n\treturn [\n\t\t...builtinGeneratorRegistryMetadata.map(({ id, applicableCodecIds }) => ({\n\t\t\tid,\n\t\t\tapplicableCodecIds\n\t\t})),\n\t\ttimestampNowControlDescriptor(),\n\t\tinstantNowControlDescriptor(),\n\t\tplainDateTimeNowControlDescriptor()\n\t];\n}\n//#endregion\n//#region src/exports/control.ts\nconst postgresAdapterDescriptor = {\n\t...postgresAdapterDescriptorMeta,\n\tauthoring: {\n\t\ttype: postgresAuthoringTypes,\n\t\tdataTypes: postgresDataTypeEntries(),\n\t\tvalueObjectStorageType: \"Jsonb\"\n\t},\n\tcontrolMutationDefaults: {\n\t\tdefaultFunctionRegistry: createPostgresDefaultFunctionRegistry(),\n\t\tgeneratorDescriptors: createPostgresMutationDefaultGeneratorDescriptors()\n\t},\n\tcreate(stack) {\n\t\treturn new PostgresControlAdapter(assemblePostgresCodecRegistry([\n\t\t\tstack.target,\n\t\t\t...stack.adapter === void 0 ? [] : [stack.adapter],\n\t\t\t...stack.extensions\n\t\t]));\n\t}\n};\n//#endregion\nexport { PostgresControlAdapter, createPostgresBuiltinCodecLookup, createPostgresCodecRegistryWithBuiltins, postgresAdapterDescriptor as default, escapeLiteral, normalizeSchemaNativeType, parsePostgresDefault, qualifyName, quoteIdentifier };\n\n//# sourceMappingURL=control.mjs.map"],"mappings":";;;;;;;;;;;;;AAYA,SAAS,mBAAmB,IAAI,QAAQ;CACvC,OAAO;EACN,IAAI;EACJ,OAAO;GACN,MAAM;GACN,WAAW;IACV,MAAM;IACN;IACA,GAAG,SAAS,EAAE,OAAO,IAAI,CAAC;GAC3B;EACD;CACD;AACD;AACA,SAAS,qBAAqB;CAC7B,OAAO;EACN,IAAI;EACJ,OAAO;GACN,MAAM;GACN,cAAc;IACb,MAAM;IACN,YAAY;GACb;EACD;CACD;AACD;AACA,SAAS,WAAW;CACnB,OAAO;EACN,IAAI;EACJ,OAAO;GACN,MAAM;GACN,cAAc;IACb,MAAM;IACN,YAAY;GACb;EACD;CACD;AACD;AACA,SAAS,YAAY;CACpB,OAAO,mBAAmB,MAAM;AACjC;AACA,SAAS,UAAU,OAAO;CACzB,OAAO,MAAM,KAAK,KAAK,eAAe,IAAI,mBAAmB,QAAQ,IAAI,mBAAmB,QAAQ;AACrG;AACA,SAAS,YAAY;CACpB,OAAO,mBAAmB,OAAO;AAClC;AACA,SAAS,YAAY,OAAO;CAC3B,MAAM,OAAO,MAAM,KAAK,KAAK;CAC7B,OAAO,OAAO,SAAS,WAAW,mBAAmB,UAAU,EAAE,KAAK,CAAC,IAAI,mBAAmB,QAAQ;AACvG;AACA,MAAM,SAAS,EAAE,eAAe,4DAA4D;AAC5F,MAAM,mBAAmB,EAAE,eAAe,yDAAyD;AACnG,MAAM,UAAU,EAAE,eAAe,iDAAiD;AAClF,MAAM,UAAU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AwB;EACnC,wBAAwB;CACzB;CACA,yBAAyB;EACxB,yBAAyB,sCAAsC;EAC/D,sBAAsB,kDAAkD;CACzE;CACA,OAAO,OAAO;EACb,OAAO,IAAI,uBAAuB,8BAA8B;GAC/D,MAAM;GACN,GAAG,MAAM,YAAY,KAAK,IAAI,CAAC,IAAI,CAAC,MAAM,OAAO;GACjD,GAAG,MAAM;EACV,CAAC,CAAC;CACH;AACD"}
1
+ {"version":3,"file":"adapter__control.mjs","names":[],"sources":["../../../../3-targets/6-adapters/postgres/dist/control.mjs"],"sourcesContent":["import { t as PostgresControlAdapter } from \"./control-adapter-Rzj1Wx4j.mjs\";\nimport { t as postgresAdapterDescriptorMeta } from \"./descriptor-meta-BEigA5Gj.mjs\";\nimport { timestampNowControlDescriptor } from \"@internal/framework-components/control\";\nimport { assemblePostgresCodecRegistry, createPostgresBuiltinCodecLookup, createPostgresCodecRegistryWithBuiltins } from \"@internal/target-postgres/codecs\";\nimport { parsePostgresDefault } from \"@internal/target-postgres/default-normalizer\";\nimport { normalizeSchemaNativeType } from \"@internal/target-postgres/native-type-normalizer\";\nimport { escapeLiteral, qualifyName, quoteIdentifier } from \"@internal/target-postgres/sql-utils\";\nimport { postgresDataTypeEntries } from \"@internal/target-postgres/data-types\";\nimport { builtinGeneratorRegistryMetadata } from \"@internal/ids\";\nimport { int, num, oneOf, optional } from \"@internal/psl-parser\";\nimport { instantNowControlDescriptor, plainDateTimeNowControlDescriptor, postgresNativeAuthoringTypes, postgresScalarAuthoringTypes } from \"@internal/target-postgres/control\";\n//#region src/core/control-mutation-defaults.ts\nfunction executionGenerator(id, params) {\n\treturn {\n\t\tok: true,\n\t\tvalue: {\n\t\t\tkind: \"execution\",\n\t\t\tgenerated: {\n\t\t\t\tkind: \"generator\",\n\t\t\t\tid,\n\t\t\t\t...params ? { params } : {}\n\t\t\t}\n\t\t}\n\t};\n}\nfunction lowerAutoincrement() {\n\treturn {\n\t\tok: true,\n\t\tvalue: {\n\t\t\tkind: \"storage\",\n\t\t\tdefaultValue: {\n\t\t\t\tkind: \"function\",\n\t\t\t\texpression: \"autoincrement()\"\n\t\t\t}\n\t\t}\n\t};\n}\nfunction lowerNow() {\n\treturn {\n\t\tok: true,\n\t\tvalue: {\n\t\t\tkind: \"storage\",\n\t\t\tdefaultValue: {\n\t\t\t\tkind: \"function\",\n\t\t\t\texpression: \"now()\"\n\t\t\t}\n\t\t}\n\t};\n}\nfunction lowerUlid() {\n\treturn executionGenerator(\"ulid\");\n}\nfunction lowerUuid(input) {\n\treturn input.call.args[\"version\"] === 7 ? executionGenerator(\"uuidv7\") : executionGenerator(\"uuidv4\");\n}\nfunction lowerCuid() {\n\treturn executionGenerator(\"cuid2\");\n}\nfunction lowerNanoid(input) {\n\tconst size = input.call.args[\"size\"];\n\treturn typeof size === \"number\" ? executionGenerator(\"nanoid\", { size }) : executionGenerator(\"nanoid\");\n}\nconst nowSig = { documentation: \"Uses the current database timestamp as the default value.\" };\nconst autoincrementSig = { documentation: \"Generates an increasing integer value in the database.\" };\nconst ulidSig = { documentation: \"Generates a ULID when a value is not supplied.\" };\nconst uuidSig = {\n\tdocumentation: \"Generates a UUID when a value is not supplied.\",\n\tpositional: [{\n\t\tkey: \"version\",\n\t\ttype: optional(oneOf(num(4), num(7))),\n\t\tdocumentation: \"The UUID version: `4` or `7`. Defaults to `4`.\"\n\t}]\n};\nconst cuidSig = {\n\tdocumentation: \"Generates a CUID2 identifier when a value is not supplied.\",\n\tpositional: [{\n\t\tkey: \"version\",\n\t\ttype: num(2),\n\t\tdocumentation: \"The CUID version. Only `2` is supported.\"\n\t}]\n};\nconst nanoidSig = {\n\tdocumentation: \"Generates a Nano ID when a value is not supplied.\",\n\tpositional: [{\n\t\tkey: \"size\",\n\t\ttype: optional(int({\n\t\t\tmin: 2,\n\t\t\tmax: 255\n\t\t})),\n\t\tdocumentation: \"The identifier length, from `2` through `255`. Omit to use the generator default.\"\n\t}]\n};\nconst postgresDefaultFunctionRegistryEntries = [\n\t[\"autoincrement\", {\n\t\tsignature: autoincrementSig,\n\t\tlower: lowerAutoincrement,\n\t\tusageSignatures: [\"autoincrement()\"]\n\t}],\n\t[\"now\", {\n\t\tsignature: nowSig,\n\t\tlower: lowerNow,\n\t\tusageSignatures: [\"now()\"]\n\t}],\n\t[\"uuid\", {\n\t\tsignature: uuidSig,\n\t\tlower: lowerUuid,\n\t\tusageSignatures: [\n\t\t\t\"uuid()\",\n\t\t\t\"uuid(4)\",\n\t\t\t\"uuid(7)\"\n\t\t]\n\t}],\n\t[\"cuid\", {\n\t\tsignature: cuidSig,\n\t\tlower: lowerCuid,\n\t\tusageSignatures: [\"cuid(2)\"]\n\t}],\n\t[\"ulid\", {\n\t\tsignature: ulidSig,\n\t\tlower: lowerUlid,\n\t\tusageSignatures: [\"ulid()\"]\n\t}],\n\t[\"nanoid\", {\n\t\tsignature: nanoidSig,\n\t\tlower: lowerNanoid,\n\t\tusageSignatures: [\"nanoid()\", \"nanoid(<2-255>)\"]\n\t}]\n];\nconst postgresAuthoringTypes = {\n\t...postgresScalarAuthoringTypes,\n\t...postgresNativeAuthoringTypes\n};\nfunction createPostgresDefaultFunctionRegistry() {\n\treturn new Map(postgresDefaultFunctionRegistryEntries);\n}\nfunction createPostgresMutationDefaultGeneratorDescriptors() {\n\treturn [\n\t\t...builtinGeneratorRegistryMetadata.map(({ id, applicableCodecIds }) => ({\n\t\t\tid,\n\t\t\tapplicableCodecIds\n\t\t})),\n\t\ttimestampNowControlDescriptor(),\n\t\tinstantNowControlDescriptor(),\n\t\tplainDateTimeNowControlDescriptor()\n\t];\n}\n//#endregion\n//#region src/exports/control.ts\nconst postgresAdapterDescriptor = {\n\t...postgresAdapterDescriptorMeta,\n\tauthoring: {\n\t\ttype: postgresAuthoringTypes,\n\t\tdataTypes: postgresDataTypeEntries(),\n\t\tvalueObjectStorageType: \"Jsonb\"\n\t},\n\tcontrolMutationDefaults: {\n\t\tdefaultFunctionRegistry: createPostgresDefaultFunctionRegistry(),\n\t\tgeneratorDescriptors: createPostgresMutationDefaultGeneratorDescriptors()\n\t},\n\tcreate(stack) {\n\t\treturn new PostgresControlAdapter(assemblePostgresCodecRegistry([\n\t\t\tstack.target,\n\t\t\t...stack.adapter === void 0 ? [] : [stack.adapter],\n\t\t\t...stack.extensions\n\t\t]));\n\t}\n};\n//#endregion\nexport { PostgresControlAdapter, createPostgresBuiltinCodecLookup, createPostgresCodecRegistryWithBuiltins, postgresAdapterDescriptor as default, escapeLiteral, normalizeSchemaNativeType, parsePostgresDefault, qualifyName, quoteIdentifier };\n\n//# sourceMappingURL=control.mjs.map"],"mappings":";;;;;;;;;;;;;AAYA,SAAS,mBAAmB,IAAI,QAAQ;CACvC,OAAO;EACN,IAAI;EACJ,OAAO;GACN,MAAM;GACN,WAAW;IACV,MAAM;IACN;IACA,GAAG,SAAS,EAAE,OAAO,IAAI,CAAC;GAC3B;EACD;CACD;AACD;AACA,SAAS,qBAAqB;CAC7B,OAAO;EACN,IAAI;EACJ,OAAO;GACN,MAAM;GACN,cAAc;IACb,MAAM;IACN,YAAY;GACb;EACD;CACD;AACD;AACA,SAAS,WAAW;CACnB,OAAO;EACN,IAAI;EACJ,OAAO;GACN,MAAM;GACN,cAAc;IACb,MAAM;IACN,YAAY;GACb;EACD;CACD;AACD;AACA,SAAS,YAAY;CACpB,OAAO,mBAAmB,MAAM;AACjC;AACA,SAAS,UAAU,OAAO;CACzB,OAAO,MAAM,KAAK,KAAK,eAAe,IAAI,mBAAmB,QAAQ,IAAI,mBAAmB,QAAQ;AACrG;AACA,SAAS,YAAY;CACpB,OAAO,mBAAmB,OAAO;AAClC;AACA,SAAS,YAAY,OAAO;CAC3B,MAAM,OAAO,MAAM,KAAK,KAAK;CAC7B,OAAO,OAAO,SAAS,WAAW,mBAAmB,UAAU,EAAE,KAAK,CAAC,IAAI,mBAAmB,QAAQ;AACvG;AACA,MAAM,SAAS,EAAE,eAAe,4DAA4D;AAC5F,MAAM,mBAAmB,EAAE,eAAe,yDAAyD;A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AA4B;CACjC,GAAG;CACH,WAAW;EACV,MAAM;EACN,WAAW,wBAAwB;EACnC,wBAAwB;CACzB;CACA,yBAAyB;EACxB,yBAAyB,sCAAsC;EAC/D,sBAAsB,kDAAkD;CACzE;CACA,OAAO,OAAO;EACb,OAAO,IAAI,uBAAuB,8BAA8B;GAC/D,MAAM;GACN,GAAG,MAAM,YAAY,KAAK,IAAI,CAAC,IAAI,CAAC,MAAM,OAAO;GACjD,GAAG,MAAM;EACV,CAAC,CAAC;CACH;AACD"}
@@ -1,6 +1,6 @@
1
1
  import { o as postgresCodecRegistry, t as assemblePostgresCodecRegistry } from "./codecs-DMPbfU3s.mjs";
2
2
  import { i as instantNow, n as PLAIN_DATE_TIME_NOW_GENERATOR_ID, o as plainDateTimeNow, t as INSTANT_NOW_GENERATOR_ID } from "./authoring-DULm2ZZP-DgykBF-F.mjs";
3
- import { n as createPostgresAdapterWithCodecRegistry, r as postgresRawCodecInferer } from "./adapter-zLXT8Yxm-BX8ynGWu.mjs";
3
+ import { n as createPostgresAdapterWithCodecRegistry, r as postgresRawCodecInferer } from "./adapter-CBoNuaSX-Lqzxy-Qt.mjs";
4
4
  import { t as postgresAdapterDescriptorMeta } from "./descriptor-meta-BEigA5Gj-BJLRWRFj.mjs";
5
5
  import { builtinGeneratorIds } from "@prisma/orm-framework/ids";
6
6
  import { timestampNowRuntimeGenerator } from "@prisma/orm-family-sql/family/runtime";
@@ -1 +1 @@
1
- {"version":3,"file":"adapter__runtime.mjs","names":[],"sources":["../../../../3-targets/6-adapters/postgres/dist/runtime.mjs"],"sourcesContent":["import { n as createPostgresAdapterWithCodecRegistry, r as postgresRawCodecInferer } from \"./adapter-zLXT8Yxm.mjs\";\nimport { t as postgresAdapterDescriptorMeta } from \"./descriptor-meta-BEigA5Gj.mjs\";\nimport { assemblePostgresCodecRegistry, postgresCodecRegistry } from \"@internal/target-postgres/codecs\";\nimport { builtinGeneratorIds } from \"@internal/ids\";\nimport { timestampNowRuntimeGenerator } from \"@internal/family-sql/runtime\";\nimport { generateId } from \"@internal/ids/runtime\";\nimport { INSTANT_NOW_GENERATOR_ID, PLAIN_DATE_TIME_NOW_GENERATOR_ID, instantNow, plainDateTimeNow } from \"@internal/target-postgres/runtime\";\n//#region src/exports/runtime.ts\nfunction createPostgresMutationDefaultGenerators() {\n\treturn [\n\t\t...builtinGeneratorIds.map((id) => ({\n\t\t\tid,\n\t\t\tgenerate: (params) => {\n\t\t\t\treturn generateId(params ? {\n\t\t\t\t\tid,\n\t\t\t\t\tparams\n\t\t\t\t} : { id });\n\t\t\t},\n\t\t\tstability: \"field\"\n\t\t})),\n\t\ttimestampNowRuntimeGenerator(),\n\t\t{\n\t\t\tid: INSTANT_NOW_GENERATOR_ID,\n\t\t\tgenerate: () => instantNow(),\n\t\t\tstability: \"query\"\n\t\t},\n\t\t{\n\t\t\tid: PLAIN_DATE_TIME_NOW_GENERATOR_ID,\n\t\t\tgenerate: () => plainDateTimeNow(),\n\t\t\tstability: \"query\"\n\t\t}\n\t];\n}\nconst postgresRuntimeAdapterDescriptor = {\n\t...postgresAdapterDescriptorMeta,\n\tcodecs: () => Array.from(postgresCodecRegistry.values()),\n\tmutationDefaultGenerators: createPostgresMutationDefaultGenerators,\n\trawCodecInferer: postgresRawCodecInferer,\n\tcreate(stack) {\n\t\treturn createPostgresAdapterWithCodecRegistry(assemblePostgresCodecRegistry([\n\t\t\tstack.target,\n\t\t\tstack.adapter,\n\t\t\t...stack.extensions\n\t\t]));\n\t}\n};\n//#endregion\nexport { postgresRuntimeAdapterDescriptor as default };\n\n//# sourceMappingURL=runtime.mjs.map"],"mappings":";;;;;;;;AAQA,SAAS,0CAA0C;CAClD,OAAO;EACN,GAAG,oBAAoB,KAAK,QAAQ;GACnC;GACA,WAAW,WAAW;IACrB,OAAO,WAAW,SAAS;KAC1B;KACA;IACD,IAAI,EAAE,GAAG,CAAC;GACX;GACA,WAAW;EACZ,EAAE;EACF,6BAA6B;EAC7B;GACC,IAAI;GACJ,gBAAgB,WAAW;GAC3B,WAAW;EACZ;EACA;GACC,IAAI;GACJ,gBAAgB,iBAAiB;GACjC,WAAW;EACZ;CACD;AACD;AACA,MAAM,mCAAmC;CACxC,GAAG;CACH,cAAc,MAAM,KAAK,sBAAsB,OAAO,CAAC;CACvD,2BAA2B;CAC3B,iBAAiB;CACjB,OAAO,OAAO;EACb,OAAO,uCAAuC,8BAA8B;GAC3E,MAAM;GACN,MAAM;GACN,GAAG,MAAM;EACV,CAAC,CAAC;CACH;AACD"}
1
+ {"version":3,"file":"adapter__runtime.mjs","names":[],"sources":["../../../../3-targets/6-adapters/postgres/dist/runtime.mjs"],"sourcesContent":["import { n as createPostgresAdapterWithCodecRegistry, r as postgresRawCodecInferer } from \"./adapter-CBoNuaSX.mjs\";\nimport { t as postgresAdapterDescriptorMeta } from \"./descriptor-meta-BEigA5Gj.mjs\";\nimport { assemblePostgresCodecRegistry, postgresCodecRegistry } from \"@internal/target-postgres/codecs\";\nimport { builtinGeneratorIds } from \"@internal/ids\";\nimport { timestampNowRuntimeGenerator } from \"@internal/family-sql/runtime\";\nimport { generateId } from \"@internal/ids/runtime\";\nimport { INSTANT_NOW_GENERATOR_ID, PLAIN_DATE_TIME_NOW_GENERATOR_ID, instantNow, plainDateTimeNow } from \"@internal/target-postgres/runtime\";\n//#region src/exports/runtime.ts\nfunction createPostgresMutationDefaultGenerators() {\n\treturn [\n\t\t...builtinGeneratorIds.map((id) => ({\n\t\t\tid,\n\t\t\tgenerate: (params) => {\n\t\t\t\treturn generateId(params ? {\n\t\t\t\t\tid,\n\t\t\t\t\tparams\n\t\t\t\t} : { id });\n\t\t\t},\n\t\t\tstability: \"field\"\n\t\t})),\n\t\ttimestampNowRuntimeGenerator(),\n\t\t{\n\t\t\tid: INSTANT_NOW_GENERATOR_ID,\n\t\t\tgenerate: () => instantNow(),\n\t\t\tstability: \"query\"\n\t\t},\n\t\t{\n\t\t\tid: PLAIN_DATE_TIME_NOW_GENERATOR_ID,\n\t\t\tgenerate: () => plainDateTimeNow(),\n\t\t\tstability: \"query\"\n\t\t}\n\t];\n}\nconst postgresRuntimeAdapterDescriptor = {\n\t...postgresAdapterDescriptorMeta,\n\tcodecs: () => Array.from(postgresCodecRegistry.values()),\n\tmutationDefaultGenerators: createPostgresMutationDefaultGenerators,\n\trawCodecInferer: postgresRawCodecInferer,\n\tcreate(stack) {\n\t\treturn createPostgresAdapterWithCodecRegistry(assemblePostgresCodecRegistry([\n\t\t\tstack.target,\n\t\t\tstack.adapter,\n\t\t\t...stack.extensions\n\t\t]));\n\t}\n};\n//#endregion\nexport { postgresRuntimeAdapterDescriptor as default };\n\n//# sourceMappingURL=runtime.mjs.map"],"mappings":";;;;;;;;AAQA,SAAS,0CAA0C;CAClD,OAAO;EACN,GAAG,oBAAoB,KAAK,QAAQ;GACnC;GACA,WAAW,WAAW;IACrB,OAAO,WAAW,SAAS;KAC1B;KACA;IACD,IAAI,EAAE,GAAG,CAAC;GACX;GACA,WAAW;EACZ,EAAE;EACF,6BAA6B;EAC7B;GACC,IAAI;GACJ,gBAAgB,WAAW;GAC3B,WAAW;EACZ;EACA;GACC,IAAI;GACJ,gBAAgB,iBAAiB;GACjC,WAAW;EACZ;CACD;AACD;AACA,MAAM,mCAAmC;CACxC,GAAG;CACH,cAAc,MAAM,KAAK,sBAAsB,OAAO,CAAC;CACvD,2BAA2B;CAC3B,iBAAiB;CACjB,OAAO,OAAO;EACb,OAAO,uCAAuC,8BAA8B;GAC3E,MAAM;GACN,MAAM;GACN,GAAG,MAAM;EACV,CAAC,CAAC;CACH;AACD"}
@@ -1,6 +1,6 @@
1
1
  import { C as PG_TIMESTAMPTZ_DATE_CODEC_ID, S as PG_TEXT_CODEC_ID, m as PG_INT8_CODEC_ID, p as PG_INT4_CODEC_ID, v as PG_JSONB_CODEC_ID, w as PG_TIMESTAMPTZ_STRING_CODEC_ID, x as PG_TEXT_ARRAY_CODEC_ID } from "./codec-ids-Cb0yO-IS--e0P2rfI.mjs";
2
2
  import { l as PostgresTableSource } from "./postgres-schema-C8slJGZo-CFGUyJPt.mjs";
3
- import { f as createSchema, p as createTable } from "./ddl-C6M0Hkbe-BSSauy2X.mjs";
3
+ import { f as createSchema, p as createTable } from "./ddl-BQFDVert-CcDdETee.mjs";
4
4
  import { APP_SPACE_ID } from "@prisma/orm-framework/components/control";
5
5
  import { col, fn, lit, table } from "@prisma/orm-family-sql/relational-core/contract-free";
6
6
  //#region ../../../3-targets/3-targets/postgres/dist/contract-free.mjs
@@ -116,4 +116,4 @@ function buildControlTableBootstrapQueries() {
116
116
  //#endregion
117
117
  export { jsonb as a, textArray as c, int8 as i, timestamptz as l, buildSignMarkerBootstrapQueries as n, pgTable as o, int4 as r, text as s, buildControlTableBootstrapQueries as t, timestamptzJsDate as u };
118
118
 
119
- //# sourceMappingURL=contract-free-C0GQe4X_.mjs.map
119
+ //# sourceMappingURL=contract-free-DeK6m1dy.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"contract-free-C0GQe4X_.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/contract-free.mjs"],"sourcesContent":["import { C as PG_TIMESTAMPTZ_DATE_CODEC_ID, S as PG_TEXT_CODEC_ID, m as PG_INT8_CODEC_ID, p as PG_INT4_CODEC_ID, v as PG_JSONB_CODEC_ID, w as PG_TIMESTAMPTZ_STRING_CODEC_ID, x as PG_TEXT_ARRAY_CODEC_ID } from \"./codec-ids-Cb0yO-IS.mjs\";\nimport { u as PostgresTableSource } from \"./postgres-schema-C8slJGZo.mjs\";\nimport { A as toRegclass, D as tableExistsAst, E as rlsPolicyExistsAst, O as tableIsEmptyAst, T as rlsEnabledAst, _ as columnNullabilityAst, b as extensionExistsAst, c as createTable, d as dropDefaultAction, g as columnExistsAst, h as columnDefaultAst, i as alterTable, k as tablePrimaryKeyAst, s as createSchema, t as addColumnAction, v as columnTypeAst, w as noNullValuesAst, x as indexExistsAst, y as constraintExistsAst } from \"./ddl-C6M0Hkbe.mjs\";\nimport { APP_SPACE_ID } from \"@internal/framework-components/control\";\nimport { col, fn, lit, table } from \"@internal/sql-relational-core/contract-free\";\n//#region src/contract-free/columns.ts\nconst desc = (codecId, opts) => ({\n\tcodecId,\n\tnullable: opts?.nullable ?? false\n});\nconst text = (opts) => desc(PG_TEXT_CODEC_ID, opts);\nconst int4 = (opts) => desc(PG_INT4_CODEC_ID, opts);\nconst int8 = (opts) => desc(PG_INT8_CODEC_ID, opts);\nconst jsonb = (opts) => desc(PG_JSONB_CODEC_ID, opts);\nconst textArray = (opts) => desc(PG_TEXT_ARRAY_CODEC_ID, opts);\nconst timestamptz = (opts) => desc(PG_TIMESTAMPTZ_STRING_CODEC_ID, opts);\nconst timestamptzJsDate = (opts) => desc(PG_TIMESTAMPTZ_DATE_CODEC_ID, opts);\n/**\n* Declare a PostgreSQL control-plane table with a typed column schema. Wraps\n* the generic `table()` factory with a `PostgresTableSource` so the renderer\n* qualifies the table name with the optional schema prefix.\n*\n* ```ts\n* const marker = pgTable(\n* { name: 'marker', schema: 'prisma_contract' },\n* { space: text(), core_hash: text(), updated_at: timestamptz() },\n* );\n* ```\n*/\nfunction pgTable(source, columns) {\n\treturn table(new PostgresTableSource(source), columns);\n}\n//#endregion\n//#region src/contract-free/control-bootstrap.ts\nconst markerColumns = [\n\tcol(\"space\", \"text\", {\n\t\tnotNull: true,\n\t\tprimaryKey: true,\n\t\tdefault: lit(APP_SPACE_ID)\n\t}),\n\tcol(\"core_hash\", \"text\", { notNull: true }),\n\tcol(\"profile_hash\", \"text\", { notNull: true }),\n\tcol(\"contract_json\", \"jsonb\"),\n\tcol(\"canonical_version\", \"int\"),\n\tcol(\"updated_at\", \"timestamptz\", {\n\t\tnotNull: true,\n\t\tdefault: fn(\"now()\")\n\t}),\n\tcol(\"app_tag\", \"text\"),\n\tcol(\"meta\", \"jsonb\", {\n\t\tnotNull: true,\n\t\tdefault: lit(\"{}\")\n\t}),\n\tcol(\"invariants\", \"text[]\", {\n\t\tnotNull: true,\n\t\tdefault: lit(\"{}\")\n\t})\n];\nconst ledgerColumns = [\n\tcol(\"id\", \"bigserial\", { primaryKey: true }),\n\tcol(\"created_at\", \"timestamptz\", {\n\t\tnotNull: true,\n\t\tdefault: fn(\"now()\")\n\t}),\n\tcol(\"space\", \"text\", { notNull: true }),\n\tcol(\"migration_name\", \"text\", { notNull: true }),\n\tcol(\"migration_hash\", \"text\", { notNull: true }),\n\tcol(\"origin_core_hash\", \"text\"),\n\tcol(\"origin_profile_hash\", \"text\"),\n\tcol(\"destination_core_hash\", \"text\", { notNull: true }),\n\tcol(\"destination_profile_hash\", \"text\"),\n\tcol(\"operations\", \"jsonb\", { notNull: true })\n];\nconst contractColumns = [\n\tcol(\"core_hash\", \"text\", {\n\t\tnotNull: true,\n\t\tprimaryKey: true\n\t}),\n\tcol(\"created_at\", \"timestamptz\", {\n\t\tnotNull: true,\n\t\tdefault: fn(\"now()\")\n\t}),\n\tcol(\"contract_json\", \"jsonb\", { notNull: true })\n];\nconst markerTable = createTable({\n\tschema: \"prisma_contract\",\n\ttable: \"marker\",\n\tifNotExists: true,\n\tcolumns: markerColumns\n});\nconst ledgerTable = createTable({\n\tschema: \"prisma_contract\",\n\ttable: \"ledger\",\n\tifNotExists: true,\n\tcolumns: ledgerColumns\n});\nconst contractTable = createTable({\n\tschema: \"prisma_contract\",\n\ttable: \"contract\",\n\tifNotExists: true,\n\tcolumns: contractColumns\n});\nconst controlSchema = createSchema({\n\tschema: \"prisma_contract\",\n\tifNotExists: true\n});\nfunction buildSignMarkerBootstrapQueries() {\n\treturn [controlSchema, markerTable];\n}\nfunction buildControlTableBootstrapQueries() {\n\treturn [\n\t\tcontrolSchema,\n\t\tmarkerTable,\n\t\tledgerTable,\n\t\tcontractTable\n\t];\n}\n//#endregion\nexport { 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 };\n\n//# sourceMappingURL=contract-free.mjs.map"],"mappings":";;;;;;AAMA,MAAM,QAAQ,SAAS,UAAU;CAChC;CACA,UAAU,MAAM,YAAY;AAC7B;AACA,MAAM,QAAQ,SAAS,KAAK,kBAAkB,IAAI;AAClD,MAAM,QAAQ,SAAS,KAAK,kBAAkB,IAAI;AAClD,MAAM,QAAQ,SAAS,KAAK,kBAAkB,IAAI;AAClD,MAAM,SAAS,SAAS,KAAK,mBAAmB,IAAI;AACpD,MAAM,aAAa,SAAS,KAAK,wBAAwB,IAAI;AAC7D,MAAM,eAAe,SAAS,KAAK,gCAAgC,IAAI;AACvE,MAAM,qBAAqB,SAAS,KAAK,8BAA8B,IAAI;;;;;;;;;;;;;AAa3E,SAAS,QAAQ,QAAQ,SAAS;CACjC,OAAO,MAAM,IAAI,oBAAoB,MAAM,GAAG,OAAO;AACtD;AAGA,MAAM,gBAAgB;CACrB,IAAI,SAAS,QAAQ;EACpB,SAAS;EACT,YAAY;EACZ,SAAS,IAAI,YAAY;CAC1B,CAAC;CACD,IAAI,aAAa,QAAQ,EAAE,SAAS,KAAK,CAAC;CAC1C,IAAI,gBAAgB,QAAQ,EAAE,SAAS,KAAK,CAAC;CAC7C,IAAI,iBAAiB,OAAO;CAC5B,IAAI,qBAAqB,KAAK;CAC9B,IAAI,cAAc,eAAe;EAChC,SAAS;EACT,SAAS,GAAG,OAAO;CACpB,CAAC;CACD,IAAI,WAAW,MAAM;CACrB,IAAI,QAAQ,SAAS;EACpB,SAAS;EACT,SAAS,IAAI,IAAI;CAClB,CAAC;CACD,IAAI,cAAc,UAAU;EAC3B,SAAS;EACT,SAAS,IAAI,IAAI;CAClB,CAAC;AACF;AACA,MAAM,gBAAgB;CACrB,IAAI,MAAM,aAAa,EAAE,YAAY,KAAK,CAAC;CAC3C,IAAI,cAAc,eAAe;EAChC,SAAS;EACT,SAAS,GAAG,OAAO;CACpB,CAAC;CACD,IAAI,SAAS,QAAQ,EAAE,SAAS,KAAK,CAAC;CACtC,IAAI,kBAAkB,QAAQ,EAAE,SAAS,KAAK,CAAC;CAC/C,IAAI,kBAAkB,QAAQ,EAAE,SAAS,KAAK,CAAC;CAC/C,IAAI,oBAAoB,MAAM;CAC9B,IAAI,uBAAuB,MAAM;CACjC,IAAI,yBAAyB,QAAQ,EAAE,SAAS,KAAK,CAAC;CACtD,IAAI,4BAA4B,MAAM;CACtC,IAAI,cAAc,SAAS,EAAE,SAAS,KAAK,CAAC;AAC7C;AACA,MAAM,kBAAkB;CACvB,IAAI,aAAa,QAAQ;EACxB,SAAS;EACT,YAAY;CACb,CAAC;CACD,IAAI,cAAc,eAAe;EAChC,SAAS;EACT,SAAS,GAAG,OAAO;CACpB,CAAC;CACD,IAAI,iBAAiB,SAAS,EAAE,SAAS,KAAK,CAAC;AAChD;AACA,MAAM,cAAc,YAAY;CAC/B,QAAQ;CACR,OAAO;CACP,aAAa;CACb,SAAS;AACV,CAAC;AACD,MAAM,cAAc,YAAY;CAC/B,QAAQ;CACR,OAAO;CACP,aAAa;CACb,SAAS;AACV,CAAC;AACD,MAAM,gBAAgB,YAAY;CACjC,QAAQ;CACR,OAAO;CACP,aAAa;CACb,SAAS;AACV,CAAC;AACD,MAAM,gBAAgB,aAAa;CAClC,QAAQ;CACR,aAAa;AACd,CAAC;AACD,SAAS,kCAAkC;CAC1C,OAAO,CAAC,eAAe,WAAW;AACnC;AACA,SAAS,oCAAoC;CAC5C,OAAO;EACN;EACA;EACA;EACA;CACD;AACD"}
1
+ {"version":3,"file":"contract-free-DeK6m1dy.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/contract-free.mjs"],"sourcesContent":["import { C as PG_TIMESTAMPTZ_DATE_CODEC_ID, S as PG_TEXT_CODEC_ID, m as PG_INT8_CODEC_ID, p as PG_INT4_CODEC_ID, v as PG_JSONB_CODEC_ID, w as PG_TIMESTAMPTZ_STRING_CODEC_ID, x as PG_TEXT_ARRAY_CODEC_ID } from \"./codec-ids-Cb0yO-IS.mjs\";\nimport { u as PostgresTableSource } from \"./postgres-schema-C8slJGZo.mjs\";\nimport { A as toRegclass, D as tableExistsAst, E as rlsPolicyExistsAst, O as tableIsEmptyAst, T as rlsEnabledAst, _ as columnNullabilityAst, b as extensionExistsAst, c as createTable, d as dropDefaultAction, g as columnExistsAst, h as columnDefaultAst, i as alterTable, k as tablePrimaryKeyAst, s as createSchema, t as addColumnAction, v as columnTypeAst, w as noNullValuesAst, x as indexExistsAst, y as constraintExistsAst } from \"./ddl-BQFDVert.mjs\";\nimport { APP_SPACE_ID } from \"@internal/framework-components/control\";\nimport { col, fn, lit, table } from \"@internal/sql-relational-core/contract-free\";\n//#region src/contract-free/columns.ts\nconst desc = (codecId, opts) => ({\n\tcodecId,\n\tnullable: opts?.nullable ?? false\n});\nconst text = (opts) => desc(PG_TEXT_CODEC_ID, opts);\nconst int4 = (opts) => desc(PG_INT4_CODEC_ID, opts);\nconst int8 = (opts) => desc(PG_INT8_CODEC_ID, opts);\nconst jsonb = (opts) => desc(PG_JSONB_CODEC_ID, opts);\nconst textArray = (opts) => desc(PG_TEXT_ARRAY_CODEC_ID, opts);\nconst timestamptz = (opts) => desc(PG_TIMESTAMPTZ_STRING_CODEC_ID, opts);\nconst timestamptzJsDate = (opts) => desc(PG_TIMESTAMPTZ_DATE_CODEC_ID, opts);\n/**\n* Declare a PostgreSQL control-plane table with a typed column schema. Wraps\n* the generic `table()` factory with a `PostgresTableSource` so the renderer\n* qualifies the table name with the optional schema prefix.\n*\n* ```ts\n* const marker = pgTable(\n* { name: 'marker', schema: 'prisma_contract' },\n* { space: text(), core_hash: text(), updated_at: timestamptz() },\n* );\n* ```\n*/\nfunction pgTable(source, columns) {\n\treturn table(new PostgresTableSource(source), columns);\n}\n//#endregion\n//#region src/contract-free/control-bootstrap.ts\nconst markerColumns = [\n\tcol(\"space\", \"text\", {\n\t\tnotNull: true,\n\t\tprimaryKey: true,\n\t\tdefault: lit(APP_SPACE_ID)\n\t}),\n\tcol(\"core_hash\", \"text\", { notNull: true }),\n\tcol(\"profile_hash\", \"text\", { notNull: true }),\n\tcol(\"contract_json\", \"jsonb\"),\n\tcol(\"canonical_version\", \"int\"),\n\tcol(\"updated_at\", \"timestamptz\", {\n\t\tnotNull: true,\n\t\tdefault: fn(\"now()\")\n\t}),\n\tcol(\"app_tag\", \"text\"),\n\tcol(\"meta\", \"jsonb\", {\n\t\tnotNull: true,\n\t\tdefault: lit(\"{}\")\n\t}),\n\tcol(\"invariants\", \"text[]\", {\n\t\tnotNull: true,\n\t\tdefault: lit(\"{}\")\n\t})\n];\nconst ledgerColumns = [\n\tcol(\"id\", \"bigserial\", { primaryKey: true }),\n\tcol(\"created_at\", \"timestamptz\", {\n\t\tnotNull: true,\n\t\tdefault: fn(\"now()\")\n\t}),\n\tcol(\"space\", \"text\", { notNull: true }),\n\tcol(\"migration_name\", \"text\", { notNull: true }),\n\tcol(\"migration_hash\", \"text\", { notNull: true }),\n\tcol(\"origin_core_hash\", \"text\"),\n\tcol(\"origin_profile_hash\", \"text\"),\n\tcol(\"destination_core_hash\", \"text\", { notNull: true }),\n\tcol(\"destination_profile_hash\", \"text\"),\n\tcol(\"operations\", \"jsonb\", { notNull: true })\n];\nconst contractColumns = [\n\tcol(\"core_hash\", \"text\", {\n\t\tnotNull: true,\n\t\tprimaryKey: true\n\t}),\n\tcol(\"created_at\", \"timestamptz\", {\n\t\tnotNull: true,\n\t\tdefault: fn(\"now()\")\n\t}),\n\tcol(\"contract_json\", \"jsonb\", { notNull: true })\n];\nconst markerTable = createTable({\n\tschema: \"prisma_contract\",\n\ttable: \"marker\",\n\tifNotExists: true,\n\tcolumns: markerColumns\n});\nconst ledgerTable = createTable({\n\tschema: \"prisma_contract\",\n\ttable: \"ledger\",\n\tifNotExists: true,\n\tcolumns: ledgerColumns\n});\nconst contractTable = createTable({\n\tschema: \"prisma_contract\",\n\ttable: \"contract\",\n\tifNotExists: true,\n\tcolumns: contractColumns\n});\nconst controlSchema = createSchema({\n\tschema: \"prisma_contract\",\n\tifNotExists: true\n});\nfunction buildSignMarkerBootstrapQueries() {\n\treturn [controlSchema, markerTable];\n}\nfunction buildControlTableBootstrapQueries() {\n\treturn [\n\t\tcontrolSchema,\n\t\tmarkerTable,\n\t\tledgerTable,\n\t\tcontractTable\n\t];\n}\n//#endregion\nexport { 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 };\n\n//# sourceMappingURL=contract-free.mjs.map"],"mappings":";;;;;;AAMA,MAAM,QAAQ,SAAS,UAAU;CAChC;CACA,UAAU,MAAM,YAAY;AAC7B;AACA,MAAM,QAAQ,SAAS,KAAK,kBAAkB,IAAI;AAClD,MAAM,QAAQ,SAAS,KAAK,kBAAkB,IAAI;AAClD,MAAM,QAAQ,SAAS,KAAK,kBAAkB,IAAI;AAClD,MAAM,SAAS,SAAS,KAAK,mBAAmB,IAAI;AACpD,MAAM,aAAa,SAAS,KAAK,wBAAwB,IAAI;AAC7D,MAAM,eAAe,SAAS,KAAK,gCAAgC,IAAI;AACvE,MAAM,qBAAqB,SAAS,KAAK,8BAA8B,IAAI;;;;;;;;;;;;;AAa3E,SAAS,QAAQ,QAAQ,SAAS;CACjC,OAAO,MAAM,IAAI,oBAAoB,MAAM,GAAG,OAAO;AACtD;AAGA,MAAM,gBAAgB;CACrB,IAAI,SAAS,QAAQ;EACpB,SAAS;EACT,YAAY;EACZ,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;CACR,OAAO;CACP,aAAa;CACb,SAAS;AACV,CAAC;AACD,MAAM,gBAAgB,YAAY;CACjC,QAAQ;CACR,OAAO;CACP,aAAa;CACb,SAAS;AACV,CAAC;AACD,MAAM,gBAAgB,aAAa;CAClC,QAAQ;CACR,aAAa;AACd,CAAC;AACD,SAAS,kCAAkC;CAC1C,OAAO,CAAC,eAAe,WAAW;AACnC;AACA,SAAS,oCAAoC;CAC5C,OAAO;EACN;EACA;EACA;EACA;CACD;AACD"}
@@ -1,5 +1,5 @@
1
1
  import "./table-source-ikHOZmhD-DriY1Lcr.mjs";
2
- import { f as PostgresCreateSchema, l as PostgresAlterTable, o as DropDefaultAction, p as PostgresCreateTable, r as AnyAlterTableAction, t as AddColumnAction } from "./nodes-BU-V-aZA-RqwPH68u.mjs";
2
+ import { m as PostgresCreateTable, p as PostgresCreateSchema, r as AnyAlterTableAction, s as DropDefaultAction, t as AddColumnAction, u as PostgresAlterTable } from "./nodes-C1fPapnK-j0AK7Gcj.mjs";
3
3
  import { DdlColumn, DdlNode, DdlTableConstraint, SelectAst } from "@prisma/orm-family-sql/relational-core/ast";
4
4
  import { CfExpr, ColumnDescriptor, ColumnSchema, TableHandle } from "@prisma/orm-family-sql/relational-core/contract-free";
5
5
  //#region ../../../3-targets/3-targets/postgres/dist/contract-free.d.mts
@@ -256,4 +256,4 @@ declare function alterTable(options: {
256
256
  }): PostgresAlterTable;
257
257
  //#endregion
258
258
  export { rlsPolicyExistsAst as A, indexExistsAst as C, noNullValuesAst as D, jsonb as E, textArray as F, timestamptz as I, timestamptzJsDate as L, tableIsEmptyAst as M, tablePrimaryKeyAst as N, pgTable as O, text as P, toRegclass as R, extensionExistsAst as S, int8 as T, columnTypeAst as _, IndexExistsCheckBuilder as a, createTable as b, TableExistsCheckBuilder as c, alterTable as d, buildControlTableBootstrapQueries as f, columnNullabilityAst as g, columnExistsAst as h, ExtensionExistsCheckBuilder as i, tableExistsAst as j, rlsEnabledAst as k, TablePrimaryKeyCheckBuilder as l, columnDefaultAst as m, ColumnExistsCheckBuilder as n, RlsEnabledCheckBuilder as o, buildSignMarkerBootstrapQueries as p, ConstraintExistsCheckBuilder as r, RlsPolicyExistsCheckBuilder as s, ColumnDefaultCheckBuilder as t, addColumnAction as u, constraintExistsAst as v, int4 as w, dropDefaultAction as x, createSchema as y };
259
- //# sourceMappingURL=contract-free-DFF0Xo-V.d.mts.map
259
+ //# sourceMappingURL=contract-free-DlLLhKi4.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"contract-free-DFF0Xo-V.d.mts","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/contract-free.d.mts"],"mappings":";;;;;;;;;;;iBAUiB,WAAW,wBAAwB;UAC1C;EACR,eAAe;EACf,gBAAgB;;;;;;;;;;;iBAWD,eAAe,gBAAgB,gBAAgB;UACtD;EACR,qBAAqB;EACrB,oBAAoB;;;;;;;;;;;;;;;;iBAgBL,oBAAoB;WAC1B;WACA;WACA;IACP;UACM;EACR,iBAAiB;EACjB,gBAAgB;;;;;;;iBAOD,gBAAgB;WACtB;WACA;WACA;IACP;;;;;iBAKa,qBAAqB;WAC3B;WACA;WACA;WACA;IACP;UACM;EACR,kBAAkB;EAClB,iBAAiB;EACjB,aAAa;;;;;;;;iBAQE,iBAAiB;WACvB;WACA;WACA;IACP;;;;;;iBAMa,cAAc;WACpB;WACA;WACA;WACA;IACP;UACM;EACR,aAAa;EACb,YAAY;;;;;;;iBAOG,mBAAmB;WACzB;WACA;WACA;IACP;;;;;;iBAMa,gBAAgB,gBAAgB,gBAAgB;;;;;iBAKhD,gBAAgB;WACtB;WACA;WACA;IACP;UACM;EACR,oBAAoB;EACpB,mBAAmB;;;;;;iBAMJ,mBAAmB,wBAAwB;UAClD;EACR,iBAAiB;EACjB,gBAAgB;;;;;;;;iBAQD,mBAAmB;WACzB;WACA;WACA;IACP;UACM;EACR,cAAc;EACd,eAAe;;;;;;;iBAOA,cAAc,gBAAgB,gBAAgB;UACrD;EACR,gBAAgB;EAChB,eAAe;;;;;;iBAMA,eAAe,gBAAgB,oBAAoB;;;KAG/D;WACM;;cAEG,OAAO,OAAO,YAAY;cAC1B,OAAO,OAAO,YAAY;cAC1B,OAAO,OAAO,YAAY;cAC1B,QAAQ,OAAO,YAAY;cAC3B,YAAY,OAAO,YAAY;cAC/B,cAAc,OAAO,YAAY;cACjC,oBAAoB,OAAO,YAAY;;;;;;;;;;;;;iBAapC,QAAQ,eAAe,cAAc;WAC3C;WACA;WACA;GACR,SAAS,SAAS,YAAY;;;iBAGhB,4CAA4C;iBAC5C,8CAA8C;;;;;;;;;;;;;;;;;iBAiB9C,YAAY;WAClB;WACA;WACA;WACA,kBAAkB;WAClB,uBAAuB;IAC9B;;;;;iBAKa,aAAa;WACnB;WACA;IACP;;;;;;iBAMa,gBAAgB,QAAQ,YAAY;;;;;iBAKpC,kBAAkB,qBAAqB;;;;;iBAKvC,WAAW;WACjB;WACA;WACA,kBAAkB;IACzB"}
1
+ {"version":3,"file":"contract-free-DlLLhKi4.d.mts","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/contract-free.d.mts"],"mappings":";;;;;;;;;;;iBAUiB,WAAW,wBAAwB;UAC1C;EACR,eAAe;EACf,gBAAgB;;;;;;;;;;;iBAWD,eAAe,gBAAgB,gBAAgB;UACtD;EACR,qBAAqB;EACrB,oBAAoB;;;;;;;;;;;;;;;;iBAgBL,oBAAoB;WAC1B;WACA;WACA;IACP;UACM;EACR,iBAAiB;EACjB,gBAAgB;;;;;;;iBAOD,gBAAgB;WACtB;WACA;WACA;IACP;;;;;iBAKa,qBAAqB;WAC3B;WACA;WACA;WACA;IACP;UACM;EACR,kBAAkB;EAClB,iBAAiB;EACjB,aAAa;;;;;;;;iBAQE,iBAAiB;WACvB;WACA;WACA;IACP;;;;;;iBAMa,cAAc;WACpB;WACA;WACA;WACA;IACP;UACM;EACR,aAAa;EACb,YAAY;;;;;;;iBAOG,mBAAmB;WACzB;WACA;WACA;IACP;;;;;;iBAMa,gBAAgB,gBAAgB,gBAAgB;;;;;iBAKhD,gBAAgB;WACtB;WACA;WACA;IACP;UACM;EACR,oBAAoB;EACpB,mBAAmB;;;;;;iBAMJ,mBAAmB,wBAAwB;UAClD;EACR,iBAAiB;EACjB,gBAAgB;;;;;;;;iBAQD,mBAAmB;WACzB;WACA;WACA;IACP;UACM;EACR,cAAc;EACd,eAAe;;;;;;;iBAOA,cAAc,gBAAgB,gBAAgB;UACrD;EACR,gBAAgB;EAChB,eAAe;;;;;;iBAMA,eAAe,gBAAgB,oBAAoB;;;KAG/D;WACM;;cAEG,OAAO,OAAO,YAAY;cAC1B,OAAO,OAAO,YAAY;cAC1B,OAAO,OAAO,YAAY;cAC1B,QAAQ,OAAO,YAAY;cAC3B,YAAY,OAAO,YAAY;cAC/B,cAAc,OAAO,YAAY;cACjC,oBAAoB,OAAO,YAAY;;;;;;;;;;;;;iBAapC,QAAQ,eAAe,cAAc;WAC3C;WACA;WACA;GACR,SAAS,SAAS,YAAY;;;iBAGhB,4CAA4C;iBAC5C,8CAA8C;;;;;;;;;;;;;;;;;iBAiB9C,YAAY;WAClB;WACA;WACA;WACA,kBAAkB;WAClB,uBAAuB;IAC9B;;;;;iBAKa,aAAa;WACnB;WACA;IACP;;;;;;iBAMa,gBAAgB,QAAQ,YAAY;;;;;iBAKpC,kBAAkB,qBAAqB;;;;;iBAKvC,WAAW;WACjB;WACA;WACA,kBAAkB;IACzB"}
@@ -1,8 +1,8 @@
1
1
  import { t as PostgresDatabaseSchemaNode } from "./postgres-database-schema-node-Cv8usVNX-BP4GzjSf.mjs";
2
2
  import "./types-D799eppJ.mjs";
3
3
  import { r as PostgresCodecRegistry } from "./codecs-Ba3gUr67.mjs";
4
- import { h as PostgresDdlNode } from "./nodes-BU-V-aZA-RqwPH68u.mjs";
5
- import "./ddl-B4Rh8ntj.mjs";
4
+ import { g as PostgresDdlNode } from "./nodes-C1fPapnK-j0AK7Gcj.mjs";
5
+ import "./ddl-B-WjvCal.mjs";
6
6
  import { t as parsePostgresDefault } from "./default-normalizer-ZZ7Y5boE.mjs";
7
7
  import { i as normalizeSchemaNativeType } from "./native-type-normalizer-BFo5tSyh.mjs";
8
8
  import { AnyQueryAst, DdlColumn, DdlNode, LoweredStatement, LowererContext, MarkerReadResult, SqlExecuteRequest } from "@prisma/orm-family-sql/relational-core/ast";
@@ -185,4 +185,4 @@ declare class PostgresControlAdapter implements SqlControlAdapter<'postgres'> {
185
185
  declare const postgresAdapterDescriptor: SqlControlAdapterDescriptor<'postgres'>;
186
186
  //#endregion
187
187
  export { postgresAdapterDescriptor as n, PostgresControlAdapter as t };
188
- //# sourceMappingURL=control-CoZVI8XA.d.mts.map
188
+ //# sourceMappingURL=control-RTK8NJRT.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"control-CoZVI8XA.d.mts","names":[],"sources":["../../../../3-targets/6-adapters/postgres/dist/control.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;cAgBc,kCAAkC;mBAC7B;WACR;WACA;EACT,YAAY,eAAe;;;;;WAKlB,yBAAyB;;;;;;WAMzB,4BAA4B;EACrC,yCAAyC;EACzC,uCAAuC;;;;;;;;;EASvC,MAAM,KAAK,cAAc,iBAAiB,SAAS,0BAA0B;EAC7E,oBAAoB,QAAQ,WAAW,gBAAgB;;;;;;;;EAQvD,sBAAsB,KAAK,cAAc,iBAAiB,UAAU,0BAA0B,QAAQ;;;;;;;;;EAStG,WAAW,QAAQ,sCAAsC,gBAAgB,QAAQ;EACjF,wBAAwB,QAAQ,sCAAsC,gBAAgB,QAAQ;;;;;;;EAO9F,eAAe,QAAQ,uCAAuC,QAAQ,oBAAoB;UAClF;;;;;;;EAOR,WAAW,QAAQ,sCAAsC,iBAAiB,iBAAiB;UACnF;;;;;;EAMR,aAAa,QAAQ,sCAAsC,eAAe;aAC/D;aACA;aACA;MACP;EACJ,WAAW,QAAQ,sCAAsC,eAAe;aAC7D;aACA;aACA;MACP;;;;;EAKJ,aAAa,QAAQ,sCAAsC,eAA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sC,oBAAoB,kBAAkB,QAAQ;;;;;UAK/F;;;;;;;;;UASA;;;;;;;;UAQA;;;;;;;UAOA;;;;UAIA;;;;cAII,2BAA2B"}
@@ -3,14 +3,14 @@ import { s as postgresError } from "./errors-DYyzTYzE-39CV_aMo.mjs";
3
3
  import { n as parsePostgresListText } from "./list-decoder-DXee1orj-K3y-hxiI.mjs";
4
4
  import { o as postgresCodecRegistry } from "./codecs-DMPbfU3s.mjs";
5
5
  import { r as quoteIdentifier, t as escapeLiteral } from "./sql-utils-Bh-mnsSY-D6hnFPrP.mjs";
6
- 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 } from "./contract-free-C0GQe4X_.mjs";
6
+ 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 } from "./contract-free-DeK6m1dy.mjs";
7
7
  import { n as PostgresSchemaNodeKind, r as PostgresTableSchemaNode, t as PostgresNativeEnumSchemaNode } from "./postgres-table-schema-node-BBkitBQh-DT1T5VWU.mjs";
8
8
  import { i as PostgresRoleSchemaNode, n as PostgresNamespaceSchemaNode, r as PostgresPolicySchemaNode, t as PostgresDatabaseSchemaNode } from "./postgres-role-schema-node-B8Z5i5D--PObwlU2Z.mjs";
9
9
  import { t as parsePostgresDefault } from "./default-normalizer-Cb7nWBUa-DXchlOUk.mjs";
10
10
  import { n as normalizeSchemaNativeType, t as introspectedNativeType } from "./native-type-normalizer-CW6g9Fut-C5lMRRjS.mjs";
11
11
  import { n as isPostgresDateTimeDataType, r as postgresDateTimeDdlText } from "./planner-ddl-builders-DSpQVbIm-Y4SbsU-O.mjs";
12
12
  import { n as renderLoweredSql, t as adapterError } from "./sql-renderer-CgUgFbU4-CujcTVwf.mjs";
13
- import { RawExpr, encodeListLiteralDefault, encodeLiteralDefault, isDdlNode } from "@prisma/orm-family-sql/relational-core/ast";
13
+ import { RawExpr, encodeListLiteralDefault, encodeLiteralDefault, isDdlNode, renderOpaqueSql } from "@prisma/orm-family-sql/relational-core/ast";
14
14
  import { blindCast } from "@prisma/orm-framework/utils/casts";
15
15
  import { UNBOUND_NAMESPACE_ID } from "@prisma/orm-framework/components/ir";
16
16
  import { APP_SPACE_ID } from "@prisma/orm-framework/components/control";
@@ -23,7 +23,7 @@ import { REFERENTIAL_ACTION_SQL } from "@prisma/orm-family-sql/contract/referent
23
23
  import { errorMarkerRowCorrupt, rethrowMarkerReadError, withMarkerReadErrorHandling } from "@prisma/orm-framework/errors/execution";
24
24
  import { parseContractMarkerRow } from "@prisma/orm-family-sql/family/verify";
25
25
  import { createAstCodecRegistry, deriveParamMetadata, encodeParamsWithMetadata } from "@prisma/orm-family-sql/runtime";
26
- //#region ../../../3-targets/6-adapters/postgres/dist/control-adapter-DlHDFQw4.mjs
26
+ //#region ../../../3-targets/6-adapters/postgres/dist/control-adapter-Rzj1Wx4j.mjs
27
27
  function ledgerOriginFromStored(originCoreHash) {
28
28
  if (originCoreHash === null || originCoreHash === "" || originCoreHash === "empty") return null;
29
29
  return originCoreHash;
@@ -1110,12 +1110,12 @@ const SERIAL_FAMILY_TYPES = /* @__PURE__ */ new Set([
1110
1110
  ]);
1111
1111
  async function pgRenderDdlColumnDefault(def, nativeType, codecLookup, codecRef, where) {
1112
1112
  if (def.kind === "function") {
1113
- if (def.expression === "autoincrement()") {
1113
+ if (def.expression.text === "autoincrement()") {
1114
1114
  if (!SERIAL_FAMILY_TYPES.has(nativeType.toLowerCase())) throw postgresError("CONTRACT.DEFAULT_INVALID", `Column type "${nativeType}" has an autoincrement() default but is not a SERIAL-family pseudo-type. Autoincrement columns must declare their type as SERIAL (or SERIAL4), BIGSERIAL (or SERIAL8), or SMALLSERIAL (or SERIAL2) — e.g. col(name, "SERIAL", { default: fn("autoincrement()") }).`, { meta: { nativeType } });
1115
1115
  return "";
1116
1116
  }
1117
- if (checkSqlDefaultBody(def.expression) !== void 0) throw postgresError("CONTRACT.DEFAULT_INVALID", `Unsafe default expression in contract: "${def.expression}". Default expressions must not contain semicolons, SQL comment tokens, dollar-quoting, or subqueries.`, { meta: { expression: def.expression } });
1118
- return `DEFAULT (${def.expression})`;
1117
+ if (checkSqlDefaultBody(def.expression.text) !== void 0) throw postgresError("CONTRACT.DEFAULT_INVALID", `Unsafe default expression in contract: "${def.expression.text}". Default expressions must not contain semicolons, SQL comment tokens, dollar-quoting, or subqueries.`, { meta: { expression: def.expression.text } });
1118
+ return `DEFAULT (${renderOpaqueSql(def.expression)})`;
1119
1119
  }
1120
1120
  const dataTypeId = codecRef === void 0 ? void 0 : codecLookup.descriptorFor(codecRef.codecId)?.dataType;
1121
1121
  return `DEFAULT ${pgInlineLiteral(await pgWrittenDefault(def.value, nativeType, dataTypeId, codecLookup, codecRef, where), nativeType, where)}`;
@@ -1162,7 +1162,7 @@ function pgRenderDdlConstraint(constraint) {
1162
1162
  if (constraint.name !== void 0) sql = `CONSTRAINT ${quoteIdentifier(constraint.name)} ${sql}`;
1163
1163
  return sql;
1164
1164
  }
1165
- if (constraint.kind === "check-expression") return `CONSTRAINT ${quoteIdentifier(constraint.name)} CHECK (${constraint.expression})`;
1165
+ if (constraint.kind === "check-expression") return `CONSTRAINT ${quoteIdentifier(constraint.name)} CHECK (${renderOpaqueSql(constraint.expression)})`;
1166
1166
  const cols = constraint.columns.map(quoteIdentifier).join(", ");
1167
1167
  if (constraint.name !== void 0) return `CONSTRAINT ${quoteIdentifier(constraint.name)} UNIQUE (${cols})`;
1168
1168
  return `UNIQUE (${cols})`;
@@ -1223,8 +1223,8 @@ function pgRenderCreatePolicy(node) {
1223
1223
  const command = POLICY_OPERATION_SQL[node.operation];
1224
1224
  const roles = node.roles.length === 0 ? "PUBLIC" : node.roles.join(", ");
1225
1225
  let sql = `CREATE POLICY ${quoteIdentifier(node.name)} ON ${tableRef} AS ${permissiveness} FOR ${command} TO ${roles}`;
1226
- if (node.using !== void 0) sql += ` USING (${node.using})`;
1227
- if (node.withCheck !== void 0) sql += ` WITH CHECK (${node.withCheck})`;
1226
+ if (node.using !== void 0) sql += ` USING (${renderOpaqueSql(node.using)})`;
1227
+ if (node.withCheck !== void 0) sql += ` WITH CHECK (${renderOpaqueSql(node.withCheck)})`;
1228
1228
  return {
1229
1229
  sql,
1230
1230
  params: []
@@ -1263,11 +1263,11 @@ function pgQualify(schema, name) {
1263
1263
  return schema === void 0 ? quoteIdentifier(name) : `${quoteIdentifier(schema)}.${quoteIdentifier(name)}`;
1264
1264
  }
1265
1265
  function pgRenderCreateIndex(node) {
1266
- const elementList = "columns" in node.elements ? node.elements.columns.map(quoteIdentifier).join(", ") : node.elements.expression;
1266
+ const elementList = "columns" in node.elements ? node.elements.columns.map(quoteIdentifier).join(", ") : renderOpaqueSql(node.elements.expression);
1267
1267
  const unique = node.unique ? "UNIQUE " : "";
1268
1268
  const using = node.type !== void 0 ? ` USING ${quoteIdentifier(node.type)}` : "";
1269
1269
  const withClause = node.options !== void 0 && Object.keys(node.options).length > 0 ? ` WITH (${Object.entries(node.options).map(([key, value]) => `${quoteIdentifier(key)} = ${pgRenderIndexOptionValue(key, value)}`).join(", ")})` : "";
1270
- const whereClause = node.where !== void 0 ? ` WHERE (${node.where})` : "";
1270
+ const whereClause = node.where !== void 0 ? ` WHERE (${renderOpaqueSql(node.where)})` : "";
1271
1271
  return {
1272
1272
  sql: `CREATE ${unique}INDEX ${quoteIdentifier(node.name)} ON ${pgQualify(node.schema, node.table)}${using} (${elementList})${withClause}${whereClause}`,
1273
1273
  params: []
@@ -1310,4 +1310,4 @@ async function pgRenderDdlExecuteRequest(ast, codecLookup) {
1310
1310
  //#endregion
1311
1311
  export { PostgresControlAdapter as t };
1312
1312
 
1313
- //# sourceMappingURL=control-adapter-DlHDFQw4-Awa40s5_.mjs.map
1313
+ //# sourceMappingURL=control-adapter-Rzj1Wx4j-om2RNriu.mjs.map