@prisma/orm-target-postgres 8.0.0-rc.24-dev.12 → 8.0.0-rc.24-dev.14

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 (79) hide show
  1. package/dist/{adapter-D6S0To9M.d.mts → adapter-dMZYwONo.d.mts} +11 -11
  2. package/dist/{adapter-D6S0To9M.d.mts.map → adapter-dMZYwONo.d.mts.map} +1 -1
  3. package/dist/adapter.d.mts +3 -3
  4. package/dist/adapter.mjs +2 -2
  5. package/dist/adapter__adapter.d.mts +1 -1
  6. package/dist/adapter__column-types.d.mts +2 -2
  7. package/dist/adapter__column-types.mjs +2 -2
  8. package/dist/{aggregates-C2c48ORM.d.mts → aggregates-0EfVySBb.d.mts} +11 -11
  9. package/dist/{aggregates-C2c48ORM.d.mts.map → aggregates-0EfVySBb.d.mts.map} +1 -1
  10. package/dist/{authoring-BbS0bin5-U9tXyzS6.mjs → authoring-DPwc7x9U-BZkXpPSH.mjs} +24 -6
  11. package/dist/authoring-DPwc7x9U-BZkXpPSH.mjs.map +1 -0
  12. package/dist/{column-types-DBCLQW1w.d.mts → column-types-BWuKkODI.d.mts} +5 -7
  13. package/dist/{column-types-DBCLQW1w.d.mts.map → column-types-BWuKkODI.d.mts.map} +1 -1
  14. package/dist/{column-types-DpzI37Cl.mjs → column-types-BZdRRC1l.mjs} +5 -7
  15. package/dist/{column-types-DpzI37Cl.mjs.map → column-types-BZdRRC1l.mjs.map} +1 -1
  16. package/dist/{control-Ci6kSDEg.d.mts → control-B-0_CuJt.d.mts} +28 -6
  17. package/dist/{control-Ci6kSDEg.d.mts.map → control-B-0_CuJt.d.mts.map} +1 -1
  18. package/dist/{descriptor-meta-xBYwG7xG-DWAZTiD5.mjs → descriptor-meta-46EhsECb-C5EGe36u.mjs} +3 -3
  19. package/dist/{descriptor-meta-xBYwG7xG-DWAZTiD5.mjs.map → descriptor-meta-46EhsECb-C5EGe36u.mjs.map} +1 -1
  20. package/dist/{diff-database-schema-J96mtg_F-BHpzbMoj.mjs → diff-database-schema-BJKAfPAG-LCJmdiQq.mjs} +3 -3
  21. package/dist/{diff-database-schema-J96mtg_F-BHpzbMoj.mjs.map → diff-database-schema-BJKAfPAG-LCJmdiQq.mjs.map} +1 -1
  22. package/dist/{infer-psl-contract-CAoJuV8y-Da9y8zwV.mjs → infer-psl-contract-DqtogWJ8-CUXUG-wF.mjs} +3 -3
  23. package/dist/{infer-psl-contract-CAoJuV8y-Da9y8zwV.mjs.map → infer-psl-contract-DqtogWJ8-CUXUG-wF.mjs.map} +1 -1
  24. package/dist/migration-Be_iuIpn.mjs.map +1 -1
  25. package/dist/{migration-BTXqYFkV.d.mts → migration-CovfYOjm.d.mts} +2 -2
  26. package/dist/migration-CovfYOjm.d.mts.map +1 -0
  27. package/dist/{pack-Baz-udww.d.mts → pack-ReYuY9t5.d.mts} +47 -4
  28. package/dist/pack-ReYuY9t5.d.mts.map +1 -0
  29. package/dist/{planner-BlY3pVTF-B-yPNIGN.mjs → planner-BHH46ndt-Q6-LPhnL.mjs} +6 -6
  30. package/dist/{planner-BlY3pVTF-B-yPNIGN.mjs.map → planner-BHH46ndt-Q6-LPhnL.mjs.map} +1 -1
  31. package/dist/{planner-CyyWVHw4.d.mts → planner-Bw0tlQWK.d.mts} +2 -2
  32. package/dist/{planner-CyyWVHw4.d.mts.map → planner-Bw0tlQWK.d.mts.map} +1 -1
  33. package/dist/planner-produced-postgres-migration-CulnCxu2.d.mts +1 -0
  34. package/dist/{planner-produced-postgres-migration-CorJVpul-dA0T7JYO.mjs → planner-produced-postgres-migration-FtUIqqVg-ouPTcZ8X.mjs} +3 -3
  35. package/dist/{planner-produced-postgres-migration-CorJVpul-dA0T7JYO.mjs.map → planner-produced-postgres-migration-FtUIqqVg-ouPTcZ8X.mjs.map} +1 -1
  36. package/dist/{planner-produced-postgres-migration-CDkRlHah-Cknq9LDt.d.mts → planner-produced-postgres-migration-exqzWlvW-DGLu2dQ7.d.mts} +3 -3
  37. package/dist/planner-produced-postgres-migration-exqzWlvW-DGLu2dQ7.d.mts.map +1 -0
  38. package/dist/{postgres-contract-view-WtPiaMZp-C-CQAB1E.mjs → postgres-contract-view-DtsmkyFX-Bas8oQiN.mjs} +3 -3
  39. package/dist/{postgres-contract-view-WtPiaMZp-C-CQAB1E.mjs.map → postgres-contract-view-DtsmkyFX-Bas8oQiN.mjs.map} +1 -1
  40. package/dist/{postgres-migration-BuxK0qNO-BgQHf6H6.mjs → postgres-migration-D5lRerLT-DyYh8UPS.mjs} +6 -6
  41. package/dist/{postgres-migration-BuxK0qNO-BgQHf6H6.mjs.map → postgres-migration-D5lRerLT-DyYh8UPS.mjs.map} +1 -1
  42. package/dist/{postgres-migration-DUgkNwUR-B3Hr27gY.d.mts → postgres-migration-DEkPcs8x-CLxAKfHm.d.mts} +3 -3
  43. package/dist/{postgres-migration-DUgkNwUR-B3Hr27gY.d.mts.map → postgres-migration-DEkPcs8x-CLxAKfHm.d.mts.map} +1 -1
  44. package/dist/{prisma7-binding-BDJ3kwsK.mjs → prisma7-binding-BGEW0R_9.mjs} +3 -3
  45. package/dist/{prisma7-binding-BDJ3kwsK.mjs.map → prisma7-binding-BGEW0R_9.mjs.map} +1 -1
  46. package/dist/{prisma7-binding-Ktqdq2S4.d.mts → prisma7-binding-DSQpvEBe.d.mts} +47 -4
  47. package/dist/prisma7-binding-DSQpvEBe.d.mts.map +1 -0
  48. package/dist/{resolve-ddl-schema-ChjIoY0I-D7TWkRXc.mjs → resolve-ddl-schema-BwKuzGm--BVgPhp86.mjs} +3 -3
  49. package/dist/{resolve-ddl-schema-ChjIoY0I-D7TWkRXc.mjs.map → resolve-ddl-schema-BwKuzGm--BVgPhp86.mjs.map} +1 -1
  50. package/dist/runtime-DPhbi9_3.mjs.map +1 -1
  51. package/dist/{schema-ir-annotations-u590Zxbh.d.mts → schema-ir-annotations-DCYs7ck-.d.mts} +2 -2
  52. package/dist/{schema-ir-annotations-u590Zxbh.d.mts.map → schema-ir-annotations-DCYs7ck-.d.mts.map} +1 -1
  53. package/dist/target.d.mts +10 -10
  54. package/dist/target.mjs +8 -8
  55. package/dist/target__aggregates.d.mts +1 -1
  56. package/dist/target__control.d.mts +1 -1
  57. package/dist/target__control.mjs +7 -7
  58. package/dist/target__control.mjs.map +1 -1
  59. package/dist/target__diff-database-schema.mjs +1 -1
  60. package/dist/target__migration.d.mts +2 -2
  61. package/dist/target__migration.mjs +1 -1
  62. package/dist/target__pack.d.mts +1 -1
  63. package/dist/target__pack.mjs +1 -1
  64. package/dist/target__planner-produced-postgres-migration.d.mts +2 -2
  65. package/dist/target__planner-produced-postgres-migration.mjs +1 -1
  66. package/dist/target__planner.d.mts +1 -1
  67. package/dist/target__planner.mjs +2 -2
  68. package/dist/target__prisma7-binding.d.mts +1 -1
  69. package/dist/target__prisma7-binding.mjs +1 -1
  70. package/dist/target__runtime.mjs +1 -1
  71. package/dist/target__schema-ir-annotations.d.mts +1 -1
  72. package/dist/target__schema-ir-annotations.mjs +1 -1
  73. package/package.json +10 -10
  74. package/dist/authoring-BbS0bin5-U9tXyzS6.mjs.map +0 -1
  75. package/dist/migration-BTXqYFkV.d.mts.map +0 -1
  76. package/dist/pack-Baz-udww.d.mts.map +0 -1
  77. package/dist/planner-produced-postgres-migration-CDkRlHah-Cknq9LDt.d.mts.map +0 -1
  78. package/dist/planner-produced-postgres-migration-Davk_RXL.d.mts +0 -1
  79. package/dist/prisma7-binding-Ktqdq2S4.d.mts.map +0 -1
@@ -12,7 +12,7 @@ import { SqlMigrationPlanOperation } from "@prisma/orm-family-sql/family/control
12
12
  import { Migration } from "@prisma/orm-family-sql/family/migration";
13
13
  import { Contract, JsonValue } from "@prisma/orm-framework/contract/types";
14
14
  import { SqlControlAdapter } from "@prisma/orm-family-sql/family/control-adapter";
15
- //#region ../../../3-targets/postgres/1-target/dist/postgres-migration-DUgkNwUR.d.mts
15
+ //#region ../../../3-targets/postgres/1-target/dist/postgres-migration-DEkPcs8x.d.mts
16
16
  //#region src/core/migrations/postgres-migration.d.ts
17
17
  /**
18
18
  * Target-owned base class for Postgres migrations.
@@ -34,7 +34,7 @@ import { SqlControlAdapter } from "@prisma/orm-family-sql/family/control-adapter
34
34
  * stored adapter, so user migrations can write `this.dataTransform(...)`
35
35
  * without threading the adapter through every call.
36
36
  *
37
- * Every method that creates, changes or drops a table, column, index, constraint, type or policy requires an explicit `schema`; a migration does not leave those to whatever `search_path` the connection carries. The one exception is an extension declared in the unbound namespace: `createExtension` and `dropExtension` take an optional `schema`, and without it the extension goes into the connection's current schema, unless the extension's control file names a schema, and the search path finds it (ADR 316).
37
+ * Every method that creates, changes or drops a table, column, index, constraint, type or policy requires an explicit `schema`; a migration does not leave those to whatever `search_path` the connection carries. The one exception is an extension declared in the unbound namespace: `createExtension` and `dropExtension` take an optional `schema`, and without it the extension goes into the connection's current schema, unless the extension's control file names a schema, and the search path finds it (ADR 321).
38
38
  */
39
39
  declare abstract class PostgresMigration<Start extends Contract<SqlStorage> = Contract<SqlStorage>, End extends Contract<SqlStorage> = Contract<SqlStorage>> extends Migration<PostgresPlanTargetDetails, 'postgres', Start, End> {
40
40
  #private;
@@ -474,4 +474,4 @@ type RlsPolicyInput = Omit<RenderedRlsPolicyLiteral, 'using' | 'withCheck'> & {
474
474
  };
475
475
  //#endregion
476
476
  export { PostgresMigration as t };
477
- //# sourceMappingURL=postgres-migration-DUgkNwUR-B3Hr27gY.d.mts.map
477
+ //# sourceMappingURL=postgres-migration-DEkPcs8x-CLxAKfHm.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"postgres-migration-DUgkNwUR-B3Hr27gY.d.mts","names":[],"sources":["../../../../3-targets/postgres/1-target/dist/postgres-migration-DUgkNwUR.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAqCuB,kBAAkB,cAAc,SAAS,cAAc,SAAS,aAAa,YAAY,SAAS,cAAc,SAAS,qBAAqB,UAAU,uCAAuC,OAAO;;WAElN;;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A;aACA;MACP,QAAQ,0BAA0B;YAC5B,UAAU;aACT;aACA;aACA;MACP,QAAQ,0BAA0B;;;;YAI5B,gBAAgB;aACf;aACA;MACP,QAAQ,0BAA0B;;YAE5B,cAAc;aACb;aACA;MACP,QAAQ,0BAA0B;;YAE5B,mBAAmB;aAClB;aACA;MACP,QAAQ,0BAA0B;YAC5B,iBAAiB;aAChB;aACA;aACA;aACA;MACP,QAAQ,0BAA0B;YAC5B,uBAAuB;aACtB;aACA;MACP,QAAQ,0BAA0B;YAC5B,wBAAwB;aACvB;aACA;MACP,QAAQ,0BAA0B;YAC5B,gBAAgB;aACf;aACA;aACA,QAAQ;MACf,QAAQ,0BAA0B;YAC5B,cAAc;aACb;aACA;aACA;MACP,QAAQ,0BAA0B;YAC5B,gBAAgB;aACf;aACA;aACA;aACA;MACP,QAAQ,0BAA0B;;KAEnC,yBAAyB,KAAK;WACxB,QAAQ;;KAEd,iBAAiB,KAAK;WAChB,QAAQ;WACR,YAAY"}
1
+ {"version":3,"file":"postgres-migration-DEkPcs8x-CLxAKfHm.d.mts","names":[],"sources":["../../../../3-targets/postgres/1-target/dist/postgres-migration-DEkPcs8x.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAqCuB,kBAAkB,cAAc,SAAS,cAAc,SAAS,aAAa,YAAY,SAAS,cAAc,SAAS,qBAAqB,UAAU,uCAAuC,OAAO;;WAElN;;;;;;;qBAOU,gBAAgB;EACnC,YAAY,QAAQ;UACZ;;UAEA;;UAEA;UACA;;;;;;UAMA;;;;;;MAMJ,eAAe,qBAAqB;;;;;MAKpC,iBAAiB,qBAAqB;;;;;;YAMhC,cAAc,kBAAkB,SAAS,aAAa,UAAU,WAAW,cAAc,SAAS,uBAAuB,QAAQ,0BAA0B;;;;;;YAM3J,YAAY;aACX;aACA;aACA;aACA,kBAAkB;aAClB,uBAAuB;MAC9B,QAAQ,0BAA0B;;;;;;YAM5B,aAAa;aACZ;aACA;MACP,Q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aACA;MACP,QAAQ,0BAA0B;YAC5B,gBAAgB;aACf;aACA;aACA,QAAQ;MACf,QAAQ,0BAA0B;YAC5B,cAAc;aACb;aACA;aACA;MACP,QAAQ,0BAA0B;YAC5B,gBAAgB;aACf;aACA;aACA;aACA;MACP,QAAQ,0BAA0B;;KAEnC,yBAAyB,KAAK;WACxB,QAAQ;;KAEd,iBAAiB,KAAK;WAChB,QAAQ;WACR,YAAY"}
@@ -2,9 +2,9 @@ import { r as inlineLiteral } from "./sql-utils-CRPhDLp1-wbgQW5TM.mjs";
2
2
  import { A as pgJson, G as pgTimestamptz, U as pgTimestamp, V as pgTime, et as postgresDataTypes, j as pgJsonb, p as pgBytea, q as pgTimetz, rt as postgresYearText, v as pgDate } from "./data-types-DWfwErIu-DF85cgmu.mjs";
3
3
  import { v as postgresCreateNamespace } from "./postgres-schema-zd_p5Lg2-BdJlG7Cg.mjs";
4
4
  import { t as postgresDataTypeEntries } from "./data-type-entries-CVxsfjF3-Bd0cSfuG.mjs";
5
- import { n as prisma7PostgresTypeMap, t as postgresTargetDescriptorMeta } from "./descriptor-meta-xBYwG7xG-DWAZTiD5.mjs";
5
+ import { n as prisma7PostgresTypeMap, t as postgresTargetDescriptorMeta } from "./descriptor-meta-46EhsECb-C5EGe36u.mjs";
6
6
  import { n as defaultPrimaryKeyName, t as defaultForeignKeyName } from "./default-constraint-names-Cz9Yoeim-sUzOGvIm.mjs";
7
- import { d as createPostgresDefaultMapping, h as noInferredDefaults, m as noColumnDefaults, u as buildPslDocumentAst } from "./infer-psl-contract-CAoJuV8y-Da9y8zwV.mjs";
7
+ import { d as createPostgresDefaultMapping, h as noInferredDefaults, m as noColumnDefaults, u as buildPslDocumentAst } from "./infer-psl-contract-DqtogWJ8-CUXUG-wF.mjs";
8
8
  import { InternalError } from "@prisma/orm-framework/utils/internal-error";
9
9
  import { isSqlDataType, renderSqlTypeName } from "@prisma/orm-family-sql/contract/data-type";
10
10
  import { flatPslModels } from "@prisma/orm-framework/components/psl-ast";
@@ -270,4 +270,4 @@ const prisma7PostgresBinding = {
270
270
  //#endregion
271
271
  export { prisma7PostgresBinding as t };
272
272
 
273
- //# sourceMappingURL=prisma7-binding-BDJ3kwsK.mjs.map
273
+ //# sourceMappingURL=prisma7-binding-BGEW0R_9.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"prisma7-binding-BDJ3kwsK.mjs","names":[],"sources":["../../../../3-targets/postgres/1-target/dist/prisma7-binding.mjs"],"sourcesContent":["import { G as postgresDataTypes, I as pgTimestamptz, M as pgTime, P as pgTimestamp, R as pgTimetz, S as pgJsonb, Y as postgresYearText, s as pgBytea, u as pgDate, x as pgJson } from \"./data-types-DWfwErIu.mjs\";\nimport { r as inlineLiteral } from \"./sql-utils-CRPhDLp1.mjs\";\nimport { t as postgresDataTypeEntries } from \"./data-type-entries-CVxsfjF3.mjs\";\nimport { i as postgresCreateNamespace } from \"./postgres-schema-zd_p5Lg2.mjs\";\nimport { n as prisma7PostgresTypeMap, t as postgresTargetDescriptorMeta } from \"./descriptor-meta-xBYwG7xG.mjs\";\nimport { n as defaultPrimaryKeyName, t as defaultForeignKeyName } from \"./default-constraint-names-Cz9Yoeim.mjs\";\nimport { i as noInferredDefaults, r as createPostgresDefaultMapping, t as buildPslDocumentAst, u as noColumnDefaults } from \"./infer-psl-contract-CAoJuV8y.mjs\";\nimport { isSqlDataType, renderSqlTypeName } from \"@internal/sql-contract/data-type\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { flatPslModels } from \"@internal/framework-components/psl-ast\";\nimport { SqlSchemaIR, SqlTableIR } from \"@internal/sql-schema-ir/types\";\nimport { toModelName } from \"@internal/family-sql/psl-infer\";\n//#region src/core/prisma7-temporal-defaults.ts\nconst RFC_3339 = /^(\\d{4}-\\d{2}-\\d{2})[Tt ](\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?)([Zz]|[+-]\\d{2}:\\d{2})$/;\n/**\n* What a Prisma 7 `DateTime` default, such as `2024-01-02T03:04:05.123+02:00`, means on a column of `dataType`, as the body of the type's tag: `date` keeps the written date, `time` and `timestamp` the written wall-clock time without the offset, `timetz` the time with the written offset, and `timestamptz` the written instant, offset included. The tag reads the body as Postgres reads the default Prisma 7 writes. `undefined` for text that is not an RFC 3339 date and time, or a type that is not a date or time type.\n*/\nfunction prisma7TemporalTagBody(text, dataType) {\n\tconst match = RFC_3339.exec(text);\n\tif (match === null) return void 0;\n\tconst [, date = \"\", clock = \"\", zone = \"\"] = match;\n\tconst offset = zone.toUpperCase();\n\tswitch (dataType) {\n\t\tcase pgDate.id: return date;\n\t\tcase pgTime.id: return clock;\n\t\tcase pgTimetz.id: return `${clock}${offset}`;\n\t\tcase pgTimestamp.id: return `${date}T${clock}`;\n\t\tcase pgTimestamptz.id: return `${date}T${clock}${offset}`;\n\t\tdefault: return;\n\t}\n}\nconst MICROSECONDS_PER_SECOND = 1000000n;\nconst POSTGRES_EPOCH_MS = Date.UTC(2e3, 0, 1);\n/**\n* The value PostgreSQL stores for a Prisma 7 `DateTime` default with more fraction digits than a column of `dataType` with `precision` holds, written in the same RFC 3339 form: the fraction is first rounded to microseconds as PostgreSQL reads text, then to `precision` digits as it rounds a value for its column, a tie going away from midnight on 2000-01-01, PostgreSQL's epoch. `undefined` when the column holds the text as written, or for a date column, which keeps only the date.\n*/\nfunction prisma7TemporalStored(text, dataType, precision) {\n\tconst match = RFC_3339.exec(text);\n\tif (match === null || dataType === pgDate.id) return void 0;\n\tconst [, date = \"\", clock = \"\", zone = \"\"] = match;\n\tconst [hms = \"\", fraction = \"\"] = clock.split(\".\");\n\tif (fraction.length <= precision) return void 0;\n\tconst [year, month, day] = date.split(\"-\").map(Number);\n\tconst [hour, minute, second] = hms.split(\":\").map(Number);\n\tconst wallMs = (/* @__PURE__ */ new Date(0)).setUTCFullYear(year ?? 0, (month ?? 1) - 1, day ?? 1);\n\tconst wall = (BigInt(wallMs - POSTGRES_EPOCH_MS) / 1000n + BigInt((hour ?? 0) * 3600 + (minute ?? 0) * 60 + (second ?? 0))) * MICROSECONDS_PER_SECOND + microsecondsOf(fraction);\n\tconst instant = dataType === pgTimestamptz.id ? wall - offsetMicroseconds(zone) : wall;\n\tconst tieGoesEarlier = (dataType === pgTimestamp.id || dataType === pgTimestamptz.id) && instant < 0n;\n\treturn `${printedWall(roundedTo(wall, 10n ** BigInt(6 - precision), tieGoesEarlier), precision)}${zone}`;\n}\n/** PostgreSQL reads the fraction of a second as a double and rounds it to whole microseconds. */\nfunction microsecondsOf(fraction) {\n\tif (fraction.length <= 6) return BigInt(fraction.padEnd(6, \"0\"));\n\tconst scaled = Number(`0.${fraction}`) * 1e6;\n\tconst floor = Math.floor(scaled);\n\tconst rest = scaled - floor;\n\tconst rounded = rest > .5 || rest === .5 && floor % 2 === 1 ? floor + 1 : floor;\n\treturn BigInt(rounded);\n}\nfunction offsetMicroseconds(zone) {\n\tconst offset = /^([+-])(\\d{2}):(\\d{2})$/.exec(zone);\n\tif (offset === null) return 0n;\n\tconst [, sign, hours = \"0\", minutes = \"0\"] = offset;\n\tconst seconds = BigInt(Number(hours) * 3600 + Number(minutes) * 60);\n\treturn (sign === \"-\" ? -seconds : seconds) * MICROSECONDS_PER_SECOND;\n}\nfunction roundedTo(value, step, tieGoesEarlier) {\n\tconst rest = (value % step + step) % step;\n\tconst below = value - rest;\n\tconst twice = rest * 2n;\n\tif (twice > step || twice === step && !tieGoesEarlier) return below + step;\n\treturn below;\n}\nfunction printedWall(microseconds, precision) {\n\tconst rest = (microseconds % MICROSECONDS_PER_SECOND + MICROSECONDS_PER_SECOND) % MICROSECONDS_PER_SECOND;\n\tconst seconds = (microseconds - rest) / MICROSECONDS_PER_SECOND;\n\tconst at = new Date(POSTGRES_EPOCH_MS + Number(seconds) * 1e3);\n\tconst two = (n) => String(n).padStart(2, \"0\");\n\treturn `${`${String(at.getUTCFullYear()).padStart(4, \"0\")}-${two(at.getUTCMonth() + 1)}-${two(at.getUTCDate())}`}T${`${two(at.getUTCHours())}:${two(at.getUTCMinutes())}:${two(at.getUTCSeconds())}`}${precision === 0 ? \"\" : `.${String(rest).padStart(6, \"0\").slice(0, precision)}`}`;\n}\n//#endregion\n//#region src/core/psl-infer/junction-relation-field-names.ts\nconst EMPTY_FOREIGN_KEY_EXTRAS = {\n\textraRelationsByTable: /* @__PURE__ */ new Map(),\n\tcrossSpaceFieldNamesByTable: /* @__PURE__ */ new Map(),\n\tdanglingForeignKeysByTable: /* @__PURE__ */ new Map()\n};\nfunction idTable(name) {\n\treturn new SqlTableIR({\n\t\tname,\n\t\tcolumns: { id: {\n\t\t\tname: \"id\",\n\t\t\ttypeText: \"int4\",\n\t\t\tnullable: false\n\t\t} },\n\t\tforeignKeys: [],\n\t\tuniques: [],\n\t\tindexes: [],\n\t\tprimaryKey: { columns: [\"id\"] }\n\t});\n}\n/**\n* The relation field names `contract infer` prints for an implicit\n* many-to-many junction table whose columns `A` and `B` reference `tableA`\n* and `tableB`, found by running infer's PSL construction on that table.\n*/\nfunction junctionRelationFieldNames(tableA, tableB) {\n\tlet junctionName = \"_junction\";\n\twhile ([tableA, tableB].some((table) => toModelName(table).name === toModelName(junctionName).name)) junctionName = `${junctionName}x`;\n\tconst column = (name) => ({\n\t\tname,\n\t\ttypeText: \"int4\",\n\t\tnullable: false\n\t});\n\tconst foreignKey = (columnName, referencedTable) => ({\n\t\tcolumns: [columnName],\n\t\treferencedTable,\n\t\treferencedColumns: [\"id\"]\n\t});\n\tconst junction = new SqlTableIR({\n\t\tname: junctionName,\n\t\tcolumns: {\n\t\t\tA: column(\"A\"),\n\t\t\tB: column(\"B\")\n\t\t},\n\t\tforeignKeys: [foreignKey(\"A\", tableA), foreignKey(\"B\", tableB)],\n\t\tuniques: [],\n\t\tindexes: [],\n\t\tprimaryKey: { columns: [\"A\", \"B\"] }\n\t});\n\tconst document = buildPslDocumentAst(new SqlSchemaIR({ tables: {\n\t\t[tableA]: idTable(tableA),\n\t\t[tableB]: idTable(tableB),\n\t\t[junctionName]: junction\n\t} }), {\n\t\tcolumnTypes: () => ({\n\t\t\tpath: [\"Int\"],\n\t\t\targs: [],\n\t\t\texplicit: {\n\t\t\t\tpath: [\"Int4\"],\n\t\t\t\tvalues: []\n\t\t\t}\n\t\t}),\n\t\tdefaultMapping: createPostgresDefaultMapping(),\n\t\tdefaultOf: noInferredDefaults,\n\t\tcolumnDefaults: noColumnDefaults\n\t}, EMPTY_FOREIGN_KEY_EXTRAS);\n\tconst junctionModelName = toModelName(junctionName).name;\n\tconst fields = flatPslModels(document).find((model) => model.name === junctionModelName)?.fields;\n\tconst scalarFieldCount = Object.keys(junction.columns).length;\n\tconst [a = \"\", b = \"\"] = (fields ?? []).slice(scalarFieldCount).map((field) => field.name);\n\treturn [a, b];\n}\n//#endregion\n//#region src/core/prisma7-binding.ts\n/** The date and time types a Prisma 7 `DateTime` default can be written on. */\nconst DATE_TIME_TYPES = /* @__PURE__ */ new Set([\n\tpgTimestamp.id,\n\tpgTimestamptz.id,\n\tpgDate.id,\n\tpgTime.id,\n\tpgTimetz.id\n]);\nconst ENTRIES = postgresDataTypeEntries();\n/** The tag the authoring entry of `dataType` writes its values with. */\nfunction tagOf(dataType) {\n\tconst written = ENTRIES[dataType]?.written;\n\treturn written?.kind === \"tag\" ? written.tag : void 0;\n}\n/** A date or time column without a precision holds microseconds. */\nfunction precisionOf(typeParams) {\n\tconst precision = typeParams?.[\"precision\"];\n\treturn typeof precision === \"number\" ? precision : 6;\n}\nfunction base64ToHex(base64) {\n\tif (!/^[A-Za-z0-9+/]*={0,2}$/.test(base64) || base64.length % 4 !== 0) return void 0;\n\treturn `\\\\x${Buffer.from(base64, \"base64\").toString(\"hex\")}`;\n}\n/** The column's type as a migration writes it, such as `timestamp(6)`. */\nfunction writtenTypeName(dataType, typeParams) {\n\tconst type = postgresDataTypes.find((candidate) => candidate.id === dataType);\n\tif (type === void 0 || !isSqlDataType(type)) throw new InternalError(`The Postgres target registers no SQL data type \"${dataType}\".`);\n\treturn renderSqlTypeName(type, typeParams ?? {});\n}\n/** The SQL expression of a literal default, written as DDL writes the value: one literal, or for a list an array of them cast to an array of the column type. A date or time is written with the year text PostgreSQL reads. */\nfunction literalDefaultExpression(stored, column) {\n\tconst typeName = writtenTypeName(column.dataType, column.typeParams);\n\tconst text = (value) => typeof value === \"string\" && DATE_TIME_TYPES.has(column.dataType) ? postgresYearText(value) : value;\n\treturn Array.isArray(stored) ? inlineLiteral(stored.map(text), `${typeName}[]`) : inlineLiteral(text(stored), typeName);\n}\n/**\n* What the Postgres target supplies to the Prisma 7 interpreter. A `Bytes` or\n* `DateTime` default is read through the tag its column type's authoring entry\n* writes, as the current schema language reads it: a `Bytes` default's base64\n* as the hex body of `bytea`, and a `DateTime` default as the body of the date\n* or time tag that keeps what the written value means on the column.\n*/\nconst prisma7PostgresBinding = {\n\ttarget: postgresTargetDescriptorMeta,\n\tcreateNamespace: postgresCreateNamespace,\n\tproviders: [\"postgresql\", \"postgres\"],\n\ttypeMap: prisma7PostgresTypeMap,\n\tnativeEnum: {\n\t\tentityKind: \"native_enum\",\n\t\ttypeConstructor: [\"pg\", \"enum\"]\n\t},\n\textensions: {\n\t\tpreviewFeature: \"postgresqlExtensions\",\n\t\tentityKind: \"extension\",\n\t\tpacks: {\n\t\t\tvector: {\n\t\t\t\tid: \"pgvector\",\n\t\t\t\timportName: \"pgvector\",\n\t\t\t\timportPath: \"@prisma/orm-extension-pgvector/control\"\n\t\t\t},\n\t\t\tpostgis: {\n\t\t\t\tid: \"postgis\",\n\t\t\t\timportName: \"postgis\",\n\t\t\t\timportPath: \"@prisma/orm-extension-postgis/control\"\n\t\t\t},\n\t\t\tpg_search: {\n\t\t\t\tid: \"paradedb\",\n\t\t\t\timportName: \"paradedb\",\n\t\t\t\timportPath: \"@prisma/orm-extension-paradedb/control\"\n\t\t\t},\n\t\t\tcitext: {\n\t\t\t\tid: \"citext\",\n\t\t\t\timportName: \"citext\",\n\t\t\t\timportPath: \"@prisma/orm-postgres-contrib/citext/control\"\n\t\t\t}\n\t\t}\n\t},\n\tindexTypes: {\n\t\tBTree: \"btree\",\n\t\tHash: \"hash\",\n\t\tGin: \"gin\",\n\t\tGist: \"gist\",\n\t\tSpGist: \"spgist\",\n\t\tBrin: \"brin\"\n\t},\n\t/** `NAMEDATALEN - 1`. */\n\tidentifierMaxBytes: 63,\n\tdefaultConstraintNames: {\n\t\tprimaryKey: defaultPrimaryKeyName,\n\t\tforeignKey: defaultForeignKeyName\n\t},\n\tjunctionRelationFieldNames,\n\tliteralDefaultExpression,\n\tliteralDefaultForm: ({ dataType, typeParams }) => {\n\t\tif (dataType === pgJson.id || dataType === pgJsonb.id) return { kind: \"json\" };\n\t\tconst tag = tagOf(dataType);\n\t\tif (tag === void 0) return void 0;\n\t\tif (dataType === pgBytea.id) return {\n\t\t\tkind: \"tag\",\n\t\t\ttag,\n\t\t\tbody: base64ToHex\n\t\t};\n\t\tif (!DATE_TIME_TYPES.has(dataType)) return void 0;\n\t\treturn {\n\t\t\tkind: \"tag\",\n\t\t\ttag,\n\t\t\tbody: (text) => prisma7TemporalTagBody(text, dataType),\n\t\t\tfinerThanColumn: (text) => {\n\t\t\t\tconst heldDigits = precisionOf(typeParams);\n\t\t\t\tconst stored = prisma7TemporalStored(text, dataType, heldDigits);\n\t\t\t\treturn stored === void 0 ? void 0 : {\n\t\t\t\t\theldDigits,\n\t\t\t\t\tstored\n\t\t\t\t};\n\t\t\t}\n\t\t};\n\t}\n};\n//#endregion\nexport { prisma7PostgresBinding };\n\n//# sourceMappingURL=prisma7-binding.mjs.map"],"mappings":";;;;;;;;;;;;;AAaA,MAAM,WAAW;;;;AAIjB,SAAS,uBAAuB,MAAM,UAAU;CAC/C,MAAM,QAAQ,SAAS,KAAK,IAAI;CAChC,IAAI,UAAU,MAAM,OAAO,KAAK;CAChC,MAAM,GAAG,OAAO,IAAI,QAAQ,IAAI,OAAO,MAAM;CAC7C,MAAM,SAAS,KAAK,YAAY;CAChC,QAAQ,UAAR;EACC,KAAK,OAAO,IAAI,OAA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EAChD,OAAO;GACN,MAAM;GACN;GACA,OAAO,SAAS,uBAAuB,MAAM,QAAQ;GACrD,kBAAkB,SAAS;IAC1B,MAAM,aAAa,YAAY,UAAU;IACzC,MAAM,SAAS,sBAAsB,MAAM,UAAU,UAAU;IAC/D,OAAO,WAAW,KAAK,IAAI,KAAK,IAAI;KACnC;KACA;IACD;GACD;EACD;CACD;AACD"}
1
+ {"version":3,"file":"prisma7-binding-BGEW0R_9.mjs","names":[],"sources":["../../../../3-targets/postgres/1-target/dist/prisma7-binding.mjs"],"sourcesContent":["import { G as postgresDataTypes, I as pgTimestamptz, M as pgTime, P as pgTimestamp, R as pgTimetz, S as pgJsonb, Y as postgresYearText, s as pgBytea, u as pgDate, x as pgJson } from \"./data-types-DWfwErIu.mjs\";\nimport { r as inlineLiteral } from \"./sql-utils-CRPhDLp1.mjs\";\nimport { t as postgresDataTypeEntries } from \"./data-type-entries-CVxsfjF3.mjs\";\nimport { i as postgresCreateNamespace } from \"./postgres-schema-zd_p5Lg2.mjs\";\nimport { n as prisma7PostgresTypeMap, t as postgresTargetDescriptorMeta } from \"./descriptor-meta-46EhsECb.mjs\";\nimport { n as defaultPrimaryKeyName, t as defaultForeignKeyName } from \"./default-constraint-names-Cz9Yoeim.mjs\";\nimport { i as noInferredDefaults, r as createPostgresDefaultMapping, t as buildPslDocumentAst, u as noColumnDefaults } from \"./infer-psl-contract-DqtogWJ8.mjs\";\nimport { isSqlDataType, renderSqlTypeName } from \"@internal/sql-contract/data-type\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { flatPslModels } from \"@internal/framework-components/psl-ast\";\nimport { SqlSchemaIR, SqlTableIR } from \"@internal/sql-schema-ir/types\";\nimport { toModelName } from \"@internal/family-sql/psl-infer\";\n//#region src/core/prisma7-temporal-defaults.ts\nconst RFC_3339 = /^(\\d{4}-\\d{2}-\\d{2})[Tt ](\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?)([Zz]|[+-]\\d{2}:\\d{2})$/;\n/**\n* What a Prisma 7 `DateTime` default, such as `2024-01-02T03:04:05.123+02:00`, means on a column of `dataType`, as the body of the type's tag: `date` keeps the written date, `time` and `timestamp` the written wall-clock time without the offset, `timetz` the time with the written offset, and `timestamptz` the written instant, offset included. The tag reads the body as Postgres reads the default Prisma 7 writes. `undefined` for text that is not an RFC 3339 date and time, or a type that is not a date or time type.\n*/\nfunction prisma7TemporalTagBody(text, dataType) {\n\tconst match = RFC_3339.exec(text);\n\tif (match === null) return void 0;\n\tconst [, date = \"\", clock = \"\", zone = \"\"] = match;\n\tconst offset = zone.toUpperCase();\n\tswitch (dataType) {\n\t\tcase pgDate.id: return date;\n\t\tcase pgTime.id: return clock;\n\t\tcase pgTimetz.id: return `${clock}${offset}`;\n\t\tcase pgTimestamp.id: return `${date}T${clock}`;\n\t\tcase pgTimestamptz.id: return `${date}T${clock}${offset}`;\n\t\tdefault: return;\n\t}\n}\nconst MICROSECONDS_PER_SECOND = 1000000n;\nconst POSTGRES_EPOCH_MS = Date.UTC(2e3, 0, 1);\n/**\n* The value PostgreSQL stores for a Prisma 7 `DateTime` default with more fraction digits than a column of `dataType` with `precision` holds, written in the same RFC 3339 form: the fraction is first rounded to microseconds as PostgreSQL reads text, then to `precision` digits as it rounds a value for its column, a tie going away from midnight on 2000-01-01, PostgreSQL's epoch. `undefined` when the column holds the text as written, or for a date column, which keeps only the date.\n*/\nfunction prisma7TemporalStored(text, dataType, precision) {\n\tconst match = RFC_3339.exec(text);\n\tif (match === null || dataType === pgDate.id) return void 0;\n\tconst [, date = \"\", clock = \"\", zone = \"\"] = match;\n\tconst [hms = \"\", fraction = \"\"] = clock.split(\".\");\n\tif (fraction.length <= precision) return void 0;\n\tconst [year, month, day] = date.split(\"-\").map(Number);\n\tconst [hour, minute, second] = hms.split(\":\").map(Number);\n\tconst wallMs = (/* @__PURE__ */ new Date(0)).setUTCFullYear(year ?? 0, (month ?? 1) - 1, day ?? 1);\n\tconst wall = (BigInt(wallMs - POSTGRES_EPOCH_MS) / 1000n + BigInt((hour ?? 0) * 3600 + (minute ?? 0) * 60 + (second ?? 0))) * MICROSECONDS_PER_SECOND + microsecondsOf(fraction);\n\tconst instant = dataType === pgTimestamptz.id ? wall - offsetMicroseconds(zone) : wall;\n\tconst tieGoesEarlier = (dataType === pgTimestamp.id || dataType === pgTimestamptz.id) && instant < 0n;\n\treturn `${printedWall(roundedTo(wall, 10n ** BigInt(6 - precision), tieGoesEarlier), precision)}${zone}`;\n}\n/** PostgreSQL reads the fraction of a second as a double and rounds it to whole microseconds. */\nfunction microsecondsOf(fraction) {\n\tif (fraction.length <= 6) return BigInt(fraction.padEnd(6, \"0\"));\n\tconst scaled = Number(`0.${fraction}`) * 1e6;\n\tconst floor = Math.floor(scaled);\n\tconst rest = scaled - floor;\n\tconst rounded = rest > .5 || rest === .5 && floor % 2 === 1 ? floor + 1 : floor;\n\treturn BigInt(rounded);\n}\nfunction offsetMicroseconds(zone) {\n\tconst offset = /^([+-])(\\d{2}):(\\d{2})$/.exec(zone);\n\tif (offset === null) return 0n;\n\tconst [, sign, hours = \"0\", minutes = \"0\"] = offset;\n\tconst seconds = BigInt(Number(hours) * 3600 + Number(minutes) * 60);\n\treturn (sign === \"-\" ? -seconds : seconds) * MICROSECONDS_PER_SECOND;\n}\nfunction roundedTo(value, step, tieGoesEarlier) {\n\tconst rest = (value % step + step) % step;\n\tconst below = value - rest;\n\tconst twice = rest * 2n;\n\tif (twice > step || twice === step && !tieGoesEarlier) return below + step;\n\treturn below;\n}\nfunction printedWall(microseconds, precision) {\n\tconst rest = (microseconds % MICROSECONDS_PER_SECOND + MICROSECONDS_PER_SECOND) % MICROSECONDS_PER_SECOND;\n\tconst seconds = (microseconds - rest) / MICROSECONDS_PER_SECOND;\n\tconst at = new Date(POSTGRES_EPOCH_MS + Number(seconds) * 1e3);\n\tconst two = (n) => String(n).padStart(2, \"0\");\n\treturn `${`${String(at.getUTCFullYear()).padStart(4, \"0\")}-${two(at.getUTCMonth() + 1)}-${two(at.getUTCDate())}`}T${`${two(at.getUTCHours())}:${two(at.getUTCMinutes())}:${two(at.getUTCSeconds())}`}${precision === 0 ? \"\" : `.${String(rest).padStart(6, \"0\").slice(0, precision)}`}`;\n}\n//#endregion\n//#region src/core/psl-infer/junction-relation-field-names.ts\nconst EMPTY_FOREIGN_KEY_EXTRAS = {\n\textraRelationsByTable: /* @__PURE__ */ new Map(),\n\tcrossSpaceFieldNamesByTable: /* @__PURE__ */ new Map(),\n\tdanglingForeignKeysByTable: /* @__PURE__ */ new Map()\n};\nfunction idTable(name) {\n\treturn new SqlTableIR({\n\t\tname,\n\t\tcolumns: { id: {\n\t\t\tname: \"id\",\n\t\t\ttypeText: \"int4\",\n\t\t\tnullable: false\n\t\t} },\n\t\tforeignKeys: [],\n\t\tuniques: [],\n\t\tindexes: [],\n\t\tprimaryKey: { columns: [\"id\"] }\n\t});\n}\n/**\n* The relation field names `contract infer` prints for an implicit\n* many-to-many junction table whose columns `A` and `B` reference `tableA`\n* and `tableB`, found by running infer's PSL construction on that table.\n*/\nfunction junctionRelationFieldNames(tableA, tableB) {\n\tlet junctionName = \"_junction\";\n\twhile ([tableA, tableB].some((table) => toModelName(table).name === toModelName(junctionName).name)) junctionName = `${junctionName}x`;\n\tconst column = (name) => ({\n\t\tname,\n\t\ttypeText: \"int4\",\n\t\tnullable: false\n\t});\n\tconst foreignKey = (columnName, referencedTable) => ({\n\t\tcolumns: [columnName],\n\t\treferencedTable,\n\t\treferencedColumns: [\"id\"]\n\t});\n\tconst junction = new SqlTableIR({\n\t\tname: junctionName,\n\t\tcolumns: {\n\t\t\tA: column(\"A\"),\n\t\t\tB: column(\"B\")\n\t\t},\n\t\tforeignKeys: [foreignKey(\"A\", tableA), foreignKey(\"B\", tableB)],\n\t\tuniques: [],\n\t\tindexes: [],\n\t\tprimaryKey: { columns: [\"A\", \"B\"] }\n\t});\n\tconst document = buildPslDocumentAst(new SqlSchemaIR({ tables: {\n\t\t[tableA]: idTable(tableA),\n\t\t[tableB]: idTable(tableB),\n\t\t[junctionName]: junction\n\t} }), {\n\t\tcolumnTypes: () => ({\n\t\t\tpath: [\"Int\"],\n\t\t\targs: [],\n\t\t\texplicit: {\n\t\t\t\tpath: [\"Int4\"],\n\t\t\t\tvalues: []\n\t\t\t}\n\t\t}),\n\t\tdefaultMapping: createPostgresDefaultMapping(),\n\t\tdefaultOf: noInferredDefaults,\n\t\tcolumnDefaults: noColumnDefaults\n\t}, EMPTY_FOREIGN_KEY_EXTRAS);\n\tconst junctionModelName = toModelName(junctionName).name;\n\tconst fields = flatPslModels(document).find((model) => model.name === junctionModelName)?.fields;\n\tconst scalarFieldCount = Object.keys(junction.columns).length;\n\tconst [a = \"\", b = \"\"] = (fields ?? []).slice(scalarFieldCount).map((field) => field.name);\n\treturn [a, b];\n}\n//#endregion\n//#region src/core/prisma7-binding.ts\n/** The date and time types a Prisma 7 `DateTime` default can be written on. */\nconst DATE_TIME_TYPES = /* @__PURE__ */ new Set([\n\tpgTimestamp.id,\n\tpgTimestamptz.id,\n\tpgDate.id,\n\tpgTime.id,\n\tpgTimetz.id\n]);\nconst ENTRIES = postgresDataTypeEntries();\n/** The tag the authoring entry of `dataType` writes its values with. */\nfunction tagOf(dataType) {\n\tconst written = ENTRIES[dataType]?.written;\n\treturn written?.kind === \"tag\" ? written.tag : void 0;\n}\n/** A date or time column without a precision holds microseconds. */\nfunction precisionOf(typeParams) {\n\tconst precision = typeParams?.[\"precision\"];\n\treturn typeof precision === \"number\" ? precision : 6;\n}\nfunction base64ToHex(base64) {\n\tif (!/^[A-Za-z0-9+/]*={0,2}$/.test(base64) || base64.length % 4 !== 0) return void 0;\n\treturn `\\\\x${Buffer.from(base64, \"base64\").toString(\"hex\")}`;\n}\n/** The column's type as a migration writes it, such as `timestamp(6)`. */\nfunction writtenTypeName(dataType, typeParams) {\n\tconst type = postgresDataTypes.find((candidate) => candidate.id === dataType);\n\tif (type === void 0 || !isSqlDataType(type)) throw new InternalError(`The Postgres target registers no SQL data type \"${dataType}\".`);\n\treturn renderSqlTypeName(type, typeParams ?? {});\n}\n/** The SQL expression of a literal default, written as DDL writes the value: one literal, or for a list an array of them cast to an array of the column type. A date or time is written with the year text PostgreSQL reads. */\nfunction literalDefaultExpression(stored, column) {\n\tconst typeName = writtenTypeName(column.dataType, column.typeParams);\n\tconst text = (value) => typeof value === \"string\" && DATE_TIME_TYPES.has(column.dataType) ? postgresYearText(value) : value;\n\treturn Array.isArray(stored) ? inlineLiteral(stored.map(text), `${typeName}[]`) : inlineLiteral(text(stored), typeName);\n}\n/**\n* What the Postgres target supplies to the Prisma 7 interpreter. A `Bytes` or\n* `DateTime` default is read through the tag its column type's authoring entry\n* writes, as the current schema language reads it: a `Bytes` default's base64\n* as the hex body of `bytea`, and a `DateTime` default as the body of the date\n* or time tag that keeps what the written value means on the column.\n*/\nconst prisma7PostgresBinding = {\n\ttarget: postgresTargetDescriptorMeta,\n\tcreateNamespace: postgresCreateNamespace,\n\tproviders: [\"postgresql\", \"postgres\"],\n\ttypeMap: prisma7PostgresTypeMap,\n\tnativeEnum: {\n\t\tentityKind: \"native_enum\",\n\t\ttypeConstructor: [\"pg\", \"enum\"]\n\t},\n\textensions: {\n\t\tpreviewFeature: \"postgresqlExtensions\",\n\t\tentityKind: \"extension\",\n\t\tpacks: {\n\t\t\tvector: {\n\t\t\t\tid: \"pgvector\",\n\t\t\t\timportName: \"pgvector\",\n\t\t\t\timportPath: \"@prisma/orm-extension-pgvector/control\"\n\t\t\t},\n\t\t\tpostgis: {\n\t\t\t\tid: \"postgis\",\n\t\t\t\timportName: \"postgis\",\n\t\t\t\timportPath: \"@prisma/orm-extension-postgis/control\"\n\t\t\t},\n\t\t\tpg_search: {\n\t\t\t\tid: \"paradedb\",\n\t\t\t\timportName: \"paradedb\",\n\t\t\t\timportPath: \"@prisma/orm-extension-paradedb/control\"\n\t\t\t},\n\t\t\tcitext: {\n\t\t\t\tid: \"citext\",\n\t\t\t\timportName: \"citext\",\n\t\t\t\timportPath: \"@prisma/orm-postgres-contrib/citext/control\"\n\t\t\t}\n\t\t}\n\t},\n\tindexTypes: {\n\t\tBTree: \"btree\",\n\t\tHash: \"hash\",\n\t\tGin: \"gin\",\n\t\tGist: \"gist\",\n\t\tSpGist: \"spgist\",\n\t\tBrin: \"brin\"\n\t},\n\t/** `NAMEDATALEN - 1`. */\n\tidentifierMaxBytes: 63,\n\tdefaultConstraintNames: {\n\t\tprimaryKey: defaultPrimaryKeyName,\n\t\tforeignKey: defaultForeignKeyName\n\t},\n\tjunctionRelationFieldNames,\n\tliteralDefaultExpression,\n\tliteralDefaultForm: ({ dataType, typeParams }) => {\n\t\tif (dataType === pgJson.id || dataType === pgJsonb.id) return { kind: \"json\" };\n\t\tconst tag = tagOf(dataType);\n\t\tif (tag === void 0) return void 0;\n\t\tif (dataType === pgBytea.id) return {\n\t\t\tkind: \"tag\",\n\t\t\ttag,\n\t\t\tbody: base64ToHex\n\t\t};\n\t\tif (!DATE_TIME_TYPES.has(dataType)) return void 0;\n\t\treturn {\n\t\t\tkind: \"tag\",\n\t\t\ttag,\n\t\t\tbody: (text) => prisma7TemporalTagBody(text, dataType),\n\t\t\tfinerThanColumn: (text) => {\n\t\t\t\tconst heldDigits = precisionOf(typeParams);\n\t\t\t\tconst stored = prisma7TemporalStored(text, dataType, heldDigits);\n\t\t\t\treturn stored === void 0 ? void 0 : {\n\t\t\t\t\theldDigits,\n\t\t\t\t\tstored\n\t\t\t\t};\n\t\t\t}\n\t\t};\n\t}\n};\n//#endregion\nexport { prisma7PostgresBinding };\n\n//# sourceMappingURL=prisma7-binding.mjs.map"],"mappings":";;;;;;;;;;;;;AAaA,MAAM,WAAW;;;;AAIjB,SAAS,uBAAuB,MAAM,UAAU;CAC/C,MAAM,QAAQ,SAAS,KAAK,IAAI;CAChC,IAAI,UAAU,MAAM,OAAO,KAAK;CAChC,MAAM,GAAG,OAAO,IAAI,QAAQ,IAAI,OAAO,MAAM;CAC7C,MAAM,SAAS,KAAK,YAAY;CA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AC,gBAAgB,IAAI,QAAQ,GAAG,OAAO,KAAK;EAChD,OAAO;GACN,MAAM;GACN;GACA,OAAO,SAAS,uBAAuB,MAAM,QAAQ;GACrD,kBAAkB,SAAS;IAC1B,MAAM,aAAa,YAAY,UAAU;IACzC,MAAM,SAAS,sBAAsB,MAAM,UAAU,UAAU;IAC/D,OAAO,WAAW,KAAK,IAAI,KAAK,IAAI;KACnC;KACA;IACD;GACD;EACD;CACD;AACD"}
@@ -181,7 +181,28 @@ declare const prisma7PostgresBinding: {
181
181
  };
182
182
  };
183
183
  readonly sql: {
184
+ readonly Varchar: {
185
+ readonly kind: "typeConstructor";
186
+ readonly documentation: "Variable-length text with a required maximum character length.";
187
+ readonly args: readonly [{
188
+ readonly kind: "value";
189
+ readonly dataType: "pg/int4";
190
+ readonly name: "length";
191
+ }];
192
+ readonly output: {
193
+ readonly codecId: "sql/varchar@1";
194
+ readonly typeParams: {
195
+ readonly length: {
196
+ readonly kind: "arg";
197
+ readonly index: 0;
198
+ };
199
+ };
200
+ };
201
+ };
184
202
  readonly String: {
203
+ readonly deprecated: {
204
+ readonly replacement: "sql.Varchar";
205
+ };
185
206
  readonly kind: "typeConstructor";
186
207
  readonly documentation: "Variable-length text with a required maximum character length.";
187
208
  readonly args: readonly [{
@@ -506,6 +527,28 @@ declare const prisma7PostgresBinding: {
506
527
  readonly type: "Bytea";
507
528
  }];
508
529
  };
530
+ readonly Json: {
531
+ readonly kind: "typeChoice";
532
+ readonly documentation: "A JSON value. `storage` is json, the JSON text as written, or jsonb, a binary form that supports equality filters, indexes and unique constraints.";
533
+ readonly args: readonly [{
534
+ readonly kind: "option";
535
+ readonly name: "storage";
536
+ readonly values: readonly ["json", "jsonb"];
537
+ readonly default: "json";
538
+ readonly optional: true;
539
+ }];
540
+ readonly choices: readonly [{
541
+ readonly when: {
542
+ readonly storage: "json";
543
+ };
544
+ readonly type: "PlainJson";
545
+ }, {
546
+ readonly when: {
547
+ readonly storage: "jsonb";
548
+ };
549
+ readonly type: "Jsonb";
550
+ }];
551
+ };
509
552
  readonly DateTime: {
510
553
  readonly kind: "typeChoice";
511
554
  readonly documentation: "A moment in time. `as` is what the application reads: jsDate (a JavaScript Date), temporal (Temporal.Instant) or string. `storage` is timestamptz or timestamp, a timestamp read and written as UTC.";
@@ -824,10 +867,10 @@ declare const prisma7PostgresBinding: {
824
867
  readonly codecId: "pg/bytea@1";
825
868
  };
826
869
  };
827
- readonly Json: {
870
+ readonly PlainJson: {
828
871
  readonly kind: "typeConstructor";
829
872
  readonly inferred: true;
830
- readonly documentation: "A JSON value stored as PostgreSQL json.";
873
+ readonly documentation: "A JSON value stored as PostgreSQL json, the JSON text as written.";
831
874
  readonly output: {
832
875
  readonly codecId: "pg/json@1";
833
876
  };
@@ -1206,7 +1249,7 @@ declare const prisma7PostgresBinding: {
1206
1249
  name: string;
1207
1250
  tableName: string;
1208
1251
  namespaceId: string;
1209
- operation: "select" | "insert" | "update" | "delete" | "all";
1252
+ operation: "select" | "delete" | "insert" | "update" | "all";
1210
1253
  roles: readonly string[];
1211
1254
  permissive: boolean;
1212
1255
  prefix?: string;
@@ -1580,4 +1623,4 @@ declare const prisma7PostgresBinding: {
1580
1623
  };
1581
1624
  //#endregion
1582
1625
  export { prisma7PostgresBinding as t };
1583
- //# sourceMappingURL=prisma7-binding-Ktqdq2S4.d.mts.map
1626
+ //# sourceMappingURL=prisma7-binding-DSQpvEBe.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prisma7-binding-DSQpvEBe.d.mts","names":[],"sources":["../../../../3-targets/postgres/1-target/dist/prisma7-binding.d.mts"],"mappings":";;;;;;;;;;;;;UAaU;WACC;WACA;;;;;iBAKM,sBAAsB;;iBAEtB,sBAAsB,mBAAmB;;;;;;;;iBAQzC,2BAA2B,gBAAgB;;;iBAG3C,YAAY;;iBAEZ,yBAAyB,QAAQ,WAAW;WAClD;WACA,aAAa,SAAS;;;;;;;;;cASnB;WACH;aACE;aACA;aACA;aACA,yDAAyD,iBAAiB,uBAAuB;eAC/F;SACN;eACM;SACN;eACM;SACN;eACM;SACN;eACM;SACN;eACM;SACN;eACM;QACP;QACA;;;aAGK;eACE;iBACE;mBACE;qBACE;qBACA;qBACA;uBACE;uBACA;;qBAEF;uBACE;;;;iBAIN;mBACE;qBACE;qBACA;qBACA;uBACE;yBACE;yBACA;2BACE;;;uBAGJ;yBACE;yBACA;;;;mBAIN;qBACE;qBACA;qBACA;uBACE;yBACE;yBACA;2BACE;;;uBAGJ;yBACE;yBACA;;uBAEF;yBACE;yBACA;;;;;iBAKR;mBACE;mBACA;mBACA;qBACE;uBACE;uBACA;yBACE;;;;;iBAKR;mBACE;mBACA;mBACA;qBACE;uBACE;uBACA;yBACE;;;;;iBAKR;mBACE;mBACA;mBACA;qBACE;uBACE;uBACA;yBACE;;;;;iBAKR;mBACE;mBACA;mBACA;qBACE;uBACE;uBACA;yBACE;;;;;iBAKR;mBACE;mBACA;mBACA;qBACE;uBACE;uBACA;yBACE;;;;;iBAKR;mBACE;qBACE;qBACA;qBACA;uBACE;uBACA;uBACA;;qBAEF;uBACE;uBACA;yBACE;2BACE;2BACA;;;;;mBAKR;qBACE;uBACE;;qBAEF;qBACA;qBACA;uBACE;uBACA;uBACA;;qBAEF;uBACE;uBACA;yBACE;2BACE;2BACA;;;;;mBAKR;qBACE;qBACA;qBACA;uBACE;uBACA;uBACA;;qBAEF;uBACE;uBACA;yBACE;2BACE;2BACA;;;;;;iBAMV;mBACE;qBACE;;mBAEF;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;qBACE;;mBAEF;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;qBACE;;mBAEF;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;;qBAEA;qBACA;qBACA;qBACA;;mBAEF;qBACE;qBACA;uBACE;yBACE;yBACA;;uBAEF;yBACE;yBACA;;;;;iBAKR;mBACE;qBACE;;mBAEF;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;qBACE;;mBAEF;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;qBACE;;mBAEF;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;;mBAEF;qBACE;qBACA;uBACE;yBACE;yBACA;;;;;iBAKR;mBACE;qBACE;;mBAEF;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;;mBAEF;qBACE;qBACA;uBACE;yBACE;yBACA;;;;;iBAKR;mBACE;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;qBACA;;mBAEF;qBACE;uBACE;;qBAEF;;qBAEA;uBACE;;qBAEF;;;iBAGJ;mBACE;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;qBACA;;qBAEA;qBACA;qBACA;qBACA;qBACA;;mBAEF;qBACE;uBACE;uBACA;;qBAEF;;qBAEA;uBACE;uBACA;;qBAEF;;qBAEA;uBACE;uBACA;;qBAEF;;;iBAGJ;mBACE;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;qBACA;;mBAEF;qBACE;uBACE;;qBAEF;;qBAEA;uBACE;;qBAEF;;;iBAGJ;mBACE;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;qBACA;;qBAEA;qBACA;qBACA;qBACA;;qBAEA;qBACA;qBACA;qBACA;;mBAEF;qBACE;uBACE;;qBAEF;;;iBAGJ;mBACE;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;qBACA;;qBAEA;qBACA;qBACA;qBACA;;mBAEF;qBACE;uBACE;;qBAEF;;qBAEA;uBACE;;qBAEF;;qBAEA;uBACE;;qBAEF;;;iBAGJ;mBACE;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;qBACA;;mBAEF;qBACE;uBACE;;qBAEF;;;iBAGJ;mBACE;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;qBACA;;mBAEF;qBACE;uBACE;;qBAEF;;;iBAGJ;mBACE;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;qBACA;;mBAEF;qBACE;uBACE;;qBAEF;;qBAEA;uBACE;;qBAEF;;;iBAGJ;mBACE;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;qBACA;;qBAEA;qBACA;qBACA;qBACA;qBACA;;qBAEA;qBACA;qBACA;qBACA;;mBAEF;qBACE;uBACE;uBACA;;qBAEF;qBACA;uBACE;;;qBAGF;uBACE;uBACA;;qBAEF;;qBAEA;uBACE;uBACA;;qBAEF;;qBAEA;uBACE;uBACA;;qBAEF;qBACA;uBACE;;;qBAGF;uBACE;uBACA;;qBAEF;;qBAEA;uBACE;uBACA;;qBAEF;;;iBAGJ;mBACE;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;qBACA;;qBAEA;qBACA;qBACA;qBACA;qBACA;;mBAEF;qBACE;uBACE;uBACA;;qBAEF;;qBAEA;uBACE;uBACA;;qBAEF;;;iBAGJ;mBACE;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;qBACA;;qBAEA;qBACA;qBACA;qBACA;qBACA;;qBAEA;qBACA;qBACA;qBACA;;mBAEF;qBACE;uBACE;uBACA;;qBAEF;;qBAEA;uBACE;uBACA;;qBAEF;;qBAEA;uBACE;uBACA;;qBAEF;;;iBAGJ;mBACE;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;qBACA;;qBAEA;qBACA;qBACA;qBACA;qBACA;;qBAEA;qBACA;qBACA;qBACA;;mBAEF;qBACE;uBACE;uBACA;;qBAEF;;qBAEA;uBACE;uBACA;;qBAEF;;;iBAGJ;mBACE;mBACA;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;;qBAEA;qBACA;qBACA;qBACA;;mBAEF;qBACE;qBACA;uBACE;yBACE;yBACA;;uBAEF;yBACE;yBACA;;;;;iBAKR;mBACE;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;;mBAEF;qBACE;qBACA;uBACE;yBACE;yBACA;;;;;iBAKR;mBACE;mBACA;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;;mBAEF;qBACE;qBACA;uBACE;yBACE;yBACA;;;;;iBAKR;mBACE;mBACA;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;;mBAEF;qBACE;qBACA;uBACE;yBACE;yBACA;;;;;iBAKR;mBACE;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;;mBAEF;qBACE;qBACA;uBACE;yBACE;yBACA;;;;;iBAKR;mBACE;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;;mBAEF;qBACE;qBACA;uBACE;yBACE;yBACA;;;;;iBAKR;mBACE;mBACA;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;;mBAEF;qBACE;qBACA;uBACE;yBACE;yBACA;;;;;iBAKR;mBACE;mBACA;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;;mBAEF;qBACE;qBACA;uBACE;yBACE;yBACA;;;;;iBAKR;mBACE;mBACA;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;;mBAEF;qBACE;qBACA;uBACE;yBACE;yBACA;;;;;iBAKR;mBACE;mBACA;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;;mBAEF;qBACE;qBACA;uBACE;yBACE;yBACA;;;;;iBAKR;mBACE;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;;mBAEF;qBACE;qBACA;uBACE;yBACE;yBACA;;;;;iBAKR;mBACE;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;;mBAEF;qBACE;qBACA;uBACE;yBACE;yBACA;;;;;iBAKR;mBACE;mBACA;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;;mBAEF;qBACE;qBACA;uBACE;yBACE;yBACA;;;;;iBAKR;mBACE;mBACA;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;;mBAEF;qBACE;qBACA;uBACE;yBACE;yBACA;;;;;iBAKR;mBACE;mBACA;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;;mBAEF;qBACE;qBACA;uBACE;yBACE;yBACA;;;;;iBAKR;mBACE;mBACA;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;;mBAEF;qBACE;qBACA;uBACE;yBACE;yBACA;;;;;iBAKR;mBACE;mBACA;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;;mBAEF;qBACE;qBACA;uBACE;yBACE;yBACA;;;;;;eAMV,WAAW,SAAS,kEAAkE;eACtF,uEAAuE;eACvE,yBAAyB,SAAS;eAClC;iBACE;mBACE;mBACA;mBACA,+DAA+D;YACtE;YACA;YACA;YACA;;mBAEO;qBACE,UAAU,OAAO,oBAAoB,wDAAwD,2BAA2B;;;iBAG5H;mBACE;mBACA;mBACA,+DAA+D;YACtE;YACA;YACA;;mBAEO;qBACE,UAAU,OAAO,+BAA+B;;;iBAGpD;mBACE;mBACA;mBACA,+DAA+D;YACtE;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;;mBAEO;YACP,UAAU,OAAO,yBAAyB,wDAAwD,2BAA2B;YAC7H,eAAe,QAAQ;cACrB;;;;iBAIG;mBACE;mBACA;mBACA,+DAA+D;YACtE;YACA;YACA;YACA;;mBAEO;YACP,UAAU,sCAAsC,wBAAwB,yBAAyB,wDAAwD,2BAA2B;YACpL,iBAAiB,QAAQ;cACvB;cACA;;;;iBAIG;mBACE;mBACA;mBACA,+DAA+D;YACtE;YACA;YACA;;mBAEO;qBACE,UAAU,sCAAsC,4BAA4B;qBAC5E;;;;eAIN;iBACE;UACP;UACA;UACA;UACA;UACA;YACE;;UAEF,aAAa;UACb;qBACW;qBACA;;UAEX;YACE,0CAA0C;cACxC;8CACgC;;;iBAG7B;UACP;UACA;UACA;UACA;UACA;YACE;;UAEF,aAAa;UACb;qBACW;qBACA;;UAEX;YACE,0CAA0C;cACxC;8CACgC;;;iBAG7B;UACP;UACA;UACA;UACA;UACA;YACE;;UAEF,aAAa;UACb;qBACW;qBACA;;UAEX;YACE,0CAA0C;cACxC;8CACgC;;;iBAG7B;UACP;UACA;UACA;UACA;UACA;YACE;;UAEF,aAAa;UACb;qBACW;qBACA;;UAEX;YACE,0CAA0C;cACxC;8CACgC;;;iBAG7B;UACP;UACA;UACA;UACA;UACA;YACE;;UAEF,aAAa;UACb;qBACW;qBACA;;UAEX;YACE,0CAA0C;cACxC;8CACgC;;;iBAG7B;UACP;UACA;UACA;UACA;UACA;YACE;;UAEF,aAAa;UACb;UACA;YACE,0CAA0C;cACxC;8CACgC;;;iBAG7B;UACP;UACA;UACA;UACA;UACA;YACE;;UAEF,aAAa;;iBAEN;UACP;UACA;UACA;UACA;UACA;YACE;;UAEF,aAAa;;;eAGR;iBACE;mBACE;mBACA;mBACA,qCAAqC;mBACrC,QAAQ,SAAS,sBAAsB,wDAAwD;YACtG;YACA,QAAQ;;;iBAGH;mBACE;mBACA;mBACA,qCAAqC;mBACrC;mBACA,QAAQ;qBACN,QAAQ;qBACR,WAAW;qBACX;qBACA;qBACA,uCAAuC;aAC/C,wDAAwD;YACzD;cACE;cACA;cACA;gBACE;gBACA;;cAEF;cACA;cACA;cACA;;;;;eAKC,wBAAwB;eACxB,0BAA0B;eAC1B,+BAA+B;eAC/B,2BAA2B;;aAE7B;eACE;eACA,YAAY,8DAA8D;iBACxE;iBACA;mBACE;mBACA,qCAAqC,sDAAsD,6CAA6C,8CAA8C;mBACtL;;;eAGJ;;eAEA;eACA,YAAY,8DAA8D;iBACxE;iBACA;mBACE;mBACA,qCAAqC,0CAA0C;mBAC/E;;;eAGJ;;eAEA;eACA,YAAY,8DAA8D;iBACxE;iBACA;mBACE;mBACA,qCAAqC,uDAAuD,6CAA6C,+CAA+C;mBACxL;;;eAGJ;2DAC4C,sFAAsF;aACpI;eACE,yBAAyB;eACzB,gFAAgF;;aAElF;eACE;iBACE;mBACE;mBACA;mBACA;;;;aAIN;aACA;aACA;aACA;aACA;aACA;aACA,mEAAmE;aACnE;eACE;eACA;;aAEF,eAAe;;aAEf,eAAe;aACf,wBAAwB;aACxB,6BAA6B;aAC7B;eACE;iBACE;iBACA;;;;WAIN,wBAAwB;WACxB;WACA;IACP,SAAS,SAAS,eAAe;IACjC,aAAa,SAAS,eAAe;IACrC;eACW;iBACE;iBACA;iBACA;;;;WAIN;aACE;aACA;;WAEF;aACE;aACA;aACA;eACE;iBACE;iBACA;iBACA;;eAEF;iBACE;iBACA;iBACA;;eAEF;iBACE;iBACA;iBACA;;eAEF;iBACE;iBACA;iBACA;;;;WAIN;aACE;aACA;aACA;aACA;aACA;aACA;;;WAGF;WACA;aACE,mBAAmB;aACnB,mBAAmB;;WAErB,mCAAmC;WACnC,iCAAiC;WACjC,uBAAuB,UAAU;aAC/B;aACA,aAAa,SAAS;;aAEtB;aACA;aACA;aACA;;aAEA;aACA;aACA,aAAa;aACb;;aAEA;aACA;aACA,OAAO;aACP,kBAAkB;MACzB;MACA"}
@@ -1,9 +1,9 @@
1
1
  import { t as DEFAULT_NAMESPACE_ID } from "./namespace-ids-xtp_ZY86-Cxc0dBbO.mjs";
2
2
  import { m as isPostgresSchema } from "./postgres-schema-zd_p5Lg2-BdJlG7Cg.mjs";
3
3
  import { UNBOUND_NAMESPACE_ID } from "@prisma/orm-framework/components/ir";
4
- //#region ../../../3-targets/postgres/1-target/dist/resolve-ddl-schema-ChjIoY0I.mjs
4
+ //#region ../../../3-targets/postgres/1-target/dist/resolve-ddl-schema-BwKuzGm-.mjs
5
5
  /**
6
- * Given the contract's storage and a namespace id, returns the live Postgres DDL schema name that namespace maps to. A named Postgres namespace dispatches to its `ddlSchemaName(storage)`; the unbound sentinel resolves to `DEFAULT_NAMESPACE_ID`, the schema an unqualified table lands in under the default search path; a bare object payload (used by some tests) falls back to the namespace id itself. An extension in the unbound namespace does not go through here: it has no fixed schema, and verification finds it through the connection's search path (ADR 316).
6
+ * Given the contract's storage and a namespace id, returns the live Postgres DDL schema name that namespace maps to. A named Postgres namespace dispatches to its `ddlSchemaName(storage)`; the unbound sentinel resolves to `DEFAULT_NAMESPACE_ID`, the schema an unqualified table lands in under the default search path; a bare object payload (used by some tests) falls back to the namespace id itself. An extension in the unbound namespace does not go through here: it has no fixed schema, and verification finds it through the connection's search path (ADR 321).
7
7
  */
8
8
  function resolveDdlSchemaForNamespaceStorage(storage, namespaceId) {
9
9
  if (namespaceId === UNBOUND_NAMESPACE_ID) return DEFAULT_NAMESPACE_ID;
@@ -26,4 +26,4 @@ function ddlSchemaOfCallSchema(callSchemaName) {
26
26
  //#endregion
27
27
  export { emissionSchemaForNamespace as n, resolveDdlSchemaForNamespaceStorage as r, ddlSchemaOfCallSchema as t };
28
28
 
29
- //# sourceMappingURL=resolve-ddl-schema-ChjIoY0I-D7TWkRXc.mjs.map
29
+ //# sourceMappingURL=resolve-ddl-schema-BwKuzGm--BVgPhp86.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"resolve-ddl-schema-ChjIoY0I-D7TWkRXc.mjs","names":[],"sources":["../../../../3-targets/postgres/1-target/dist/resolve-ddl-schema-ChjIoY0I.mjs"],"sourcesContent":["import { t as DEFAULT_NAMESPACE_ID } from \"./namespace-ids-xtp_ZY86.mjs\";\nimport { r as isPostgresSchema } from \"./postgres-schema-zd_p5Lg2.mjs\";\nimport { UNBOUND_NAMESPACE_ID } from \"@internal/framework-components/ir\";\n//#region src/core/migrations/resolve-ddl-schema.ts\n/**\n* Given the contract's storage and a namespace id, returns the live Postgres DDL schema name that namespace maps to. A named Postgres namespace dispatches to its `ddlSchemaName(storage)`; the unbound sentinel resolves to `DEFAULT_NAMESPACE_ID`, the schema an unqualified table lands in under the default search path; a bare object payload (used by some tests) falls back to the namespace id itself. An extension in the unbound namespace does not go through here: it has no fixed schema, and verification finds it through the connection's search path (ADR 316).\n*/\nfunction resolveDdlSchemaForNamespaceStorage(storage, namespaceId) {\n\tif (namespaceId === UNBOUND_NAMESPACE_ID) return DEFAULT_NAMESPACE_ID;\n\tconst namespace = storage.namespaces[namespaceId];\n\tif (namespace && isPostgresSchema(namespace)) return namespace.ddlSchemaName(storage);\n\treturn namespaceId;\n}\n/**\n* The schema name a planned call carries for a namespace: the unbound sentinel stays as it is, so the call renders without a schema, and a named namespace resolves to its DDL schema.\n*/\nfunction emissionSchemaForNamespace(contract, namespaceId) {\n\treturn namespaceId === UNBOUND_NAMESPACE_ID ? UNBOUND_NAMESPACE_ID : resolveDdlSchemaForNamespaceStorage(contract.storage, namespaceId);\n}\n/**\n* The live DDL schema a call's schema name stands for: the unbound sentinel is `DEFAULT_NAMESPACE_ID`, and any other name is already a DDL schema.\n*/\nfunction ddlSchemaOfCallSchema(callSchemaName) {\n\treturn callSchemaName === UNBOUND_NAMESPACE_ID ? DEFAULT_NAMESPACE_ID : callSchemaName;\n}\n//#endregion\nexport { emissionSchemaForNamespace as n, resolveDdlSchemaForNamespaceStorage as r, ddlSchemaOfCallSchema as t };\n\n//# sourceMappingURL=resolve-ddl-schema-ChjIoY0I.mjs.map"],"mappings":";;;;;;;AAOA,SAAS,oCAAoC,SAAS,aAAa;CAClE,IAAI,gBAAgB,sBAAsB,OAAO;CACjD,MAAM,YAAY,QAAQ,WAAW;CACrC,IAAI,aAAa,iBAAiB,SAAS,GAAG,OAAO,UAAU,cAAc,OAAO;CACpF,OAAO;AACR;;;;AAIA,SAAS,2BAA2B,UAAU,aAAa;CAC1D,OAAO,gBAAgB,uBAAuB,uBAAuB,oCAAoC,SAAS,SAAS,WAAW;AACvI;;;;AAIA,SAAS,sBAAsB,gBAAgB;CAC9C,OAAO,mBAAmB,uBAAuB,uBAAuB;AACzE"}
1
+ {"version":3,"file":"resolve-ddl-schema-BwKuzGm--BVgPhp86.mjs","names":[],"sources":["../../../../3-targets/postgres/1-target/dist/resolve-ddl-schema-BwKuzGm-.mjs"],"sourcesContent":["import { t as DEFAULT_NAMESPACE_ID } from \"./namespace-ids-xtp_ZY86.mjs\";\nimport { r as isPostgresSchema } from \"./postgres-schema-zd_p5Lg2.mjs\";\nimport { UNBOUND_NAMESPACE_ID } from \"@internal/framework-components/ir\";\n//#region src/core/migrations/resolve-ddl-schema.ts\n/**\n* Given the contract's storage and a namespace id, returns the live Postgres DDL schema name that namespace maps to. A named Postgres namespace dispatches to its `ddlSchemaName(storage)`; the unbound sentinel resolves to `DEFAULT_NAMESPACE_ID`, the schema an unqualified table lands in under the default search path; a bare object payload (used by some tests) falls back to the namespace id itself. An extension in the unbound namespace does not go through here: it has no fixed schema, and verification finds it through the connection's search path (ADR 321).\n*/\nfunction resolveDdlSchemaForNamespaceStorage(storage, namespaceId) {\n\tif (namespaceId === UNBOUND_NAMESPACE_ID) return DEFAULT_NAMESPACE_ID;\n\tconst namespace = storage.namespaces[namespaceId];\n\tif (namespace && isPostgresSchema(namespace)) return namespace.ddlSchemaName(storage);\n\treturn namespaceId;\n}\n/**\n* The schema name a planned call carries for a namespace: the unbound sentinel stays as it is, so the call renders without a schema, and a named namespace resolves to its DDL schema.\n*/\nfunction emissionSchemaForNamespace(contract, namespaceId) {\n\treturn namespaceId === UNBOUND_NAMESPACE_ID ? UNBOUND_NAMESPACE_ID : resolveDdlSchemaForNamespaceStorage(contract.storage, namespaceId);\n}\n/**\n* The live DDL schema a call's schema name stands for: the unbound sentinel is `DEFAULT_NAMESPACE_ID`, and any other name is already a DDL schema.\n*/\nfunction ddlSchemaOfCallSchema(callSchemaName) {\n\treturn callSchemaName === UNBOUND_NAMESPACE_ID ? DEFAULT_NAMESPACE_ID : callSchemaName;\n}\n//#endregion\nexport { emissionSchemaForNamespace as n, resolveDdlSchemaForNamespaceStorage as r, ddlSchemaOfCallSchema as t };\n\n//# sourceMappingURL=resolve-ddl-schema-BwKuzGm-.mjs.map"],"mappings":";;;;;;;AAOA,SAAS,oCAAoC,SAAS,aAAa;CAClE,IAAI,gBAAgB,sBAAsB,OAAO;CACjD,MAAM,YAAY,QAAQ,WAAW;CACrC,IAAI,aAAa,iBAAiB,SAAS,GAAG,OAAO,UAAU,cAAc,OAAO;CACpF,OAAO;AACR;;;;AAIA,SAAS,2BAA2B,UAAU,aAAa;CAC1D,OAAO,gBAAgB,uBAAuB,uBAAuB,oCAAoC,SAAS,SAAS,WAAW;AACvI;;;;AAIA,SAAS,sBAAsB,gBAAgB;CAC9C,OAAO,mBAAmB,uBAAuB,uBAAuB;AACzE"}
@@ -1 +1 @@
1
- {"version":3,"file":"runtime-DPhbi9_3.mjs","names":[],"sources":["../../../../3-targets/postgres/1-target/dist/runtime.mjs"],"sourcesContent":["import { I as PG_TSQUERY_CODEC_ID, T as PG_TEXT_CODEC_ID, c as PG_FLOAT4_CODEC_ID, n as PG_BOOL_CODEC_ID } from \"./codec-ids-2htdtS66.mjs\";\nimport { u as postgresError } from \"./errors-C4-Dp3gI.mjs\";\nimport { A as decodePostgresListText } from \"./codecs-Bzj3M0Q3.mjs\";\nimport { a as fullTextIndexOptions, t as FULL_TEXT_INDEX_TYPE } from \"./full-text-index-definition-DzRCaPjb.mjs\";\nimport { a as postgresNowGenerators, o as postgresTargetDescriptorMetaRuntime } from \"./date-time-now-generators-BORO1_nc.mjs\";\nimport { t as renderFullTextDocument } from \"./full-text-search-document-BqqvjJoC.mjs\";\nimport { n as PostgresContractSerializer, t as PostgresContractView } from \"./postgres-contract-view-WtPiaMZp.mjs\";\nimport { a as headlineOptionsLiteral, c as FullTextDocument, i as websearchToTsquery, n as plaintoTsquery, o as languageLiteral, r as toTsquery, s as normalizationLiteral, t as phrasetoTsquery } from \"./full-text-parsers-BZV74MUg.mjs\";\nimport { structuredError } from \"@internal/utils/structured-error\";\nimport { type } from \"arktype\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { assertDefined } from \"@internal/utils/assertions\";\nimport { buildOperation, isExpression, toExpr } from \"@internal/sql-relational-core/expression\";\nimport { uniqueIndexNamesOfType } from \"@internal/sql-relational-core/index-reference\";\n//#region src/core/full-text-collection-method.ts\nfunction indexFunction(tools, name) {\n\treturn blindCast(tools.fns[name]);\n}\nfunction fullTextMethod(indexName) {\n\treturn (collection, ...args) => collection.where((_model, tools) => indexFunction(tools, \"fullTextMatches\")(tools.indexes[indexName], ...args)).orderBy((_model, tools) => indexFunction(tools, \"fullTextRank\")(tools.indexes[indexName], ...args).desc());\n}\n/** The run-time half of `PostgresFullTextMethods`. */\nconst postgresFullTextMethods = {\n\tid: \"postgres/fullText\",\n\tmethodsFor: (model) => Object.fromEntries(uniqueIndexNamesOfType(model.table.indexes, FULL_TEXT_INDEX_TYPE).map((name) => [name, fullTextMethod(name)]))\n};\n//#endregion\n//#region src/core/query-operations.ts\nconst TEXT_REF = { codecId: PG_TEXT_CODEC_ID };\nconst TSQUERY_REF = { codecId: PG_TSQUERY_CODEC_ID };\nconst languageOf = (options) => options.language ?? \"english\";\nfunction isIndexReference(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value) && !isExpression(value) && \"type\" in value && \"options\" in value && \"columns\" in value;\n}\nfunction invalidDocument(method, argument, received, message, fix) {\n\treturn postgresError(\"RUNTIME.ARGUMENT_INVALID\", `${method}: ${message}`, {\n\t\twhy: \"Postgres uses a full-text index only for a query over the same search document, so the document comes from the index itself, from one column, or from `fullTextDocument`.\",\n\t\tfix,\n\t\tmeta: {\n\t\t\thelper: method,\n\t\t\targument,\n\t\t\treceived\n\t\t}\n\t});\n}\n/**\n* The weight groups and the language a search document stands for. A full-text index states both;\n* a column and a `fullTextDocument` take the language from the options.\n*/\nfunction documentGroups(method, document, options) {\n\tif (document instanceof FullTextDocument) return {\n\t\tweightGroups: document.weightGroups,\n\t\tlanguage: languageOf(options)\n\t};\n\tif (isExpression(document)) return {\n\t\tweightGroups: [[document]],\n\t\tlanguage: languageOf(options)\n\t};\n\tif (!isIndexReference(document)) throw invalidDocument(method, \"document\", Array.isArray(document) ? \"array\" : typeof document, \"the document must be a full-text index from a table's `indexes`, a column, or a document from `fullTextDocument`.\", \"Pass the index, as `table.indexes.<name>`, or wrap the weight groups in `fullTextDocument(...)`.\");\n\tif (document.type !== \"fullText\") throw invalidDocument(method, \"document\", document.type, `the index is of type \"${String(document.type)}\", not a full-text index.`, \"Pass an index declared with `@@fullTextIndex` or `fullTextIndex`.\");\n\tif (options.language !== void 0) throw invalidDocument(method, \"options\", options.language, \"a full-text index states its language, so the `language` option is not taken with one.\", \"Leave `language` out; the index decides it.\");\n\tconst definition = fullTextIndexOptions(document.options ?? {});\n\tif (definition instanceof type.errors) throw invalidDocument(method, \"document\", document.options, `the full-text index has invalid options: ${definition.summary}`, \"Pass the index as the table gives it.\");\n\tconst columns = document.columns;\n\tconst columnOf = (name) => {\n\t\tconst column = typeof columns === \"object\" && columns !== null && Object.hasOwn(columns, name) ? Reflect.get(columns, name) : void 0;\n\t\tif (!isExpression(column)) throw invalidDocument(method, \"document\", name, `the full-text index has no column \"${name}\", which its weight groups name.`, \"Pass the index as the table gives it.\");\n\t\treturn column;\n\t};\n\treturn {\n\t\tweightGroups: definition.weightGroups.map((group) => group.map(columnOf)),\n\t\tlanguage: definition.language\n\t};\n}\n/**\n* The search document an operation searches. The first column is the operation's `self`; the\n* others follow the `fixedArgs` the operation passes first, so the query, the language and any\n* further option keep their positions.\n*/\nfunction searchDocument(method, document, options, fixedArgs) {\n\tconst { weightGroups, language } = documentGroups(method, document, options);\n\tlet position = 0;\n\tconst template = renderFullTextDocument(weightGroups.map((group) => group.map(() => position++)), {\n\t\tcolumn: (index) => index === 0 ? \"{{self}}\" : `{{arg${fixedArgs + index - 1}}}`,\n\t\tlanguage: \"{{arg1}}\"\n\t});\n\tconst [self, ...rest] = weightGroups.flat().map((column) => toExpr(column));\n\tassertDefined(self, `${method}: a checked document has a first column`);\n\treturn {\n\t\tself,\n\t\trest,\n\t\ttemplate,\n\t\tlanguage: languageLiteral(method, language)\n\t};\n}\nfunction postgresQueryOperations() {\n\treturn {\n\t\tilike: {\n\t\t\tself: { traits: [\"textual\"] },\n\t\t\timpl: (self, pattern) => buildOperation({\n\t\t\t\tmethod: \"ilike\",\n\t\t\t\targs: [toExpr(self), toExpr(pattern, TEXT_REF)],\n\t\t\t\treturns: {\n\t\t\t\t\tcodecId: PG_BOOL_CODEC_ID,\n\t\t\t\t\tnullable: false\n\t\t\t\t},\n\t\t\t\tlowering: {\n\t\t\t\t\ttargetFamily: \"sql\",\n\t\t\t\t\ttemplate: \"{{self}} ILIKE {{arg0}}\"\n\t\t\t\t}\n\t\t\t})\n\t\t},\n\t\tfullTextMatches: {\n\t\t\tself: { traits: [\"textual\"] },\n\t\t\timpl: (document, query, options = {}) => {\n\t\t\t\tconst searched = searchDocument(\"fullTextMatches\", document, options, 2);\n\t\t\t\treturn buildOperation({\n\t\t\t\t\tmethod: \"fullTextMatches\",\n\t\t\t\t\targs: [\n\t\t\t\t\t\tsearched.self,\n\t\t\t\t\t\ttoExpr(query, TSQUERY_REF),\n\t\t\t\t\t\tsearched.language,\n\t\t\t\t\t\t...searched.rest\n\t\t\t\t\t],\n\t\t\t\t\treturns: {\n\t\t\t\t\t\tcodecId: PG_BOOL_CODEC_ID,\n\t\t\t\t\t\tnullable: false\n\t\t\t\t\t},\n\t\t\t\t\tlowering: {\n\t\t\t\t\t\ttargetFamily: \"sql\",\n\t\t\t\t\t\ttemplate: `${searched.template} @@ {{arg0}}`\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tfullTextRank: {\n\t\t\tself: { traits: [\"textual\"] },\n\t\t\timpl: (document, query, options = {}) => {\n\t\t\t\tconst fn = options.coverDensity === true ? \"ts_rank_cd\" : \"ts_rank\";\n\t\t\t\tconst normalization = options.normalization === void 0 ? void 0 : normalizationLiteral(\"fullTextRank\", options.normalization);\n\t\t\t\tconst searched = searchDocument(\"fullTextRank\", document, options, normalization === void 0 ? 2 : 3);\n\t\t\t\tconst fixed = normalization === void 0 ? [searched.language] : [searched.language, normalization];\n\t\t\t\treturn buildOperation({\n\t\t\t\t\tmethod: \"fullTextRank\",\n\t\t\t\t\targs: [\n\t\t\t\t\t\tsearched.self,\n\t\t\t\t\t\ttoExpr(query, TSQUERY_REF),\n\t\t\t\t\t\t...fixed,\n\t\t\t\t\t\t...searched.rest\n\t\t\t\t\t],\n\t\t\t\t\treturns: {\n\t\t\t\t\t\tcodecId: PG_FLOAT4_CODEC_ID,\n\t\t\t\t\t\tnullable: false\n\t\t\t\t\t},\n\t\t\t\t\tlowering: {\n\t\t\t\t\t\ttargetFamily: \"sql\",\n\t\t\t\t\t\ttemplate: `${fn}(${searched.template}, {{arg0}}${normalization === void 0 ? \"\" : \", {{arg2}}\"})`\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tfullTextHeadline: {\n\t\t\tself: { traits: [\"textual\"] },\n\t\t\timpl: (self, query, options = {}) => {\n\t\t\t\tconst headlineOptions = headlineOptionsLiteral(\"fullTextHeadline\", options);\n\t\t\t\tconst base = \"ts_headline({{arg1}}, {{self}}, {{arg0}}\";\n\t\t\t\treturn buildOperation({\n\t\t\t\t\tmethod: \"fullTextHeadline\",\n\t\t\t\t\targs: [\n\t\t\t\t\t\ttoExpr(self),\n\t\t\t\t\t\ttoExpr(query, TSQUERY_REF),\n\t\t\t\t\t\tlanguageLiteral(\"fullTextHeadline\", languageOf(options)),\n\t\t\t\t\t\t...headlineOptions === void 0 ? [] : [headlineOptions]\n\t\t\t\t\t],\n\t\t\t\t\treturns: {\n\t\t\t\t\t\tcodecId: PG_TEXT_CODEC_ID,\n\t\t\t\t\t\tnullable: false\n\t\t\t\t\t},\n\t\t\t\t\tlowering: {\n\t\t\t\t\t\ttargetFamily: \"sql\",\n\t\t\t\t\t\ttemplate: `${base}${headlineOptions === void 0 ? \"\" : \", {{arg2}}\"})`\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\twebsearchToTsquery: { impl: websearchToTsquery },\n\t\ttoTsquery: { impl: toTsquery },\n\t\tplaintoTsquery: { impl: plaintoTsquery },\n\t\tphrasetoTsquery: { impl: phrasetoTsquery }\n\t};\n}\n//#endregion\n//#region src/core/transaction-isolation.ts\nconst postgresIsolationLevels = {\n\tReadUncommitted: \"ReadUncommitted\",\n\tReadCommitted: \"ReadCommitted\",\n\tRepeatableRead: \"RepeatableRead\",\n\tSerializable: \"Serializable\"\n};\nconst postgresIsolationLevelSchema = type.enumerated(...Object.values(postgresIsolationLevels));\nfunction validatePostgresIsolationLevel(value) {\n\tconst result = postgresIsolationLevelSchema(value);\n\tif (result instanceof type.errors) throw structuredError(\"RUNTIME.ARGUMENT_INVALID\", \"Invalid transaction isolation level\", {\n\t\twhy: result.summary,\n\t\tfix: \"Use ReadUncommitted, ReadCommitted, RepeatableRead, or Serializable.\",\n\t\tmeta: {\n\t\t\targument: \"isolationLevel\",\n\t\t\treceived: value\n\t\t}\n\t});\n\treturn result;\n}\n//#endregion\n//#region src/exports/runtime.ts\n/**\n* Target-postgres deliberately does NOT import `SqlRuntimeTargetDescriptor` from `@internal/sql-runtime`. The target package is a control-plane residence and must not pull the SQL execution-plane package into its dependency closure. The runtime descriptor here is shaped to satisfy the framework's `RuntimeTargetDescriptor` plus the structural `SqlStaticContributions` (`codecs:` returning a descriptor list) that\n* `@internal/sql-runtime` consumers narrow to at composition time.\n*\n* The target itself contributes no codecs — postgres-specific codecs ship from the postgres adapter and from extension packs (pgvector, arktype-json, etc.).\n*/\nconst postgresRuntimeTargetDescriptor = {\n\t...postgresTargetDescriptorMetaRuntime,\n\tcodecs: () => [],\n\tlistDecoder: () => decodePostgresListText,\n\tqueryOperations: () => postgresQueryOperations(),\n\tcollectionMethods: () => [postgresFullTextMethods],\n\tcreate() {\n\t\treturn {\n\t\t\tfamilyId: \"sql\",\n\t\t\ttargetId: \"postgres\"\n\t\t};\n\t}\n};\n//#endregion\nexport { PostgresContractSerializer, PostgresContractView, decodePostgresListText, postgresRuntimeTargetDescriptor as default, postgresIsolationLevelSchema, postgresIsolationLevels, postgresNowGenerators, validatePostgresIsolationLevel };\n\n//# sourceMappingURL=runtime.mjs.map"],"mappings":";;;;;;;;;;;;;;AAeA,SAAS,cAAc,OAAO,MAAM;CACnC,OAAO,UAAU,MAAM,IAAI,KAAK;AACjC;AACA,SAAS,eAAe,WAAW;CAClC,QAAQ,YAAY,GAAG,SAAS,WAAW,OAAO,QAAQ,UAAU,cAAc,OAAO,iBAAiB,CAAC,CAAC,MAAM,QAAQ,YAAY,GAAG,IAAI,CAAC,CAAC,CAAC,SAAS,QAAQ,UAAU,cAAc,OAAO,cAAc,CAAC,CAAC,MAAM,QAAQ,YAAY,GAAG,IAAI,CAAC,CAAC,KAAK,CAAC;AAC1P;;AAEA,MAAM,0BAA0B;CAC/B,IAAI;CACJ,aAAa,UAAU,OAAO,YAAY,uBAAuB,MAAM,MAAM,SAAS,oBAAoB,CAAC,CAAC,KAAK,SAAS,CAAC,MAAM,eAAe,IAAI,CAAC,CAAC,CAAC;AACxJ;AAGA,MAAM,WAAW,EAAE,SAAS,iBAAiB;AAC7C,MAAM,cAAc,EAAE,SAAS,oBAAoB;AACnD,MAAM,cAAc,YAAY,QAAQ,YAAY;AACpD,SAAS,iBAAiB,OAAO;CAChC,OAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ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;EAC/C,WAAW,EAAE,MAAM,UAAU;EAC7B,gBAAgB,EAAE,MAAM,eAAe;EACvC,iBAAiB,EAAE,MAAM,gBAAgB;CAC1C;AACD;AAGA,MAAM,0BAA0B;CAC/B,iBAAiB;CACjB,eAAe;CACf,gBAAgB;CAChB,cAAc;AACf;AACA,MAAM,+BAA+B,KAAK,WAAW,GAAG,OAAO,OAAO,uBAAuB,CAAC;AAC9F,SAAS,+BAA+B,OAAO;CAC9C,MAAM,SAAS,6BAA6B,KAAK;CACjD,IAAI,kBAAkB,KAAK,QAAQ,MAAM,gBAAgB,4BAA4B,uCAAuC;EAC3H,KAAK,OAAO;EACZ,KAAK;EACL,MAAM;GACL,UAAU;GACV,UAAU;EACX;CACD,CAAC;CACD,OAAO;AACR;;;;;;;AASA,MAAM,kCAAkC;CACvC,GAAG;CACH,cAAc,CAAC;CACf,mBAAmB;CACnB,uBAAuB,wBAAwB;CAC/C,yBAAyB,CAAC,uBAAuB;CACjD,SAAS;EACR,OAAO;GACN,UAAU;GACV,UAAU;EACX;CACD;AACD"}
1
+ {"version":3,"file":"runtime-DPhbi9_3.mjs","names":[],"sources":["../../../../3-targets/postgres/1-target/dist/runtime.mjs"],"sourcesContent":["import { I as PG_TSQUERY_CODEC_ID, T as PG_TEXT_CODEC_ID, c as PG_FLOAT4_CODEC_ID, n as PG_BOOL_CODEC_ID } from \"./codec-ids-2htdtS66.mjs\";\nimport { u as postgresError } from \"./errors-C4-Dp3gI.mjs\";\nimport { A as decodePostgresListText } from \"./codecs-Bzj3M0Q3.mjs\";\nimport { a as fullTextIndexOptions, t as FULL_TEXT_INDEX_TYPE } from \"./full-text-index-definition-DzRCaPjb.mjs\";\nimport { a as postgresNowGenerators, o as postgresTargetDescriptorMetaRuntime } from \"./date-time-now-generators-BORO1_nc.mjs\";\nimport { t as renderFullTextDocument } from \"./full-text-search-document-BqqvjJoC.mjs\";\nimport { n as PostgresContractSerializer, t as PostgresContractView } from \"./postgres-contract-view-DtsmkyFX.mjs\";\nimport { a as headlineOptionsLiteral, c as FullTextDocument, i as websearchToTsquery, n as plaintoTsquery, o as languageLiteral, r as toTsquery, s as normalizationLiteral, t as phrasetoTsquery } from \"./full-text-parsers-BZV74MUg.mjs\";\nimport { structuredError } from \"@internal/utils/structured-error\";\nimport { type } from \"arktype\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { assertDefined } from \"@internal/utils/assertions\";\nimport { buildOperation, isExpression, toExpr } from \"@internal/sql-relational-core/expression\";\nimport { uniqueIndexNamesOfType } from \"@internal/sql-relational-core/index-reference\";\n//#region src/core/full-text-collection-method.ts\nfunction indexFunction(tools, name) {\n\treturn blindCast(tools.fns[name]);\n}\nfunction fullTextMethod(indexName) {\n\treturn (collection, ...args) => collection.where((_model, tools) => indexFunction(tools, \"fullTextMatches\")(tools.indexes[indexName], ...args)).orderBy((_model, tools) => indexFunction(tools, \"fullTextRank\")(tools.indexes[indexName], ...args).desc());\n}\n/** The run-time half of `PostgresFullTextMethods`. */\nconst postgresFullTextMethods = {\n\tid: \"postgres/fullText\",\n\tmethodsFor: (model) => Object.fromEntries(uniqueIndexNamesOfType(model.table.indexes, FULL_TEXT_INDEX_TYPE).map((name) => [name, fullTextMethod(name)]))\n};\n//#endregion\n//#region src/core/query-operations.ts\nconst TEXT_REF = { codecId: PG_TEXT_CODEC_ID };\nconst TSQUERY_REF = { codecId: PG_TSQUERY_CODEC_ID };\nconst languageOf = (options) => options.language ?? \"english\";\nfunction isIndexReference(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value) && !isExpression(value) && \"type\" in value && \"options\" in value && \"columns\" in value;\n}\nfunction invalidDocument(method, argument, received, message, fix) {\n\treturn postgresError(\"RUNTIME.ARGUMENT_INVALID\", `${method}: ${message}`, {\n\t\twhy: \"Postgres uses a full-text index only for a query over the same search document, so the document comes from the index itself, from one column, or from `fullTextDocument`.\",\n\t\tfix,\n\t\tmeta: {\n\t\t\thelper: method,\n\t\t\targument,\n\t\t\treceived\n\t\t}\n\t});\n}\n/**\n* The weight groups and the language a search document stands for. A full-text index states both;\n* a column and a `fullTextDocument` take the language from the options.\n*/\nfunction documentGroups(method, document, options) {\n\tif (document instanceof FullTextDocument) return {\n\t\tweightGroups: document.weightGroups,\n\t\tlanguage: languageOf(options)\n\t};\n\tif (isExpression(document)) return {\n\t\tweightGroups: [[document]],\n\t\tlanguage: languageOf(options)\n\t};\n\tif (!isIndexReference(document)) throw invalidDocument(method, \"document\", Array.isArray(document) ? \"array\" : typeof document, \"the document must be a full-text index from a table's `indexes`, a column, or a document from `fullTextDocument`.\", \"Pass the index, as `table.indexes.<name>`, or wrap the weight groups in `fullTextDocument(...)`.\");\n\tif (document.type !== \"fullText\") throw invalidDocument(method, \"document\", document.type, `the index is of type \"${String(document.type)}\", not a full-text index.`, \"Pass an index declared with `@@fullTextIndex` or `fullTextIndex`.\");\n\tif (options.language !== void 0) throw invalidDocument(method, \"options\", options.language, \"a full-text index states its language, so the `language` option is not taken with one.\", \"Leave `language` out; the index decides it.\");\n\tconst definition = fullTextIndexOptions(document.options ?? {});\n\tif (definition instanceof type.errors) throw invalidDocument(method, \"document\", document.options, `the full-text index has invalid options: ${definition.summary}`, \"Pass the index as the table gives it.\");\n\tconst columns = document.columns;\n\tconst columnOf = (name) => {\n\t\tconst column = typeof columns === \"object\" && columns !== null && Object.hasOwn(columns, name) ? Reflect.get(columns, name) : void 0;\n\t\tif (!isExpression(column)) throw invalidDocument(method, \"document\", name, `the full-text index has no column \"${name}\", which its weight groups name.`, \"Pass the index as the table gives it.\");\n\t\treturn column;\n\t};\n\treturn {\n\t\tweightGroups: definition.weightGroups.map((group) => group.map(columnOf)),\n\t\tlanguage: definition.language\n\t};\n}\n/**\n* The search document an operation searches. The first column is the operation's `self`; the\n* others follow the `fixedArgs` the operation passes first, so the query, the language and any\n* further option keep their positions.\n*/\nfunction searchDocument(method, document, options, fixedArgs) {\n\tconst { weightGroups, language } = documentGroups(method, document, options);\n\tlet position = 0;\n\tconst template = renderFullTextDocument(weightGroups.map((group) => group.map(() => position++)), {\n\t\tcolumn: (index) => index === 0 ? \"{{self}}\" : `{{arg${fixedArgs + index - 1}}}`,\n\t\tlanguage: \"{{arg1}}\"\n\t});\n\tconst [self, ...rest] = weightGroups.flat().map((column) => toExpr(column));\n\tassertDefined(self, `${method}: a checked document has a first column`);\n\treturn {\n\t\tself,\n\t\trest,\n\t\ttemplate,\n\t\tlanguage: languageLiteral(method, language)\n\t};\n}\nfunction postgresQueryOperations() {\n\treturn {\n\t\tilike: {\n\t\t\tself: { traits: [\"textual\"] },\n\t\t\timpl: (self, pattern) => buildOperation({\n\t\t\t\tmethod: \"ilike\",\n\t\t\t\targs: [toExpr(self), toExpr(pattern, TEXT_REF)],\n\t\t\t\treturns: {\n\t\t\t\t\tcodecId: PG_BOOL_CODEC_ID,\n\t\t\t\t\tnullable: false\n\t\t\t\t},\n\t\t\t\tlowering: {\n\t\t\t\t\ttargetFamily: \"sql\",\n\t\t\t\t\ttemplate: \"{{self}} ILIKE {{arg0}}\"\n\t\t\t\t}\n\t\t\t})\n\t\t},\n\t\tfullTextMatches: {\n\t\t\tself: { traits: [\"textual\"] },\n\t\t\timpl: (document, query, options = {}) => {\n\t\t\t\tconst searched = searchDocument(\"fullTextMatches\", document, options, 2);\n\t\t\t\treturn buildOperation({\n\t\t\t\t\tmethod: \"fullTextMatches\",\n\t\t\t\t\targs: [\n\t\t\t\t\t\tsearched.self,\n\t\t\t\t\t\ttoExpr(query, TSQUERY_REF),\n\t\t\t\t\t\tsearched.language,\n\t\t\t\t\t\t...searched.rest\n\t\t\t\t\t],\n\t\t\t\t\treturns: {\n\t\t\t\t\t\tcodecId: PG_BOOL_CODEC_ID,\n\t\t\t\t\t\tnullable: false\n\t\t\t\t\t},\n\t\t\t\t\tlowering: {\n\t\t\t\t\t\ttargetFamily: \"sql\",\n\t\t\t\t\t\ttemplate: `${searched.template} @@ {{arg0}}`\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tfullTextRank: {\n\t\t\tself: { traits: [\"textual\"] },\n\t\t\timpl: (document, query, options = {}) => {\n\t\t\t\tconst fn = options.coverDensity === true ? \"ts_rank_cd\" : \"ts_rank\";\n\t\t\t\tconst normalization = options.normalization === void 0 ? void 0 : normalizationLiteral(\"fullTextRank\", options.normalization);\n\t\t\t\tconst searched = searchDocument(\"fullTextRank\", document, options, normalization === void 0 ? 2 : 3);\n\t\t\t\tconst fixed = normalization === void 0 ? [searched.language] : [searched.language, normalization];\n\t\t\t\treturn buildOperation({\n\t\t\t\t\tmethod: \"fullTextRank\",\n\t\t\t\t\targs: [\n\t\t\t\t\t\tsearched.self,\n\t\t\t\t\t\ttoExpr(query, TSQUERY_REF),\n\t\t\t\t\t\t...fixed,\n\t\t\t\t\t\t...searched.rest\n\t\t\t\t\t],\n\t\t\t\t\treturns: {\n\t\t\t\t\t\tcodecId: PG_FLOAT4_CODEC_ID,\n\t\t\t\t\t\tnullable: false\n\t\t\t\t\t},\n\t\t\t\t\tlowering: {\n\t\t\t\t\t\ttargetFamily: \"sql\",\n\t\t\t\t\t\ttemplate: `${fn}(${searched.template}, {{arg0}}${normalization === void 0 ? \"\" : \", {{arg2}}\"})`\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tfullTextHeadline: {\n\t\t\tself: { traits: [\"textual\"] },\n\t\t\timpl: (self, query, options = {}) => {\n\t\t\t\tconst headlineOptions = headlineOptionsLiteral(\"fullTextHeadline\", options);\n\t\t\t\tconst base = \"ts_headline({{arg1}}, {{self}}, {{arg0}}\";\n\t\t\t\treturn buildOperation({\n\t\t\t\t\tmethod: \"fullTextHeadline\",\n\t\t\t\t\targs: [\n\t\t\t\t\t\ttoExpr(self),\n\t\t\t\t\t\ttoExpr(query, TSQUERY_REF),\n\t\t\t\t\t\tlanguageLiteral(\"fullTextHeadline\", languageOf(options)),\n\t\t\t\t\t\t...headlineOptions === void 0 ? [] : [headlineOptions]\n\t\t\t\t\t],\n\t\t\t\t\treturns: {\n\t\t\t\t\t\tcodecId: PG_TEXT_CODEC_ID,\n\t\t\t\t\t\tnullable: false\n\t\t\t\t\t},\n\t\t\t\t\tlowering: {\n\t\t\t\t\t\ttargetFamily: \"sql\",\n\t\t\t\t\t\ttemplate: `${base}${headlineOptions === void 0 ? \"\" : \", {{arg2}}\"})`\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\twebsearchToTsquery: { impl: websearchToTsquery },\n\t\ttoTsquery: { impl: toTsquery },\n\t\tplaintoTsquery: { impl: plaintoTsquery },\n\t\tphrasetoTsquery: { impl: phrasetoTsquery }\n\t};\n}\n//#endregion\n//#region src/core/transaction-isolation.ts\nconst postgresIsolationLevels = {\n\tReadUncommitted: \"ReadUncommitted\",\n\tReadCommitted: \"ReadCommitted\",\n\tRepeatableRead: \"RepeatableRead\",\n\tSerializable: \"Serializable\"\n};\nconst postgresIsolationLevelSchema = type.enumerated(...Object.values(postgresIsolationLevels));\nfunction validatePostgresIsolationLevel(value) {\n\tconst result = postgresIsolationLevelSchema(value);\n\tif (result instanceof type.errors) throw structuredError(\"RUNTIME.ARGUMENT_INVALID\", \"Invalid transaction isolation level\", {\n\t\twhy: result.summary,\n\t\tfix: \"Use ReadUncommitted, ReadCommitted, RepeatableRead, or Serializable.\",\n\t\tmeta: {\n\t\t\targument: \"isolationLevel\",\n\t\t\treceived: value\n\t\t}\n\t});\n\treturn result;\n}\n//#endregion\n//#region src/exports/runtime.ts\n/**\n* Target-postgres deliberately does NOT import `SqlRuntimeTargetDescriptor` from `@internal/sql-runtime`. The target package is a control-plane residence and must not pull the SQL execution-plane package into its dependency closure. The runtime descriptor here is shaped to satisfy the framework's `RuntimeTargetDescriptor` plus the structural `SqlStaticContributions` (`codecs:` returning a descriptor list) that\n* `@internal/sql-runtime` consumers narrow to at composition time.\n*\n* The target itself contributes no codecs — postgres-specific codecs ship from the postgres adapter and from extension packs (pgvector, arktype-json, etc.).\n*/\nconst postgresRuntimeTargetDescriptor = {\n\t...postgresTargetDescriptorMetaRuntime,\n\tcodecs: () => [],\n\tlistDecoder: () => decodePostgresListText,\n\tqueryOperations: () => postgresQueryOperations(),\n\tcollectionMethods: () => [postgresFullTextMethods],\n\tcreate() {\n\t\treturn {\n\t\t\tfamilyId: \"sql\",\n\t\t\ttargetId: \"postgres\"\n\t\t};\n\t}\n};\n//#endregion\nexport { PostgresContractSerializer, PostgresContractView, decodePostgresListText, postgresRuntimeTargetDescriptor as default, postgresIsolationLevelSchema, postgresIsolationLevels, postgresNowGenerators, validatePostgresIsolationLevel };\n\n//# sourceMappingURL=runtime.mjs.map"],"mappings":";;;;;;;;;;;;;;AAeA,SAAS,cAAc,OAAO,MAAM;CACnC,OAAO,UAAU,MAAM,IAAI,KAAK;AACjC;AACA,SAAS,eAAe,WAAW;CAClC,QAAQ,YAAY,GAAG,SAAS,WAAW,OAAO,QAAQ,UAAU,cAAc,OAAO,iBAAiB,CAAC,CAAC,MAAM,QAAQ,YAAY,GAAG,IAAI,CAAC,CAAC,CAAC,SAAS,QAAQ,UAAU,cAAc,OAAO,cAAc,CAAC,CAAC,MAAM,QAAQ,YAAY,GAAG,IAAI,CAAC,CAAC,KAAK,CAAC;AAC1P;;AAEA,MAAM,0BAA0B;CAC/B,IAAI;CACJ,aAAa,UAAU,OAAO,YAAY,uBAAuB,MAAM,MAAM,SAAS,oBAAoB,CAAC,CAAC,KAAK,SAAS,CAAC,MAAM,eAAe,IAAI,CAAC,CAAC,CAAC;AACxJ;AAGA,MAAM,WAAW,EAAE,SAAS,iBAAiB;AAC7C,MAAM,cAAc,EAAE,SAAS,oBAAoB;AACnD,MAAM,cAAc,YAAY,QAAQ,YAAY;AACpD,SAAS,iBAAiB,OAAO;CAChC,OAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,KAAK,KAAK,CAAC,aAAa,KAAK,KAAK,UAAU,SAAS,aAAa,SAAS,aAAa;AAC9J;AACA,SAAS,g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MAAM,gBAAgB;CAC1C;AACD;AAGA,MAAM,0BAA0B;CAC/B,iBAAiB;CACjB,eAAe;CACf,gBAAgB;CAChB,cAAc;AACf;AACA,MAAM,+BAA+B,KAAK,WAAW,GAAG,OAAO,OAAO,uBAAuB,CAAC;AAC9F,SAAS,+BAA+B,OAAO;CAC9C,MAAM,SAAS,6BAA6B,KAAK;CACjD,IAAI,kBAAkB,KAAK,QAAQ,MAAM,gBAAgB,4BAA4B,uCAAuC;EAC3H,KAAK,OAAO;EACZ,KAAK;EACL,MAAM;GACL,UAAU;GACV,UAAU;EACX;CACD,CAAC;CACD,OAAO;AACR;;;;;;;AASA,MAAM,kCAAkC;CACvC,GAAG;CACH,cAAc,CAAC;CACf,mBAAmB;CACnB,uBAAuB,wBAAwB;CAC/C,yBAAyB,CAAC,uBAAuB;CACjD,SAAS;EACR,OAAO;GACN,UAAU;GACV,UAAU;EACX;CACD;AACD"}
@@ -2,9 +2,9 @@ import { SqlStorage } from "@prisma/orm-family-sql/contract/types";
2
2
  //#region ../../../3-targets/postgres/1-target/dist/schema-ir-annotations.d.mts
3
3
  //#region src/core/migrations/resolve-ddl-schema.d.ts
4
4
  /**
5
- * Given the contract's storage and a namespace id, returns the live Postgres DDL schema name that namespace maps to. A named Postgres namespace dispatches to its `ddlSchemaName(storage)`; the unbound sentinel resolves to `DEFAULT_NAMESPACE_ID`, the schema an unqualified table lands in under the default search path; a bare object payload (used by some tests) falls back to the namespace id itself. An extension in the unbound namespace does not go through here: it has no fixed schema, and verification finds it through the connection's search path (ADR 316).
5
+ * Given the contract's storage and a namespace id, returns the live Postgres DDL schema name that namespace maps to. A named Postgres namespace dispatches to its `ddlSchemaName(storage)`; the unbound sentinel resolves to `DEFAULT_NAMESPACE_ID`, the schema an unqualified table lands in under the default search path; a bare object payload (used by some tests) falls back to the namespace id itself. An extension in the unbound namespace does not go through here: it has no fixed schema, and verification finds it through the connection's search path (ADR 321).
6
6
  */
7
7
  declare function resolveDdlSchemaForNamespaceStorage(storage: SqlStorage, namespaceId: string): string;
8
8
  //#endregion
9
9
  export { resolveDdlSchemaForNamespaceStorage as t };
10
- //# sourceMappingURL=schema-ir-annotations-u590Zxbh.d.mts.map
10
+ //# sourceMappingURL=schema-ir-annotations-DCYs7ck-.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"schema-ir-annotations-u590Zxbh.d.mts","names":[],"sources":["../../../../3-targets/postgres/1-target/dist/schema-ir-annotations.d.mts"],"mappings":";;;;;;iBAMiB,oCAAoC,SAAS,YAAY"}
1
+ {"version":3,"file":"schema-ir-annotations-DCYs7ck-.d.mts","names":[],"sources":["../../../../3-targets/postgres/1-target/dist/schema-ir-annotations.d.mts"],"mappings":";;;;;;iBAMiB,oCAAoC,SAAS,YAAY"}
package/dist/target.d.mts CHANGED
@@ -18,13 +18,13 @@ import "./ddl-B8nQZTWN.mjs";
18
18
  import "./codec-ids-JTQCwgBI.mjs";
19
19
  import { a as FullTextIndexCandidate, c as FullTextSearchLanguage, d as fullTextIndexProblems, f as weightGroupsOf, i as FullTextFieldsInput, n as FULL_TEXT_INDEX_TYPE, o as FullTextIndexDefinition, r as FullTextColumnCodecs, s as FullTextIndexProblem, t as DEFAULT_FULL_TEXT_SEARCH_LANGUAGE, u as describeFullTextIndexProblem } from "./full-text-index-definition-D5iBWLss-BEpqiucV.mjs";
20
20
  import { a as quoteQualifiedName, i as quoteIdentifier, n as inlineLiteral, o as renderFullTextIndexDocument, r as qualifyName, s as validateEnumValueLength, t as escapeLiteral } from "./sql-utils-Bq4nuPvy.mjs";
21
- import { t as postgresAggregateDescriptors } from "./aggregates-C2c48ORM.mjs";
21
+ import { t as postgresAggregateDescriptors } from "./aggregates-0EfVySBb.mjs";
22
22
  import { a as Numeric, c as TimestampString, d as VarBit, f as Varchar, i as JsonValue$1, l as TimestamptzString, n as Char, o as ParameterizedOutputTypesForTypeParams, r as CodecTypes, s as TimeString, t as Bit, u as Timetz } from "./codec-types-xyW4TiJD-CRDK7QcS.mjs";
23
23
  import "./codec-types-FPJG3oQH.mjs";
24
24
  import { A as jsonb, B as textArray, C as createTable, D as indexExistsAst, E as extensionInSchemaAst, F as sequenceNameAvailableAst, H as timestamptzJsDate, I as tableExistsAst, L as tableIsEmptyAst, M as pgTable, N as rlsEnabledAst, O as int4, P as rlsPolicyExistsAst, R as tablePrimaryKeyAst, S as createSchema, T as extensionExistsAst, U as toRegclass, V as timestamptz, _ as columnDefaultSequenceAst, a as IndexExistsCheckBuilder, b as columnTypeAst, c as TableExistsCheckBuilder, d as addConstraintAction, f as alterColumnTypeAction, g as columnDefaultAst, h as buildSignMarkerBootstrapQueries, i as ExtensionExistsCheckBuilder, j as noNullValuesAst, k as int8, l as TablePrimaryKeyCheckBuilder, m as buildControlTableBootstrapQueries, n as ColumnExistsCheckBuilder, o as RlsEnabledCheckBuilder, p as alterTable, r as ConstraintExistsCheckBuilder, s as RlsPolicyExistsCheckBuilder, t as ColumnDefaultCheckBuilder, u as addColumnAction, v as columnExistsAst, w as dropDefaultAction, x as constraintExistsAst, y as columnNullabilityAst, z as text } from "./contract-free-DcaYH2c5.mjs";
25
25
  import { t as PostgresPlanTargetDetails } from "./planner-target-details-boDXR2s7-CExrk6rf.mjs";
26
26
  import { n as postgresNowGenerators, t as postgresNowGeneratorControlDescriptors } from "./date-time-now-generators-C7om6MxZ-B9S-CnE_.mjs";
27
- import { n as postgresScalarTypes, t as postgresExplicitTypes } from "./control-Ci6kSDEg.mjs";
27
+ import { n as postgresScalarTypes, t as postgresExplicitTypes } from "./control-B-0_CuJt.mjs";
28
28
  import { i as dataTransform, r as DataTransformOptions, t as DataTransformClosure } from "./data-transform-2o0tpMs8-DADYIvEZ.mjs";
29
29
  import "./data-transform-DX9I716A.mjs";
30
30
  import { A as pgText, B as pgTsquery, C as pgJsonbEnumRefusal, D as pgNumericParams, E as pgNumeric, F as pgTimestampStoredText, G as postgresDataTypeEntries, H as pgVarbit, I as pgTimestamptz, J as qualifiedEnumName, K as postgresDataTypes, L as pgTimestamptzStoredText, M as pgTime, N as pgTimeStoredText, O as pgOid, P as pgTimestamp, R as pgTimetz, S as pgJsonb, T as pgMoneyStoredText, U as pgVarchar, V as pgUuid, W as pgXml, _ as pgInt2, a as pgBitLengthParams, b as pgInterval, c as pgChar, d as pgDateStoredText, f as pgEnum, g as pgInet, h as pgFloat8, i as pgBit, j as pgTextArray, k as pgPrecisionParams, l as pgCharacterLengthParams, m as pgFloat4, n as isPgOid, o as pgBool, p as pgEnumParams, q as postgresTextDataTypes, r as moneyTextOfCents, s as pgBytea, t as createPostgresBuiltinDataTypeLookup, u as pgDate, v as pgInt4, w as pgMoney, x as pgJson, y as pgInt8, z as pgTimetzStoredText } from "./data-types-Ct7TIZq3.mjs";
@@ -40,23 +40,23 @@ import { A as EnableRowLevelSecurityCall, B as RenameSchemaCall, C as DropExtens
40
40
  import { n as planIssues, t as coalesceSubtreeIssues } from "./issue-planner-BlN8mK4E.mjs";
41
41
  import { n as MARKER_LOCK_SQL, t as MARKER_LOCK_KEY } from "./marker-lock-BviIbusV.mjs";
42
42
  import { t as PostgresContractView } from "./postgres-contract-view-BFzIDwwN-hL3QLe_b.mjs";
43
- import { t as PostgresMigration } from "./postgres-migration-DUgkNwUR-B3Hr27gY.mjs";
44
- 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-BTXqYFkV.mjs";
43
+ import { t as PostgresMigration } from "./postgres-migration-DEkPcs8x-CLxAKfHm.mjs";
44
+ 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-CovfYOjm.mjs";
45
45
  import { n as IntrospectedTypeText, r as introspectedTypeText, t as CatalogColumnType } from "./native-type-normalizer-BaGa9eeb.mjs";
46
46
  import "./op-factory-call-DRapuFEI.mjs";
47
47
  import "./operation-types-D1F7DwdI.mjs";
48
- import "./pack-Baz-udww.mjs";
49
- import { t as TypeScriptRenderablePostgresMigration } from "./planner-produced-postgres-migration-CDkRlHah-Cknq9LDt.mjs";
50
- import { n as createPostgresMigrationPlanner, t as contractToPostgresDatabaseSchemaNode } from "./planner-CyyWVHw4.mjs";
48
+ import "./pack-ReYuY9t5.mjs";
49
+ import { t as TypeScriptRenderablePostgresMigration } from "./planner-produced-postgres-migration-exqzWlvW-DGLu2dQ7.mjs";
50
+ import { n as createPostgresMigrationPlanner, t as contractToPostgresDatabaseSchemaNode } from "./planner-Bw0tlQWK.mjs";
51
51
  import { t as buildColumnTypeSql } from "./planner-ddl-builders-CPM3y7cQ.mjs";
52
52
  import { n as resolveIdentityValue, t as buildBuiltinIdentityValue } from "./planner-identity-values-Dsq989Lh.mjs";
53
- import "./planner-produced-postgres-migration-Davk_RXL.mjs";
53
+ import "./planner-produced-postgres-migration-CulnCxu2.mjs";
54
54
  import { i as hasUniqueConstraint, n as hasForeignKey, r as hasIndex, t as buildSchemaLookupMap } from "./planner-schema-lookup-ceCNOGFf.mjs";
55
55
  import "./planner-sql-checks-rEjFx_Jv.mjs";
56
- import { t as prisma7PostgresBinding } from "./prisma7-binding-Ktqdq2S4.mjs";
56
+ import { t as prisma7PostgresBinding } from "./prisma7-binding-DSQpvEBe.mjs";
57
57
  import { t as renderOps } from "./render-ops-CEwI8Iyf.mjs";
58
58
  import { t as renderCallsToTypeScript } from "./render-typescript-BysdXYpH.mjs";
59
59
  import { a as postgresIsolationLevelSchema, c as validatePostgresIsolationLevel, i as PostgresRuntimeTargetInstance, n as PostgresIsolationLevel, o as postgresIsolationLevels, r as PostgresListDecoder, t as PostgresContractSerializer } from "./runtime-BMG3ddkQ.mjs";
60
- import { t as resolveDdlSchemaForNamespaceStorage } from "./schema-ir-annotations-u590Zxbh.mjs";
60
+ import { t as resolveDdlSchemaForNamespaceStorage } from "./schema-ir-annotations-DCYs7ck-.mjs";
61
61
  import { t as POSTGRES_MIN_SERVER_VERSION } from "./server-version-BprAueod.mjs";
62
62
  export { type AdaptedPostgresCodecDescriptor, AddCheckConstraintCall, AddColumnAction, AddColumnCall, AddColumnWithTemporaryDefaultCall, AddConstraintAction, AddForeignKeyCall, AddNativeEnumValueCall, AddPrimaryKeyCall, AddRequiredColumnToEmptyTableCall, AddUniqueCall, AlterColumnTypeAction, AlterColumnTypeCall, type AlterTableActionVisitor, type AnyAlterTableAction, type AnyPostgresCodecDescriptor, type AnyPostgresDdlNode, Bit, type CatalogColumnType, Char, CodecTypes, type ColumnDefaultCheckBuilder, type ColumnExistsCheckBuilder, type ColumnTypeCheck, type ConstraintExistsCheckBuilder, type ContentHashParts, CreateExtensionCall, CreateIndexCall, type CreateIndexElements, CreateNativeEnumTypeCall, CreatePostgresRlsPolicyCall, CreateSchemaCall, CreateTableCall, DEFAULT_FULL_TEXT_SEARCH_LANGUAGE, DataTransformCall, type DataTransformClosure, type DataTransformOptions, type DdlIndexElements, DeleteRowsCall, DisableRowLevelSecurityCall, DropCheckConstraintCall, DropColumnCall, DropConstraintCall, DropDefaultAction, DropDefaultCall, DropExtensionCall, DropIndexCall, DropNativeEnumTypeCall, DropNotNullCall, DropPostgresRlsPolicyCall, DropSchemaCall, DropTableCall, EnableRowLevelSecurityCall, type ExtensionExistsCheckBuilder, FULL_TEXT_INDEX_TYPE, FillStoredKeyCall, type FullTextColumnCodecs, FullTextDocument, type FullTextDocumentColumn, type FullTextDocumentGroups, type FullTextFieldsInput, type FullTextHeadlineOptions, type FullTextIndexCandidate, type FullTextIndexDefinition, type FullTextIndexProblem, type FullTextIndexReference, type FullTextMatchesOptions, type FullTextRankOptions, type FullTextSearchLanguage, type IndexExistsCheckBuilder, type IntrospectedTypeText, type JsonValue$1 as JsonValue, MARKER_LOCK_KEY, MARKER_LOCK_SQL, PostgresMigration as Migration, MigrationCLI, Numeric, 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, POSTGRES_MIN_SERVER_VERSION, ParameterizedOutputTypesForTypeParams, type PgBitDescriptor, type PgBoolDescriptor, type PgCharDescriptor, type PgEnumCodec, type PgEnumDescriptor, type PgEnumParams, type PgFloat4Descriptor, type PgFloat8Descriptor, type PgFloatDescriptor, type PgInetDescriptor, type PgInt2Descriptor, type PgInt4Descriptor, type PgInt8Descriptor, type PgInt8NumberDescriptor, type PgIntDescriptor, type PgInterval, type PgIntervalDescriptor, PgIntervalStringCodec, PgIntervalStringDescriptor, type PgJsonDescriptor, type PgJsonbDescriptor, type PgMoneyDescriptor, type PgNumericDescriptor, type PgOidDescriptor, type PgTextDescriptor, PgTimestampDateCodec, PgTimestampDateDescriptor, PgTimestamptzDateCodec, PgTimestamptzDateDescriptor, type PgTimetzDescriptor, type PgUnboundedIntDescriptor, type PgUuidDescriptor, type PgVarbitDescriptor, type PgVarcharDescriptor, type PgXmlDescriptor, PostgresAlterIndexRename, PostgresAlterPolicyRename, PostgresAlterSchemaRename, PostgresAlterTable, PostgresAlterTableSetSchema, PostgresCodecDescriptor, type PostgresCodecDescriptorRegistry, type PostgresCodecOptions, type PostgresCodecRegistry, type PostgresColumnDefault, type PostgresContract, PostgresContractSerializer, PostgresContractView, PostgresCreateIndex, PostgresCreatePolicy, PostgresCreateSchema, PostgresCreateTable, PostgresCreateType, PostgresDatabaseSchemaNode, type PostgresDatabaseSchemaNodeInput, PostgresDdlNode, type PostgresDdlVisitor, PostgresDisableRowLevelSecurity, PostgresDropIndex, PostgresDropPolicy, PostgresDropSchema, PostgresDropType, PostgresExtension, type PostgresExtensionInput, PostgresExtensionSchemaNode, type PostgresExtensionSchemaNodeInput, type PostgresFullTextMethods, type PostgresIsolationLevel, PostgresListDecoder, PostgresNamespaceSchemaNode, type PostgresNamespaceSchemaNodeInput, PostgresNativeEnum, type PostgresNativeEnumInput, PostgresNativeEnumSchemaNode, type PostgresNativeEnumSchemaNodeInput, type PostgresPlanTargetDetails, PostgresPolicySchemaNode, type PostgresPolicySchemaNodeInput, type PostgresReportedDefault, PostgresRlsEnablement, type PostgresRlsEnablementInput, PostgresRlsPolicy, type PostgresRlsPolicyInput, PostgresRole, type PostgresRoleInput, PostgresRoleSchemaNode, type PostgresRoleSchemaNodeInput, PostgresRuntimeTargetInstance, PostgresSchema, PostgresSchemaNodeKind, PostgresTableSchemaNode, type PostgresTableSchemaNodeInput, PostgresTableSource, type PostgresTsqueryArgument, PostgresUnboundSchema, type QueryOperationTypes, type QueryOperationTypesForCodecs, RawSqlCall, RemoveStoredKeyCall, RemoveStoredValueCall, RenameColumnCall, RenameConstraintCall, RenameIndexCall, RenamePostgresRlsPolicyCall, RenameSchemaCall, RenameStoredKeyCall, RenameTableCall, type RenderedRlsPolicyLiteral, ReplaceStoredValueCall, type RlsEnabledCheckBuilder, type RlsPolicyExistsCheckBuilder, SQL_CHAR_CODEC_ID, SQL_FLOAT_CODEC_ID, SQL_INT_CODEC_ID, SQL_RAW_CODEC_ID, SQL_TEXT_CODEC_ID, SQL_VARCHAR_CODEC_ID, type SerializedRlsPolicy, SetDefaultCall, SetExtensionSchemaCall, SetNotNullCall, SetTableSchemaCall, type TableExistsCheckBuilder, type TablePrimaryKeyCheckBuilder, type TextArgument, TimeString, TimestampString, TimestamptzString, Timetz, type TsqueryArgument, type TsqueryExpression, type TsqueryParser, type TsqueryParserOptions, type TsqueryTag, TypeScriptRenderablePostgresMigration, VarBit, Varchar, 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, postgresIsolationLevelSchema, postgresIsolationLevels, 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, validatePostgresIsolationLevel, websearchToTsquery, weightGroupsOf };
package/dist/target.mjs CHANGED
@@ -15,7 +15,7 @@ import { A as extensionInSchemaAst, F as noNullValuesAst, G as tableIsEmptyAst,
15
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
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";
18
+ import { c as postgresScalarTypes, o as postgresExplicitTypes } from "./authoring-DPwc7x9U-BZkXpPSH.mjs";
19
19
  import { t as postgresRenderCheckExpressions } from "./check-expressions-Ch-A_NJN-BscDa8xT.mjs";
20
20
  import { a as postgresNowGenerators, i as postgresNowGeneratorControlDescriptors } from "./date-time-now-generators-BORO1_nc-BdCe3ppq.mjs";
21
21
  import { t as postgresDataTypeEntries } from "./data-type-entries-CVxsfjF3-Bd0cSfuG.mjs";
@@ -23,27 +23,27 @@ import { i as PostgresTableSchemaNode, n as PostgresNativeEnumSchemaNode, r as P
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
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";
26
+ import { r as resolveDdlSchemaForNamespaceStorage } from "./resolve-ddl-schema-BwKuzGm--BVgPhp86.mjs";
27
27
  import { a as stackDataTypes, i as qualifyTableName, t as alterTypeCheck } from "./planner-sql-checks-BOdYkh9L-hXxekxJX.mjs";
28
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
29
  import { t as buildColumnTypeSql } from "./planner-ddl-builders-Ds3Xcsg7-5-bR7xgo.mjs";
30
30
  import { n as resolveIdentityValue, t as buildBuiltinIdentityValue } from "./planner-identity-values-CQZbvcx0-BpAvjtip.mjs";
31
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";
32
+ import { n as contractToPostgresDatabaseSchemaNode, t as buildPostgresPlanDiff } from "./diff-database-schema-BJKAfPAG-LCJmdiQq.mjs";
33
+ import { n as PostgresContractView, t as PostgresContractSerializer } from "./postgres-contract-view-DtsmkyFX-Bas8oQiN.mjs";
34
34
  import { t as dataTransform } from "./data-transform-h9agBu_c-RlC5A7aY.mjs";
35
- import { t as PostgresMigration } from "./postgres-migration-BuxK0qNO-BgQHf6H6.mjs";
35
+ import { t as PostgresMigration } from "./postgres-migration-D5lRerLT-DyYh8UPS.mjs";
36
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-CorJVpul-dA0T7JYO.mjs";
39
- import { t as createPostgresMigrationPlanner } from "./planner-BlY3pVTF-B-yPNIGN.mjs";
38
+ import { t as TypeScriptRenderablePostgresMigration } from "./planner-produced-postgres-migration-FtUIqqVg-ouPTcZ8X.mjs";
39
+ import { t as createPostgresMigrationPlanner } from "./planner-BHH46ndt-Q6-LPhnL.mjs";
40
40
  import { n as MARKER_LOCK_SQL, t as MARKER_LOCK_KEY } from "./marker-lock-DFc1Tfv5-BkBKBRE3.mjs";
41
41
  import { c as toTsquery, l as websearchToTsquery, n as fullTextDocument, o as phrasetoTsquery, s as plaintoTsquery, t as FullTextDocument } from "./full-text-parsers-BZV74MUg-TfQ8rvPW.mjs";
42
42
  import { t as tsquery } from "./full-text-oDBhUHI5.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
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-BDJ3kwsK.mjs";
46
+ import { t as prisma7PostgresBinding } from "./prisma7-binding-BGEW0R_9.mjs";
47
47
  import { i as validatePostgresIsolationLevel, n as postgresIsolationLevels, t as postgresIsolationLevelSchema } from "./runtime-DPhbi9_3.mjs";
48
48
  import { t as POSTGRES_MIN_SERVER_VERSION } from "./server-version-IguNEl-k.mjs";
49
49
  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, POSTGRES_MIN_SERVER_VERSION, 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, postgresIsolationLevelSchema, postgresIsolationLevels, 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, validatePostgresIsolationLevel, websearchToTsquery, weightGroupsOf };
@@ -1,2 +1,2 @@
1
- import { t as postgresAggregateDescriptors } from "./aggregates-C2c48ORM.mjs";
1
+ import { t as postgresAggregateDescriptors } from "./aggregates-0EfVySBb.mjs";
2
2
  export { postgresAggregateDescriptors };
@@ -1,4 +1,4 @@
1
1
  import { n as parsePostgresListText, t as decodePostgresListText } from "./list-decoder-BcrLExnx-DlCwavhu.mjs";
2
2
  import { t as postgresNowGeneratorControlDescriptors } from "./date-time-now-generators-C7om6MxZ-B9S-CnE_.mjs";
3
- import { n as postgresScalarTypes, r as postgresTargetDescriptor, t as postgresExplicitTypes } from "./control-Ci6kSDEg.mjs";
3
+ import { n as postgresScalarTypes, r as postgresTargetDescriptor, t as postgresExplicitTypes } from "./control-B-0_CuJt.mjs";
4
4
  export { decodePostgresListText, postgresTargetDescriptor as default, parsePostgresListText, postgresExplicitTypes, postgresNowGeneratorControlDescriptors, postgresScalarTypes };
@@ -7,20 +7,20 @@ import { c as decodePostgresListText, u as parsePostgresListText } from "./codec
7
7
  import { s as fullTextIndexDefinitionOf } from "./full-text-index-definition-DzRCaPjb-0USKN1ZI.mjs";
8
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-BbS0bin5-U9tXyzS6.mjs";
10
+ import { c as postgresScalarTypes, o as postgresExplicitTypes, t as POLICY_BLOCK_KEYWORDS } from "./authoring-DPwc7x9U-BZkXpPSH.mjs";
11
11
  import { t as postgresRenderCheckExpressions } from "./check-expressions-Ch-A_NJN-BscDa8xT.mjs";
12
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";
13
+ import { t as postgresTargetDescriptorMeta } from "./descriptor-meta-46EhsECb-C5EGe36u.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
16
  import { i as qualifyTableName } from "./planner-sql-checks-BOdYkh9L-hXxekxJX.mjs";
17
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";
18
+ import { r as diffPostgresSchema } from "./diff-database-schema-BJKAfPAG-LCJmdiQq.mjs";
19
+ import { t as PostgresContractSerializer } from "./postgres-contract-view-DtsmkyFX-Bas8oQiN.mjs";
20
+ import { o as postgresContractToSchema } from "./postgres-migration-D5lRerLT-DyYh8UPS.mjs";
21
+ import { n as postgresMarkedRemoval, r as postgresStoredValueCallClasses, t as createPostgresMigrationPlanner } from "./planner-BHH46ndt-Q6-LPhnL.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-CAoJuV8y-Da9y8zwV.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-DqtogWJ8-CUXUG-wF.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";