@prisma/orm-target-postgres 8.0.0-rc.18-dev.42 → 8.0.0-rc.18-dev.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{adapter-BLduF4bR-Bnd8oPWE.mjs → adapter-BLduF4bR-clgZ076o.mjs} +2 -2
- package/dist/{adapter-BLduF4bR-Bnd8oPWE.mjs.map → adapter-BLduF4bR-clgZ076o.mjs.map} +1 -1
- package/dist/{adapter-JqZEnHVH.d.mts → adapter-D_h3CcXJ.d.mts} +3 -3
- package/dist/{adapter-JqZEnHVH.d.mts.map → adapter-D_h3CcXJ.d.mts.map} +1 -1
- package/dist/adapter.d.mts +2 -2
- package/dist/adapter.mjs +3 -3
- package/dist/adapter__adapter.d.mts +1 -1
- package/dist/adapter__adapter.mjs +2 -2
- package/dist/adapter__column-types.d.mts +1 -1
- package/dist/adapter__column-types.mjs +1 -1
- package/dist/adapter__control.mjs +3 -3
- package/dist/adapter__runtime.mjs +3 -3
- package/dist/{aggregates-CqTCv6q_.d.mts → aggregates-C2xqsGZ2.d.mts} +3 -3
- package/dist/{aggregates-CqTCv6q_.d.mts.map → aggregates-C2xqsGZ2.d.mts.map} +1 -1
- package/dist/{authoring-BJs31CHI-CSs9fBRb.mjs → authoring-NKZZKf0m-aFhCcgbc.mjs} +385 -4
- package/dist/authoring-NKZZKf0m-aFhCcgbc.mjs.map +1 -0
- package/dist/{column-types-5nUQfQFq.mjs → column-types-CI9_dRcU.mjs} +6 -4
- package/dist/column-types-CI9_dRcU.mjs.map +1 -0
- package/dist/{column-types-D4U5xGjS.d.mts → column-types-KP17SDia.d.mts} +5 -4
- package/dist/column-types-KP17SDia.d.mts.map +1 -0
- package/dist/{contract-contributions-CRCEK7Dx-DCityp0q.mjs → contract-contributions-CRCEK7Dx-DQWxpLgr.mjs} +2 -2
- package/dist/{contract-contributions-CRCEK7Dx-DCityp0q.mjs.map → contract-contributions-CRCEK7Dx-DQWxpLgr.mjs.map} +1 -1
- package/dist/{control-BRE_BcLl.d.mts → control-C6XU7Guz.d.mts} +61 -61
- package/dist/{control-BRE_BcLl.d.mts.map → control-C6XU7Guz.d.mts.map} +1 -1
- package/dist/{control-policy-r-CuRLXc-VyOsI026.mjs → control-policy-XDdMfbBp-Bf5qOmWS.mjs} +4 -4
- package/dist/{control-policy-r-CuRLXc-VyOsI026.mjs.map → control-policy-XDdMfbBp-Bf5qOmWS.mjs.map} +1 -1
- package/dist/{data-transform-CtHnNYhF-r19375h3.mjs → data-transform-h9agBu_c-B5dsDs8G.mjs} +2 -2
- package/dist/{data-transform-CtHnNYhF-r19375h3.mjs.map → data-transform-h9agBu_c-B5dsDs8G.mjs.map} +1 -1
- package/dist/{descriptor-meta-Cb7RcgEQ-5-Uylp7o.mjs → descriptor-meta-Cb7RcgEQ-qfcXndlR.mjs} +2 -2
- package/dist/{descriptor-meta-Cb7RcgEQ-5-Uylp7o.mjs.map → descriptor-meta-Cb7RcgEQ-qfcXndlR.mjs.map} +1 -1
- package/dist/{descriptor-meta-CbgaTseq-Czx8dzXD.mjs → descriptor-meta-nvriPVgI-B-ZW5haL.mjs} +4 -4
- package/dist/{descriptor-meta-CbgaTseq-Czx8dzXD.mjs.map → descriptor-meta-nvriPVgI-B-ZW5haL.mjs.map} +1 -1
- package/dist/{diff-database-schema-Of2YGCSs-CZSHs0CL.mjs → diff-database-schema-BjbxFQr1-CxXB4GhI.mjs} +4 -4
- package/dist/{diff-database-schema-Of2YGCSs-CZSHs0CL.mjs.map → diff-database-schema-BjbxFQr1-CxXB4GhI.mjs.map} +1 -1
- package/dist/{diff-database-schema-Diw5m51r.d.mts → diff-database-schema-N-ftS4iF.d.mts} +2 -2
- package/dist/{diff-database-schema-Diw5m51r.d.mts.map → diff-database-schema-N-ftS4iF.d.mts.map} +1 -1
- package/dist/{type-constructors-DhJl2KPr-BlPrksrh.mjs → infer-psl-contract-CwtwKri_-Ccao-UmG.mjs} +11 -383
- package/dist/infer-psl-contract-CwtwKri_-Ccao-UmG.mjs.map +1 -0
- package/dist/{issue-planner-CAxHx3OH.d.mts → issue-planner-DYLByGrp.d.mts} +2 -2
- package/dist/{issue-planner-CAxHx3OH.d.mts.map → issue-planner-DYLByGrp.d.mts.map} +1 -1
- package/dist/migration-CbOh59ZJ.mjs.map +1 -1
- package/dist/{migration-DbAx8skF.d.mts → migration-CpHZV_Y6.d.mts} +2 -2
- package/dist/{migration-DbAx8skF.d.mts.map → migration-CpHZV_Y6.d.mts.map} +1 -1
- package/dist/{op-factory-call-DpZsI9p4-SIj8G08L.mjs → op-factory-call-B5_tnifS-BGaMVQ8g.mjs} +2 -2
- package/dist/{op-factory-call-DpZsI9p4-SIj8G08L.mjs.map → op-factory-call-B5_tnifS-BGaMVQ8g.mjs.map} +1 -1
- package/dist/{pack-CxW2-wE0.d.mts → pack-BycbuOFo.d.mts} +43 -17
- package/dist/pack-BycbuOFo.d.mts.map +1 -0
- package/dist/{planner-DVwj2GUS.d.mts → planner-BEAM0y_U.d.mts} +3 -3
- package/dist/{planner-DVwj2GUS.d.mts.map → planner-BEAM0y_U.d.mts.map} +1 -1
- package/dist/{planner-CuM-j1mN-DT5iHJie.mjs → planner-Dzp0sfa8-BQQk49Bc.mjs} +7 -7
- package/dist/{planner-CuM-j1mN-DT5iHJie.mjs.map → planner-Dzp0sfa8-BQQk49Bc.mjs.map} +1 -1
- package/dist/{planner-produced-postgres-migration-DNnxAU-R-CSPyb9D_.d.mts → planner-produced-postgres-migration-BO7M2Q-t-Dhyz9UMt.d.mts} +3 -3
- package/dist/planner-produced-postgres-migration-BO7M2Q-t-Dhyz9UMt.d.mts.map +1 -0
- package/dist/planner-produced-postgres-migration-C0Zs5NHu.d.mts +1 -0
- package/dist/{planner-produced-postgres-migration-BQOcmTK2-DKLecu3l.mjs → planner-produced-postgres-migration-HAdTAokB-mZ-CNMWW.mjs} +4 -4
- package/dist/{planner-produced-postgres-migration-BQOcmTK2-DKLecu3l.mjs.map → planner-produced-postgres-migration-HAdTAokB-mZ-CNMWW.mjs.map} +1 -1
- package/dist/{postgres-contract-view-DI-e8od--5KtL6Zcs.mjs → postgres-contract-view-BkuNbRzj-DXXkgI5Y.mjs} +3 -3
- package/dist/{postgres-contract-view-DI-e8od--5KtL6Zcs.mjs.map → postgres-contract-view-BkuNbRzj-DXXkgI5Y.mjs.map} +1 -1
- package/dist/{postgres-migration-CQ6Mbeh7-CfxjRDMT.mjs → postgres-migration-Bi7QKUYk-ed-QEmS1.mjs} +8 -8
- package/dist/{postgres-migration-CQ6Mbeh7-CfxjRDMT.mjs.map → postgres-migration-Bi7QKUYk-ed-QEmS1.mjs.map} +1 -1
- package/dist/{postgres-migration-8BDn8Wja-D9tHQGWg.d.mts → postgres-migration-CPUwTt8B-B2vE3E_r.d.mts} +2 -2
- package/dist/{postgres-migration-8BDn8Wja-D9tHQGWg.d.mts.map → postgres-migration-CPUwTt8B-B2vE3E_r.d.mts.map} +1 -1
- package/dist/{prisma7-binding-CLwKL7F1.mjs → prisma7-binding-l7PybwgY.mjs} +7 -5
- package/dist/prisma7-binding-l7PybwgY.mjs.map +1 -0
- package/dist/{prisma7-binding-nvkqr4mp.d.mts → prisma7-binding-ynOpJPog.d.mts} +45 -19
- package/dist/prisma7-binding-ynOpJPog.d.mts.map +1 -0
- package/dist/{render-ops-CT1mFD7Y-Bh7tPeTD.mjs → render-ops-DzfUHzbE-aSmN95s3.mjs} +3 -3
- package/dist/{render-ops-CT1mFD7Y-Bh7tPeTD.mjs.map → render-ops-DzfUHzbE-aSmN95s3.mjs.map} +1 -1
- package/dist/target.d.mts +11 -11
- package/dist/target.mjs +11 -12
- package/dist/target__aggregates.d.mts +1 -1
- package/dist/target__control.d.mts +1 -1
- package/dist/target__control.mjs +24 -23
- package/dist/target__control.mjs.map +1 -1
- package/dist/target__data-transform.mjs +1 -1
- package/dist/target__diff-database-schema.d.mts +1 -1
- package/dist/target__diff-database-schema.mjs +1 -1
- package/dist/target__issue-planner.d.mts +1 -1
- package/dist/target__issue-planner.mjs +1 -1
- package/dist/target__migration.d.mts +2 -2
- package/dist/target__migration.mjs +3 -3
- package/dist/target__op-factory-call.mjs +1 -1
- package/dist/target__pack.d.mts +1 -1
- package/dist/target__pack.mjs +1 -1
- package/dist/target__planner-produced-postgres-migration.d.mts +2 -2
- package/dist/target__planner-produced-postgres-migration.mjs +1 -1
- package/dist/target__planner.d.mts +1 -1
- package/dist/target__planner.mjs +2 -2
- package/dist/target__prisma7-binding.d.mts +1 -1
- package/dist/target__prisma7-binding.mjs +1 -1
- package/dist/target__render-ops.mjs +1 -1
- package/dist/target__runtime.mjs +2 -2
- package/dist/target__runtime.mjs.map +1 -1
- package/package.json +9 -9
- package/dist/authoring-BJs31CHI-CSs9fBRb.mjs.map +0 -1
- package/dist/column-types-5nUQfQFq.mjs.map +0 -1
- package/dist/column-types-D4U5xGjS.d.mts.map +0 -1
- package/dist/pack-CxW2-wE0.d.mts.map +0 -1
- package/dist/planner-produced-postgres-migration-BtS3h1R7.d.mts +0 -1
- package/dist/planner-produced-postgres-migration-DNnxAU-R-CSPyb9D_.d.mts.map +0 -1
- package/dist/prisma7-binding-CLwKL7F1.mjs.map +0 -1
- package/dist/prisma7-binding-nvkqr4mp.d.mts.map +0 -1
- package/dist/type-constructors-DhJl2KPr-BlPrksrh.mjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prisma7-binding-l7PybwgY.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/prisma7-binding.mjs"],"sourcesContent":["import { D as pgTime, I as pgUuid, N as pgTimetz, R as pgVarchar, S as pgNumeric, T as pgText, _ as pgInt8, a as pgBytea, b as pgJsonb, c as pgDate, f as pgFloat4, g as pgInt4, h as pgInt2, i as pgBool, j as pgTimestamptz, k as pgTimestamp, m as pgInet, o as pgChar, p as pgFloat8, y as pgJson, z as postgresDataTypes } from \"./data-types-pNqSURzU.mjs\";\nimport { t as postgresDataTypeEntries } from \"./data-type-entries-B7ROystY.mjs\";\nimport { a as postgresCodecDescriptorRegistry } from \"./codec-registry-D-jIXuQB.mjs\";\nimport { l as postgresPslTypeConstructors } from \"./authoring-NKZZKf0m.mjs\";\nimport { i as postgresCreateNamespace } from \"./postgres-schema-C6w1rzOF.mjs\";\nimport { t as postgresTargetDescriptorMeta } from \"./descriptor-meta-nvriPVgI.mjs\";\nimport { n as defaultPrimaryKeyName, t as defaultForeignKeyName } from \"./default-constraint-names-CtcRXhV8.mjs\";\nimport { i as noInferredDefaults, r as createPostgresDefaultMapping, t as buildPslDocumentAst, u as noColumnDefaults } from \"./infer-psl-contract-CwtwKri_.mjs\";\nimport { createDataTypeLookup } from \"@internal/framework-components/codec\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { authoringTypeConstructorArguments } from \"@internal/framework-components/authoring\";\nimport { SqlSchemaIR, SqlTableIR } from \"@internal/sql-schema-ir/types\";\nimport { inferredTypeConstructors } from \"@internal/family-sql/psl-build\";\nimport { toModelName } from \"@internal/family-sql/psl-infer\";\nimport { flatPslModels } from \"@internal/framework-components/psl-ast\";\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/prisma7-type-map.ts\nconst of = (type, params = {}) => ({\n\tdataType: type.id,\n\tparams\n});\n/**\n* What Prisma 7.10.0 creates in Postgres for each Prisma 7 scalar and `@db.*` native type, as a data type and its parameters. Derived from the SQL recorded in `test/integration/test/fixtures/prisma7-source/reference/migration.sql`. A `@db.*` attribute's own arguments replace the parameters; without any, the column gets these, so `@db.Char` is the `character(1)` Postgres stores for Prisma 7's `CHAR`.\n*/\nconst prisma7PostgresTypes = {\n\tscalars: {\n\t\tString: of(pgText),\n\t\tBoolean: of(pgBool),\n\t\tInt: of(pgInt4),\n\t\tBigInt: of(pgInt8),\n\t\tFloat: of(pgFloat8),\n\t\tDecimal: of(pgNumeric, {\n\t\t\tprecision: 65,\n\t\t\tscale: 30\n\t\t}),\n\t\tDateTime: of(pgTimestamp, { precision: 3 }),\n\t\tJson: of(pgJsonb),\n\t\tBytes: of(pgBytea)\n\t},\n\tnativeTypes: {\n\t\tText: of(pgText),\n\t\tVarChar: of(pgVarchar),\n\t\tChar: of(pgChar, { length: 1 }),\n\t\tUuid: of(pgUuid),\n\t\tInet: of(pgInet),\n\t\tBoolean: of(pgBool),\n\t\tInteger: of(pgInt4),\n\t\tSmallInt: of(pgInt2),\n\t\tBigInt: of(pgInt8),\n\t\tReal: of(pgFloat4),\n\t\tDoublePrecision: of(pgFloat8),\n\t\tDecimal: of(pgNumeric),\n\t\tTimestamp: of(pgTimestamp),\n\t\tTimestamptz: of(pgTimestamptz),\n\t\tDate: of(pgDate),\n\t\tTime: of(pgTime),\n\t\tTimetz: of(pgTimetz),\n\t\tJson: of(pgJson),\n\t\tJsonB: of(pgJsonb),\n\t\tByteA: of(pgBytea)\n\t}\n};\nconst marked = inferredTypeConstructors({\n\tauthoringTypes: postgresPslTypeConstructors,\n\tcodecLookup: postgresCodecDescriptorRegistry,\n\tdataTypeLookup: createDataTypeLookup(postgresDataTypes)\n});\n/**\n* The constructor marked `inferred` for the column's data type, with every parameter Prisma 7 gives the column as an argument. The reader builds a contract, so it keeps each parameter rather than the fewest arguments printed PSL writes.\n*/\nfunction mappingOf({ dataType, params }) {\n\tconst markedConstructor = marked.get(dataType);\n\tconst args = markedConstructor === void 0 ? void 0 : authoringTypeConstructorArguments(markedConstructor.descriptor, {\n\t\tcodecId: markedConstructor.descriptor.output.codecId,\n\t\ttypeParams: params\n\t});\n\tif (markedConstructor === void 0 || args === void 0) throw new InternalError(`No constructor marked inferred writes ${dataType} with these parameters.`);\n\treturn {\n\t\tconstructorName: markedConstructor.path.join(\".\"),\n\t\targs\n\t};\n}\nfunction mappingsOf(types) {\n\treturn Object.fromEntries(Object.entries(types).map(([name, type]) => [name, mappingOf(type)]));\n}\n/** {@link prisma7PostgresTypes} as the Prisma 7 reader takes it: each type's constructor call. */\nconst prisma7PostgresTypeMap = {\n\tscalars: mappingsOf(prisma7PostgresTypes.scalars),\n\tnativeTypes: mappingsOf(prisma7PostgresTypes.nativeTypes)\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\tvalues: []\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/**\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\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\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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S,sBAAsB,MAAM,UAAU,UAAU;IAC/D,OAAO,WAAW,KAAK,IAAI,KAAK,IAAI;KACnC;KACA;IACD;GACD;EACD;CACD;AACD"}
|
|
@@ -9,10 +9,10 @@ import { a as policyUsingOnlySpec, c as roleSpec, i as policyBothPredicatesSpec,
|
|
|
9
9
|
import "@prisma/orm-family-sql/contract/data-type";
|
|
10
10
|
//#region ../../../3-targets/3-targets/postgres/dist/prisma7-binding.d.mts
|
|
11
11
|
//#region src/core/prisma7-type-map.d.ts
|
|
12
|
-
/** A Prisma 8 constructor call: its name and its arguments
|
|
12
|
+
/** A Prisma 8 constructor call: its name and the values of its arguments. */
|
|
13
13
|
interface ConstructorCall {
|
|
14
14
|
readonly constructorName: string;
|
|
15
|
-
readonly args: readonly
|
|
15
|
+
readonly args: readonly unknown[];
|
|
16
16
|
}
|
|
17
17
|
//#endregion
|
|
18
18
|
//#region src/core/migrations/default-constraint-names.d.ts
|
|
@@ -89,6 +89,26 @@ declare const prisma7PostgresBinding: {
|
|
|
89
89
|
};
|
|
90
90
|
};
|
|
91
91
|
};
|
|
92
|
+
readonly sql: {
|
|
93
|
+
readonly String: {
|
|
94
|
+
readonly kind: "typeConstructor";
|
|
95
|
+
readonly documentation: "Variable-length text with a required maximum character length.";
|
|
96
|
+
readonly args: readonly [{
|
|
97
|
+
readonly kind: "value";
|
|
98
|
+
readonly dataType: "pg/int4";
|
|
99
|
+
readonly name: "length";
|
|
100
|
+
}];
|
|
101
|
+
readonly output: {
|
|
102
|
+
readonly codecId: "sql/varchar@1";
|
|
103
|
+
readonly typeParams: {
|
|
104
|
+
readonly length: {
|
|
105
|
+
readonly kind: "arg";
|
|
106
|
+
readonly index: 0;
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
};
|
|
92
112
|
};
|
|
93
113
|
readonly field: {
|
|
94
114
|
readonly text: {
|
|
@@ -150,9 +170,9 @@ declare const prisma7PostgresBinding: {
|
|
|
150
170
|
readonly kind: "fieldPreset";
|
|
151
171
|
readonly args: readonly [{
|
|
152
172
|
readonly name: "precision";
|
|
153
|
-
readonly kind: "
|
|
173
|
+
readonly kind: "value";
|
|
174
|
+
readonly dataType: "pg/int4";
|
|
154
175
|
readonly optional: true;
|
|
155
|
-
readonly integer: true;
|
|
156
176
|
}, {
|
|
157
177
|
readonly name: "onCreate";
|
|
158
178
|
readonly kind: "option";
|
|
@@ -200,9 +220,9 @@ declare const prisma7PostgresBinding: {
|
|
|
200
220
|
readonly kind: "fieldPreset";
|
|
201
221
|
readonly args: readonly [{
|
|
202
222
|
readonly name: "precision";
|
|
203
|
-
readonly kind: "
|
|
223
|
+
readonly kind: "value";
|
|
224
|
+
readonly dataType: "pg/int4";
|
|
204
225
|
readonly optional: true;
|
|
205
|
-
readonly integer: true;
|
|
206
226
|
}, {
|
|
207
227
|
readonly name: "onCreate";
|
|
208
228
|
readonly kind: "option";
|
|
@@ -250,9 +270,9 @@ declare const prisma7PostgresBinding: {
|
|
|
250
270
|
readonly kind: "fieldPreset";
|
|
251
271
|
readonly args: readonly [{
|
|
252
272
|
readonly name: "precision";
|
|
253
|
-
readonly kind: "
|
|
273
|
+
readonly kind: "value";
|
|
274
|
+
readonly dataType: "pg/int4";
|
|
254
275
|
readonly optional: true;
|
|
255
|
-
readonly integer: true;
|
|
256
276
|
}, {
|
|
257
277
|
readonly name: "onCreate";
|
|
258
278
|
readonly kind: "option";
|
|
@@ -300,9 +320,9 @@ declare const prisma7PostgresBinding: {
|
|
|
300
320
|
readonly kind: "fieldPreset";
|
|
301
321
|
readonly args: readonly [{
|
|
302
322
|
readonly name: "precision";
|
|
303
|
-
readonly kind: "
|
|
323
|
+
readonly kind: "value";
|
|
324
|
+
readonly dataType: "pg/int4";
|
|
304
325
|
readonly optional: true;
|
|
305
|
-
readonly integer: true;
|
|
306
326
|
}, {
|
|
307
327
|
readonly name: "onCreate";
|
|
308
328
|
readonly kind: "option";
|
|
@@ -436,9 +456,9 @@ declare const prisma7PostgresBinding: {
|
|
|
436
456
|
readonly kind: "fieldPreset";
|
|
437
457
|
readonly args: readonly [{
|
|
438
458
|
readonly name: "precision";
|
|
439
|
-
readonly kind: "
|
|
459
|
+
readonly kind: "value";
|
|
460
|
+
readonly dataType: "pg/int4";
|
|
440
461
|
readonly optional: true;
|
|
441
|
-
readonly integer: true;
|
|
442
462
|
}, {
|
|
443
463
|
readonly name: "onCreate";
|
|
444
464
|
readonly kind: "option";
|
|
@@ -486,9 +506,9 @@ declare const prisma7PostgresBinding: {
|
|
|
486
506
|
readonly kind: "fieldPreset";
|
|
487
507
|
readonly args: readonly [{
|
|
488
508
|
readonly name: "precision";
|
|
489
|
-
readonly kind: "
|
|
509
|
+
readonly kind: "value";
|
|
510
|
+
readonly dataType: "pg/int4";
|
|
490
511
|
readonly optional: true;
|
|
491
|
-
readonly integer: true;
|
|
492
512
|
}, {
|
|
493
513
|
readonly name: "onCreate";
|
|
494
514
|
readonly kind: "option";
|
|
@@ -536,9 +556,9 @@ declare const prisma7PostgresBinding: {
|
|
|
536
556
|
readonly kind: "fieldPreset";
|
|
537
557
|
readonly args: readonly [{
|
|
538
558
|
readonly name: "precision";
|
|
539
|
-
readonly kind: "
|
|
559
|
+
readonly kind: "value";
|
|
560
|
+
readonly dataType: "pg/int4";
|
|
540
561
|
readonly optional: true;
|
|
541
|
-
readonly integer: true;
|
|
542
562
|
}, {
|
|
543
563
|
readonly name: "onCreate";
|
|
544
564
|
readonly kind: "option";
|
|
@@ -694,9 +714,9 @@ declare const prisma7PostgresBinding: {
|
|
|
694
714
|
readonly kind: "fieldPreset";
|
|
695
715
|
readonly args: readonly [{
|
|
696
716
|
readonly name: "precision";
|
|
697
|
-
readonly kind: "
|
|
717
|
+
readonly kind: "value";
|
|
718
|
+
readonly dataType: "pg/int4";
|
|
698
719
|
readonly optional: true;
|
|
699
|
-
readonly integer: true;
|
|
700
720
|
}, {
|
|
701
721
|
readonly name: "onCreate";
|
|
702
722
|
readonly kind: "option";
|
|
@@ -1068,6 +1088,12 @@ declare const prisma7PostgresBinding: {
|
|
|
1068
1088
|
readonly __codecTypes?: CodecTypes;
|
|
1069
1089
|
readonly __queryOperationTypes?: QueryOperationTypesForCodecs;
|
|
1070
1090
|
readonly __parameterizedOutputTypes?: ParameterizedOutputTypesForTypeParams;
|
|
1091
|
+
readonly __dataTypeArguments?: {
|
|
1092
|
+
readonly "pg/int4": {
|
|
1093
|
+
readonly argument: number;
|
|
1094
|
+
readonly parameter: number;
|
|
1095
|
+
};
|
|
1096
|
+
};
|
|
1071
1097
|
};
|
|
1072
1098
|
readonly createNamespace: typeof postgresCreateNamespace;
|
|
1073
1099
|
readonly providers: readonly ["postgresql", "postgres"];
|
|
@@ -1119,4 +1145,4 @@ declare const prisma7PostgresBinding: {
|
|
|
1119
1145
|
};
|
|
1120
1146
|
//#endregion
|
|
1121
1147
|
export { prisma7PostgresBinding as t };
|
|
1122
|
-
//# sourceMappingURL=prisma7-binding-
|
|
1148
|
+
//# sourceMappingURL=prisma7-binding-ynOpJPog.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prisma7-binding-ynOpJPog.d.mts","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/prisma7-binding.d.mts"],"mappings":";;;;;;;;;;;;UAYU;WACC;WACA;;;;;iBAKM,sBAAsB;;iBAEtB,sBAAsB,mBAAmB;;;;;;;;iBAQzC,2BAA2B,gBAAgB;;;iBAG3C,YAAY;;;;;;;;cAQf;WACH;aACE;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;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;qBACE;qBACA;qBACA;uBACE;uBACA;;qBAEF;uBACE;;;;iBAIN;mBACE;qBACE;qBACA;qBACA;uBACE;uBACA;uBACA;;qBAEF;uBACE;uBACA;yBACE;2BACE;2BACA;;;;;;;eAOZ;iBACE;mBACE;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;qBACE;;;iBAGJ;mBACE;qBACE;qBACA;uBACE;uBACA;uBACA;uBACA;;uBAEA;uBACA;uBACA;uBACA;;uBAEA;uBACA;uBACA;uBACA;;qBAEF;uBACE;uBACA;yBACE;2BACE;2BACA;;;uBAGJ;yBACE;2BACE;2BACA;2BACA;6BACE;+BACE;+BACA;;;;yBAIN;2BACE;2BACA;2BACA;6BACE;+BACE;+BACA;;;;;;;mBAOZ;qBACE;qBACA;uBACE;uBACA;uBACA;uBACA;;uBAEA;uBACA;uBACA;uBACA;;uBAEA;uBACA;uBACA;uBACA;;qBAEF;uBACE;uBACA;yBACE;2BACE;2BACA;;;uBAGJ;yBACE;2BACE;2BACA;2BACA;6BACE;+BACE;+BACA;;;;yBAIN;2BACE;2BACA;2BACA;6BACE;+BACE;+BACA;;;;;;;mBAOZ;qBACE;qBACA;uBACE;uBACA;uBACA;uBACA;;uBAEA;uBACA;uBACA;uBACA;;uBAEA;uBACA;uBACA;uBACA;;qBAEF;uBACE;uBACA;yBACE;2BACE;2BACA;;;uBAGJ;yBACE;2BACE;2BACA;2BACA;6BACE;+BACE;+BACA;;;;yBAIN;2BACE;2BACA;2BACA;6BACE;+BACE;+BACA;;;;;;;mBAOZ;qBACE;qBACA;uBACE;uBACA;uBACA;uBACA;;uBAEA;uBACA;uBACA;uBACA;;uBAEA;uBACA;uBACA;uBACA;;qBAEF;uBACE;uBACA;yBACE;2BACE;2BACA;;;uBAGJ;yBACE;2BACE;2BACA;2BACA;6BACE;+BACE;+BACA;;;;yBAIN;2BACE;2BACA;2BACA;6BACE;+BACE;+BACA;;;;;;;mBAOZ;qBACE;qBACA;uBACE;uBACA;uBACA;uBACA;;uBAEA;uBACA;uBACA;uBACA;;qBAEF,QAAQ;uBACN;uBACA;;uBAEA;;uBAEA;yBACE;2BACE;2BACA;2BACA;6BACE;+BACE;+BACA;;;;yBAIN;2BACE;2BACA;2BACA;6BACE;+BACE;+BACA;;;;;;;mBAOZ;qBACE;qBACA;uBACE;uBACA;uBACA;uBACA;;uBAEA;uBACA;uBACA;uBACA;;qBAEF,QAAQ;uBACN;uBACA;;uBAEA;;uBAEA;yBACE;2BACE;2BACA;2BACA;6BACE;+BACE;+BACA;;;;yBAIN;2BACE;2BACA;2BACA;6BACE;+BACE;+BACA;;;;;;;mBAOZ;qBACE;qBACA;uBACE;uBACA;uBACA;uBACA;;uBAEA;uBACA;uBACA;uBACA;;uBAEA;uBACA;uBACA;uBACA;;qBAEF;uBACE;uBACA;yBACE;2BACE;2BACA;;;uBAGJ;yBACE;2BACE;2BACA;2BACA;6BACE;+BACE;+BACA;;;;yBAIN;2BACE;2BACA;2BACA;6BACE;+BACE;+BACA;;;;;;;mBAOZ;qBACE;qBACA;uBACE;uBACA;uBACA;uBACA;;uBAEA;uBACA;uBACA;uBACA;;uBAEA;uBACA;uBACA;uBACA;;qBAEF;uBACE;uBACA;yBACE;2BACE;2BACA;;;uBAGJ;yBACE;2BACE;2BACA;2BACA;6BACE;+BACE;+BACA;;;;yBAIN;2BACE;2BACA;2BACA;6BACE;+BACE;+BACA;;;;;;;mBAOZ;qBACE;qBACA;uBACE;uBACA;uBACA;uBACA;;uBAEA;uBACA;uBACA;uBACA;;uBAEA;uBACA;uBACA;uBACA;;qBAEF;uBACE;uBACA;yBACE;2BACE;2BACA;;;uBAGJ;yBACE;2BACE;2BACA;2BACA;6BACE;+BACE;+BACA;;;;yBAIN;2BACE;2BACA;2BACA;6BACE;+BACE;+BACA;;;;;;;mBAOZ;qBACE;qBACA,QAAQ;uBACN;uBACA;;uBAEA;;uBAEA;yBACE;2BACE;2BACA;;;;;mBAKR;qBACE;qBACA,QAAQ;uBACN;uBACA;;uBAEA;;uBAEA;yBACE;2BACE;2BACA;;yBAEF;2BACE;2BACA;;;;;mBAKR;qBACE;qBACA,QAAQ;uBACN;uBACA;;uBAEA;;uBAEA;yBACE;2BACE;2BACA;;;;;mBAKR;qBACE;qBACA,QAAQ;uBACN;uBACA;;uBAEA;;uBAEA;yBACE;2BACE;2BACA;;yBAEF;2BACE;2BACA;;;;;mBAKR;qBACE;qBACA,QAAQ;uBACN;uBACA;;uBAEA;;uBAEA;yBACE;2BACE;2BACA;;;;;mBAKR;qBACE;qBACA,QAAQ;uBACN;uBACA;;uBAEA;;uBAEA;yBACE;2BACE;2BACA;;yBAEF;2BACE;2BACA;;;;;mBAKR;qBACE;qBACA;uBACE;uBACA;uBACA;uBACA;;uBAEA;uBACA;uBACA;uBACA;;uBAEA;uBACA;uBACA;uBACA;;qBAEF;uBACE;uBACA;yBACE;2BACE;2BACA;;;uBAGJ;yBACE;2BACE;2BACA;2BACA;6BACE;+BACE;+BACA;;;;yBAIN;2BACE;2BACA;2BACA;6BACE;+BACE;+BACA;;;;;;;;iBAQd;mBACE;mBACA;qBACE;;;iBAGJ;mBACE;qBACE;qBACA;uBACE;uBACA;yBACE;2BACE;2BACA;;;uBAGJ;;;mBAGJ;qBACE;qBACA;uBACE;uBACA;yBACE;2BACE;2BACA;;;uBAGJ;;;;;eAKR,WAAW,SAAS,kEAAkE;eACtF,uEAAuE;eACvE;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;;;;;eAKC;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;;;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,eAAe;;aAEf,eAAe;aACf,wBAAwB;aACxB,6BAA6B;aAC7B;eACE;iBACE;iBACA;;;;WAIN,wBAAwB;WACxB;WACA;IACP,SAAS,SAAS,eAAe;IACjC,aAAa,SAAS,eAAe;;WAE9B;aACE;aACA;;WAEF;aACE;aACA;aACA;aACA;aACA;aACA;;;WAGF;WACA;aACE,mBAAmB;aACnB,mBAAmB;;WAErB,mCAAmC;WACnC,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,8 +1,8 @@
|
|
|
1
1
|
import { c as postgresError } from "./errors-BrhQYgdL-D_lIrddD.mjs";
|
|
2
|
-
import { B as isPostgresOpFactoryCall } from "./op-factory-call-
|
|
2
|
+
import { B as isPostgresOpFactoryCall } from "./op-factory-call-B5_tnifS-BGaMVQ8g.mjs";
|
|
3
3
|
import { blindCast } from "@prisma/orm-framework/utils/casts";
|
|
4
4
|
import { isThenable } from "@prisma/orm-framework/utils/promise";
|
|
5
|
-
//#region ../../../3-targets/3-targets/postgres/dist/render-ops-
|
|
5
|
+
//#region ../../../3-targets/3-targets/postgres/dist/render-ops-DzfUHzbE.mjs
|
|
6
6
|
/**
|
|
7
7
|
* Asserts an op materialised by an `OpFactoryCall` targets postgres. The
|
|
8
8
|
* extension surface lets any contributor emit calls, so this is the
|
|
@@ -38,4 +38,4 @@ function renderOps(calls, lowerer) {
|
|
|
38
38
|
//#endregion
|
|
39
39
|
export { renderOps as t };
|
|
40
40
|
|
|
41
|
-
//# sourceMappingURL=render-ops-
|
|
41
|
+
//# sourceMappingURL=render-ops-DzfUHzbE-aSmN95s3.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render-ops-
|
|
1
|
+
{"version":3,"file":"render-ops-DzfUHzbE-aSmN95s3.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/render-ops-DzfUHzbE.mjs"],"sourcesContent":["import { c as postgresError } from \"./errors-BrhQYgdL.mjs\";\nimport { R as isPostgresOpFactoryCall } from \"./op-factory-call-B5_tnifS.mjs\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { isThenable } from \"@internal/utils/promise\";\n//#region src/core/migrations/render-ops.ts\n/**\n* Asserts an op materialised by an `OpFactoryCall` targets postgres. The\n* extension surface lets any contributor emit calls, so this is the\n* integration boundary where a stray non-postgres op would otherwise\n* silently flow through to postgres-shaped renderers — exactly the\n* place to fail loudly with op metadata (`id` + `target.id`).\n*/\nfunction assertPostgresOp(op, callFactoryName) {\n\tconst targetId = blindCast(op).target?.id;\n\tif (targetId !== \"postgres\") throw postgresError(\"MIGRATION.TARGET_MISMATCH\", `renderOps: expected postgres op but got target.id=\"${String(targetId)}\" for op.id=\"${op.id}\" (factoryName=\"${callFactoryName}\"). An OpFactoryCall produced an op for a different target on the postgres planner path; check the call's target binding.`, { meta: {\n\t\topId: op.id,\n\t\ttargetId: String(targetId),\n\t\tfactoryName: callFactoryName\n\t} });\n}\nfunction checkedOp(opOrPromise, callFactoryName) {\n\tif (isThenable(opOrPromise)) {\n\t\tconst checked = opOrPromise.then((op) => {\n\t\t\tassertPostgresOp(op, callFactoryName);\n\t\t\treturn op;\n\t\t});\n\t\tchecked.catch(() => void 0);\n\t\treturn checked;\n\t}\n\tassertPostgresOp(opOrPromise, callFactoryName);\n\treturn opOrPromise;\n}\nfunction renderOps(calls, lowerer) {\n\treturn calls.flatMap((c) => {\n\t\treturn (isPostgresOpFactoryCall(c) ? c.toOps(lowerer) : [blindCast(c).toOp(lowerer)]).map((opOrPromise) => checkedOp(opOrPromise, c.factoryName));\n\t});\n}\n//#endregion\nexport { renderOps as t };\n\n//# sourceMappingURL=render-ops-DzfUHzbE.mjs.map"],"mappings":";;;;;;;;;;;;AAYA,SAAS,iBAAiB,IAAI,iBAAiB;CAC9C,MAAM,WAAW,UAAU,EAAE,CAAC,CAAC,QAAQ;CACvC,IAAI,aAAa,YAAY,MAAM,cAAc,6BAA6B,sDAAsD,OAAO,QAAQ,EAAE,eAAe,GAAG,GAAG,kBAAkB,gBAAgB,4HAA4H,EAAE,MAAM;EAC/U,MAAM,GAAG;EACT,UAAU,OAAO,QAAQ;EACzB,aAAa;CACd,EAAE,CAAC;AACJ;AACA,SAAS,UAAU,aAAa,iBAAiB;CAChD,IAAI,WAAW,WAAW,GAAG;EAC5B,MAAM,UAAU,YAAY,MAAM,OAAO;GACxC,iBAAiB,IAAI,eAAe;GACpC,OAAO;EACR,CAAC;EACD,QAAQ,YAAY,KAAK,CAAC;EAC1B,OAAO;CACR;CACA,iBAAiB,aAAa,eAAe;CAC7C,OAAO;AACR;AACA,SAAS,UAAU,OAAO,SAAS;CAClC,OAAO,MAAM,SAAS,MAAM;EAC3B,QAAQ,wBAAwB,CAAC,IAAI,EAAE,MAAM,OAAO,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,EAAA,CAAG,KAAK,gBAAgB,UAAU,aAAa,EAAE,WAAW,CAAC;CACjJ,CAAC;AACF"}
|
package/dist/target.d.mts
CHANGED
|
@@ -18,18 +18,18 @@ import "./ddl-D_JWHRzo.mjs";
|
|
|
18
18
|
import "./codec-ids-C2HurNhZ.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-FifKlctQ.mjs";
|
|
20
20
|
import { a as renderFullTextIndexDocument, i as quoteQualifiedName, n as qualifyName, o as validateEnumValueLength, r as quoteIdentifier, t as escapeLiteral } from "./sql-utils-B7LfCQCB.mjs";
|
|
21
|
-
import { t as postgresAggregateDescriptors } from "./aggregates-
|
|
21
|
+
import { t as postgresAggregateDescriptors } from "./aggregates-C2xqsGZ2.mjs";
|
|
22
22
|
import { a as JsonValue$1, c as Time, d as TimestampString, f as Timestamptz, g as Varchar, h as VarBit, i as Interval, l as TimeString, m as Timetz, n as Char, o as Numeric, p as TimestamptzString, r as CodecTypes, s as ParameterizedOutputTypesForTypeParams, t as Bit, u as Timestamp } from "./codec-types-Ct_4iTVc-4VoGpl4J.mjs";
|
|
23
23
|
import "./codec-types-CVyCyOV-.mjs";
|
|
24
24
|
import { A as noNullValuesAst, B as timestamptz, C as createTable, D as int4, E as indexExistsAst, F as tableExistsAst, H as toRegclass, I as tableIsEmptyAst, L as tablePrimaryKeyAst, M as rlsEnabledAst, N as rlsPolicyExistsAst, O as int8, P as sequenceNameAvailableAst, R as text, S as createSchema, T as extensionExistsAst, V as timestamptzJsDate, _ 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 pgTable, k as jsonb, 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 textArray } from "./contract-free-D1JEZVpQ.mjs";
|
|
25
25
|
import { t as PostgresPlanTargetDetails } from "./planner-target-details-HkP4RrRO-_xPQVPF0.mjs";
|
|
26
26
|
import { n as postgresNowGenerators, t as postgresNowGeneratorControlDescriptors } from "./date-time-now-generators-CMkXVbMG-CYwplAuf.mjs";
|
|
27
|
-
import { n as postgresPslTypeConstructors, r as postgresScalarAuthoringTypes, t as postgresNativeAuthoringTypes } from "./control-
|
|
27
|
+
import { n as postgresPslTypeConstructors, r as postgresScalarAuthoringTypes, t as postgresNativeAuthoringTypes } from "./control-C6XU7Guz.mjs";
|
|
28
28
|
import { i as dataTransform, r as DataTransformOptions, t as DataTransformClosure } from "./data-transform-nGy9rz87-CEOXAj91.mjs";
|
|
29
29
|
import "./data-transform-C-3UJ3hC.mjs";
|
|
30
30
|
import { A as pgTimestampStoredText, B as postgresDataTypes, C as pgNumericParams, D as pgTime, E as pgTextArray, F as pgTsquery, H as qualifiedEnumName, I as pgUuid, L as pgVarbit, M as pgTimestamptzStoredText, N as pgTimetz, O as pgTimeStoredText, P as pgTimetzStoredText, R as pgVarchar, S as pgNumeric, T as pgText, V as postgresTextDataTypes, _ as pgInt8, a as pgBytea, b as pgJsonb, c as pgDate, d as pgEnumParams, f as pgFloat4, g as pgInt4, h as pgInt2, i as pgBool, j as pgTimestamptz, k as pgTimestamp, l as pgDateStoredText, m as pgInet, n as pgBit, o as pgChar, p as pgFloat8, r as pgBitLengthParams, s as pgCharacterLengthParams, t as createPostgresBuiltinDataTypeLookup, u as pgEnum, v as pgInterval, w as pgPrecisionParams, x as pgJsonbEnumRefusal, y as pgJson, z as postgresDataTypeEntries } from "./data-types-BbFUwMKs.mjs";
|
|
31
31
|
import { n as postgresResolveDefault, r as readPostgresDefault, t as PostgresReportedDefault } from "./default-normalizer-P-u2VRBf.mjs";
|
|
32
|
-
import { t as buildPostgresPlanDiff } from "./diff-database-schema-
|
|
32
|
+
import { t as buildPostgresPlanDiff } from "./diff-database-schema-N-ftS4iF.mjs";
|
|
33
33
|
import { n as postgresError, t as errorPostgresMigrationStackMissing } from "./errors-BP-2V2_C.mjs";
|
|
34
34
|
import { _ as plaintoTsquery, a as FullTextIndexReference, c as QueryOperationTypes, d as TsqueryArgument, f as TsqueryExpression, g as phrasetoTsquery, h as fullTextDocument, i as FullTextHeadlineOptions, l as QueryOperationTypesForCodecs, m as TsqueryParserOptions, n as FullTextDocumentColumn, o as FullTextMatchesOptions, p as TsqueryParser, r as FullTextDocumentGroups, s as FullTextRankOptions, t as FullTextDocument, u as TextArgument, v as toTsquery, y as websearchToTsquery } from "./operation-types--Wa_cv45-jn5HQ8yt.mjs";
|
|
35
35
|
import { n as PostgresTsqueryArgument, t as PostgresFullTextMethods } from "./full-text-collection-method-BFd2u2cs-DcN_Vf7f.mjs";
|
|
@@ -37,23 +37,23 @@ import { n as tsquery, t as TsqueryTag } from "./full-text-r2wMygYZ.mjs";
|
|
|
37
37
|
import { t as postgresCodecTraitsOf } from "./full-text-index-authoring-Ca6bWXyG.mjs";
|
|
38
38
|
import { i as stackDataTypes, n as alterTypeCheck, r as qualifyTableName, t as ColumnTypeCheck } from "./planner-sql-checks-Ed-WGtge-Clnvg-zp.mjs";
|
|
39
39
|
import { A as RenameColumnCall, C as DropNativeEnumTypeCall, D as EnableRowLevelSecurityCall, E as DropTableCall, F as SetDefaultCall, I as SetNotNullCall, M as RenameIndexCall, N as RenamePostgresRlsPolicyCall, P as RenameTableCall, S as DropIndexCall, T as DropPostgresRlsPolicyCall, _ as DisableRowLevelSecurityCall, a as AddNativeEnumValueCall, b as DropConstraintCall, c as AddUniqueCall, d as CreateIndexCall, f as CreateNativeEnumTypeCall, g as DataTransformCall, h as CreateTableCall, i as AddForeignKeyCall, j as RenameConstraintCall, k as RawSqlCall, l as AlterColumnTypeCall, m as CreateSchemaCall, n as AddColumnCall, o as AddPrimaryKeyCall, p as CreatePostgresRlsPolicyCall, r as AddColumnWithTemporaryDefaultCall, s as AddRequiredColumnToEmptyTableCall, t as AddCheckConstraintCall, u as CreateExtensionCall, v as DropCheckConstraintCall, w as DropNotNullCall, x as DropDefaultCall, y as DropColumnCall } from "./op-factory-call-DghB0ndC-9CDIMLTM.mjs";
|
|
40
|
-
import { n as planIssues, t as coalesceSubtreeIssues } from "./issue-planner-
|
|
40
|
+
import { n as planIssues, t as coalesceSubtreeIssues } from "./issue-planner-DYLByGrp.mjs";
|
|
41
41
|
import { n as MARKER_LOCK_SQL, t as MARKER_LOCK_KEY } from "./marker-lock-BGBqXaQ4.mjs";
|
|
42
42
|
import { t as PostgresContractView } from "./postgres-contract-view-BFzIDwwN-pJ6gJGOT.mjs";
|
|
43
|
-
import { t as PostgresMigration } from "./postgres-migration-
|
|
44
|
-
import { a as fn, c as placeholder, d as sql, f as unique, i as createExtension, l as primaryKey, n as checkExpression, o as foreignKey, r as col, s as lit, t as MigrationCLI, u as rawSql } from "./migration-
|
|
43
|
+
import { t as PostgresMigration } from "./postgres-migration-CPUwTt8B-B2vE3E_r.mjs";
|
|
44
|
+
import { a as fn, c as placeholder, d as sql, f as unique, i as createExtension, l as primaryKey, n as checkExpression, o as foreignKey, r as col, s as lit, t as MigrationCLI, u as rawSql } from "./migration-CpHZV_Y6.mjs";
|
|
45
45
|
import { n as IntrospectedTypeText, r as introspectedTypeText, t as CatalogColumnType } from "./native-type-normalizer-DFE5L3YY.mjs";
|
|
46
46
|
import "./op-factory-call-BRHT7R1s.mjs";
|
|
47
47
|
import "./operation-types-BcOviE0b.mjs";
|
|
48
|
-
import "./pack-
|
|
49
|
-
import { t as TypeScriptRenderablePostgresMigration } from "./planner-produced-postgres-migration-
|
|
50
|
-
import { n as createPostgresMigrationPlanner, t as contractToPostgresDatabaseSchemaNode } from "./planner-
|
|
48
|
+
import "./pack-BycbuOFo.mjs";
|
|
49
|
+
import { t as TypeScriptRenderablePostgresMigration } from "./planner-produced-postgres-migration-BO7M2Q-t-Dhyz9UMt.mjs";
|
|
50
|
+
import { n as createPostgresMigrationPlanner, t as contractToPostgresDatabaseSchemaNode } from "./planner-BEAM0y_U.mjs";
|
|
51
51
|
import { t as buildColumnTypeSql } from "./planner-ddl-builders-DbG9_uAk.mjs";
|
|
52
52
|
import { n as resolveIdentityValue, t as buildBuiltinIdentityValue } from "./planner-identity-values-B-NAiN7I.mjs";
|
|
53
|
-
import "./planner-produced-postgres-migration-
|
|
53
|
+
import "./planner-produced-postgres-migration-C0Zs5NHu.mjs";
|
|
54
54
|
import { i as hasUniqueConstraint, n as hasForeignKey, r as hasIndex, t as buildSchemaLookupMap } from "./planner-schema-lookup-C4DHAddq.mjs";
|
|
55
55
|
import "./planner-sql-checks-K_EFdkCw.mjs";
|
|
56
|
-
import { t as prisma7PostgresBinding } from "./prisma7-binding-
|
|
56
|
+
import { t as prisma7PostgresBinding } from "./prisma7-binding-ynOpJPog.mjs";
|
|
57
57
|
import { t as renderOps } from "./render-ops-DPwhZt2W.mjs";
|
|
58
58
|
import { t as renderCallsToTypeScript } from "./render-typescript-6sCFvMBh.mjs";
|
|
59
59
|
import { n as PostgresListDecoder, r as PostgresRuntimeTargetInstance, t as PostgresContractSerializer } from "./runtime-CQckFo7G.mjs";
|
package/dist/target.mjs
CHANGED
|
@@ -14,7 +14,7 @@ import { B as tablePrimaryKeyAst, E as extensionExistsAst, F as rlsPolicyExistsA
|
|
|
14
14
|
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-CN4hGOBI.mjs";
|
|
15
15
|
import { t as postgresCodecTraitsOf } from "./postgres-codec-traits-C8pMXZ1--D7uZOMyN.mjs";
|
|
16
16
|
import { i as policyRoleList, n as POLICY_OPERATION_PREDICATES, r as computeContentHash, t as POLICY_COMMAND_SQL } from "./canonicalize-RdxoUHao-DK_M6HU-.mjs";
|
|
17
|
-
import { c as
|
|
17
|
+
import { c as postgresNativeAuthoringTypes, d as postgresNowGenerators, f as postgresPslTypeConstructors, l as postgresNowGeneratorControlDescriptors, p as postgresScalarAuthoringTypes } from "./authoring-NKZZKf0m-aFhCcgbc.mjs";
|
|
18
18
|
import { t as postgresRenderCheckExpressions } from "./check-expressions-7uCCP01t-WtUqfqkP.mjs";
|
|
19
19
|
import { t as postgresDataTypeEntries } from "./data-type-entries-B7ROystY-Bb3OHfWo.mjs";
|
|
20
20
|
import { n as PostgresSchemaNodeKind, r as PostgresTableSchemaNode, t as PostgresNativeEnumSchemaNode } from "./postgres-table-schema-node-BBkitBQh-DT1T5VWU.mjs";
|
|
@@ -23,24 +23,23 @@ import { n as readPostgresDefault, t as postgresResolveDefault } from "./default
|
|
|
23
23
|
import { n as renderFullTextIndexDocument } from "./full-text-search-document-Doy5TF7c-DezgYsP-.mjs";
|
|
24
24
|
import { r as resolveDdlSchemaForNamespaceStorage } from "./resolve-ddl-schema-D3VNPMSm-DVuswLch.mjs";
|
|
25
25
|
import { a as stackDataTypes, i as qualifyTableName, t as alterTypeCheck } from "./planner-sql-checks-DJ9RWk0S-DpNK0_as.mjs";
|
|
26
|
-
import { A as RenameConstraintCall, C as DropNativeEnumTypeCall, D as EnableRowLevelSecurityCall, E as DropTableCall, F as SetNotNullCall, M as RenamePostgresRlsPolicyCall, N as RenameTableCall, O as RawSqlCall, P as SetDefaultCall, R as createExtension, S as DropIndexCall, T as DropPostgresRlsPolicyCall, _ as DisableRowLevelSecurityCall, a as AddNativeEnumValueCall, b as DropConstraintCall, c as AddUniqueCall, d as CreateIndexCall, f as CreateNativeEnumTypeCall, g as DataTransformCall, h as CreateTableCall, i as AddForeignKeyCall, j as RenameIndexCall, k as RenameColumnCall, l as AlterColumnTypeCall, m as CreateSchemaCall, n as AddColumnCall, o as AddPrimaryKeyCall, p as CreatePostgresRlsPolicyCall, r as AddColumnWithTemporaryDefaultCall, s as AddRequiredColumnToEmptyTableCall, t as AddCheckConstraintCall, u as CreateExtensionCall, v as DropCheckConstraintCall, w as DropNotNullCall, x as DropDefaultCall, y as DropColumnCall } from "./op-factory-call-
|
|
26
|
+
import { A as RenameConstraintCall, C as DropNativeEnumTypeCall, D as EnableRowLevelSecurityCall, E as DropTableCall, F as SetNotNullCall, M as RenamePostgresRlsPolicyCall, N as RenameTableCall, O as RawSqlCall, P as SetDefaultCall, R as createExtension, S as DropIndexCall, T as DropPostgresRlsPolicyCall, _ as DisableRowLevelSecurityCall, a as AddNativeEnumValueCall, b as DropConstraintCall, c as AddUniqueCall, d as CreateIndexCall, f as CreateNativeEnumTypeCall, g as DataTransformCall, h as CreateTableCall, i as AddForeignKeyCall, j as RenameIndexCall, k as RenameColumnCall, l as AlterColumnTypeCall, m as CreateSchemaCall, n as AddColumnCall, o as AddPrimaryKeyCall, p as CreatePostgresRlsPolicyCall, r as AddColumnWithTemporaryDefaultCall, s as AddRequiredColumnToEmptyTableCall, t as AddCheckConstraintCall, u as CreateExtensionCall, v as DropCheckConstraintCall, w as DropNotNullCall, x as DropDefaultCall, y as DropColumnCall } from "./op-factory-call-B5_tnifS-BGaMVQ8g.mjs";
|
|
27
27
|
import { t as buildColumnTypeSql } from "./planner-ddl-builders-BKxUQ0nH-DJB_oubi.mjs";
|
|
28
28
|
import { n as resolveIdentityValue, t as buildBuiltinIdentityValue } from "./planner-identity-values-DhXsY-NI-BxiK5eXi.mjs";
|
|
29
|
-
import { a as planIssues, t as coalesceSubtreeIssues } from "./control-policy-
|
|
30
|
-
import { n as contractToPostgresDatabaseSchemaNode, t as buildPostgresPlanDiff } from "./diff-database-schema-
|
|
31
|
-
import { n as PostgresContractView, t as PostgresContractSerializer } from "./postgres-contract-view-
|
|
32
|
-
import { t as dataTransform } from "./data-transform-
|
|
33
|
-
import { t as PostgresMigration } from "./postgres-migration-
|
|
34
|
-
import { t as renderOps } from "./render-ops-
|
|
29
|
+
import { a as planIssues, t as coalesceSubtreeIssues } from "./control-policy-XDdMfbBp-Bf5qOmWS.mjs";
|
|
30
|
+
import { n as contractToPostgresDatabaseSchemaNode, t as buildPostgresPlanDiff } from "./diff-database-schema-BjbxFQr1-CxXB4GhI.mjs";
|
|
31
|
+
import { n as PostgresContractView, t as PostgresContractSerializer } from "./postgres-contract-view-BkuNbRzj-DXXkgI5Y.mjs";
|
|
32
|
+
import { t as dataTransform } from "./data-transform-h9agBu_c-B5dsDs8G.mjs";
|
|
33
|
+
import { t as PostgresMigration } from "./postgres-migration-Bi7QKUYk-ed-QEmS1.mjs";
|
|
34
|
+
import { t as renderOps } from "./render-ops-DzfUHzbE-aSmN95s3.mjs";
|
|
35
35
|
import { t as renderCallsToTypeScript } from "./render-typescript-Dqp1Spgn-B128r1qw.mjs";
|
|
36
|
-
import { t as TypeScriptRenderablePostgresMigration } from "./planner-produced-postgres-migration-
|
|
37
|
-
import { t as createPostgresMigrationPlanner } from "./planner-
|
|
36
|
+
import { t as TypeScriptRenderablePostgresMigration } from "./planner-produced-postgres-migration-HAdTAokB-mZ-CNMWW.mjs";
|
|
37
|
+
import { t as createPostgresMigrationPlanner } from "./planner-Dzp0sfa8-BQQk49Bc.mjs";
|
|
38
38
|
import { n as MARKER_LOCK_SQL, t as MARKER_LOCK_KEY } from "./marker-lock-DFc1Tfv5-QMJSzMIa.mjs";
|
|
39
|
-
import { _ as postgresNativeAuthoringTypes, v as postgresPslTypeConstructors, y as postgresScalarAuthoringTypes } from "./type-constructors-DhJl2KPr-BlPrksrh.mjs";
|
|
40
39
|
import { c as toTsquery, l as websearchToTsquery, n as fullTextDocument, o as phrasetoTsquery, s as plaintoTsquery, t as FullTextDocument } from "./full-text-parsers-CFFxiOrp-BmiwdZ21.mjs";
|
|
41
40
|
import { t as tsquery } from "./full-text-8PmilGkW.mjs";
|
|
42
41
|
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-CbOh59ZJ.mjs";
|
|
43
42
|
import { t as introspectedTypeText } from "./native-type-normalizer-B7L7_uaK.mjs";
|
|
44
43
|
import { i as hasUniqueConstraint, n as hasForeignKey, r as hasIndex, t as buildSchemaLookupMap } from "./planner-schema-lookup-CdgWer9s.mjs";
|
|
45
|
-
import { t as prisma7PostgresBinding } from "./prisma7-binding-
|
|
44
|
+
import { t as prisma7PostgresBinding } from "./prisma7-binding-l7PybwgY.mjs";
|
|
46
45
|
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, DisableRowLevelSecurityCall, DropCheckConstraintCall, DropColumnCall, DropConstraintCall, DropDefaultAction, DropDefaultCall, DropIndexCall, DropNativeEnumTypeCall, DropNotNullCall, DropPostgresRlsPolicyCall, DropTableCall, EnableRowLevelSecurityCall, FULL_TEXT_INDEX_TYPE, 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_INT_CODEC_ID, PG_JSONB_CODEC_ID, PG_JSON_CODEC_ID, PG_NUMERIC_CODEC_ID, PG_TEXT_ARRAY_CODEC_ID, PG_TEXT_CODEC_ID, PG_TIMESTAMPTZ_DATE_CODEC_ID, PG_TIMESTAMPTZ_STRING_CODEC_ID, PG_TIMESTAMPTZ_TEMPORAL_CODEC_ID, PG_TIMESTAMP_STRING_CODEC_ID, PG_TIMESTAMP_TEMPORAL_CODEC_ID, PG_TIMETZ_CODEC_ID, PG_TIME_STRING_CODEC_ID, PG_TIME_TEMPORAL_CODEC_ID, PG_TSQUERY_CODEC_ID, PG_UNBOUNDED_INT_CODEC_ID, PG_UUID_CODEC_ID, PG_VARBIT_CODEC_ID, PG_VARCHAR_CODEC_ID, POLICY_COMMAND_SQL, POLICY_OPERATION_PREDICATES, PgTimestamptzDateCodec, PgTimestamptzDateDescriptor, PostgresAlterIndexRename, PostgresAlterPolicyRename, PostgresAlterTable, PostgresCodecDescriptor, PostgresContractSerializer, PostgresContractView, PostgresCreateIndex, PostgresCreatePolicy, PostgresCreateSchema, PostgresCreateTable, PostgresCreateType, PostgresDatabaseSchemaNode, PostgresDdlNode, PostgresDisableRowLevelSecurity, PostgresDropIndex, PostgresDropPolicy, PostgresDropType, PostgresNamespaceSchemaNode, PostgresNativeEnum, PostgresNativeEnumSchemaNode, PostgresPolicySchemaNode, PostgresRlsEnablement, PostgresRlsPolicy, PostgresRole, PostgresRoleSchemaNode, PostgresSchema, PostgresSchemaNodeKind, PostgresTableSchemaNode, PostgresTableSource, PostgresUnboundSchema, RawSqlCall, RenameColumnCall, RenameConstraintCall, RenameIndexCall, RenamePostgresRlsPolicyCall, RenameTableCall, 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, SetNotNullCall, 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, createExtension, createPostgresBuiltinCodecLookup, createPostgresBuiltinDataTypeLookup, createPostgresCodecRegistryWithBuiltins, createPostgresMigrationPlanner, createSchema, createTable, dataTransform, decodePostgresListText, definePostgresCodecs, describeFullTextIndexProblem, dropDefaultAction, errorPostgresMigrationStackMissing, escapeLiteral, extensionExistsAst, fn, foreignKey, fullTextDocument, fullTextIndexProblems, hasForeignKey, hasIndex, hasUniqueConstraint, indexExistsAst, int4, int8, introspectedTypeText, isPgEnumParams, isPostgresCodecDescriptor, isPostgresSchema, jsonb, lit, 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, pgJson, pgJsonColumn, pgJsonb, pgJsonbColumn, pgJsonbEnumRefusal, pgNumeric, pgNumericColumn, pgNumericParams, pgPrecisionParams, pgTable, pgText, pgTextArray, pgTextColumn, pgTime, pgTimeStoredText, pgTimestamp, pgTimestampStoredText, pgTimestamptz, pgTimestamptzDateColumn, pgTimestamptzDateDescriptor, pgTimestamptzStoredText, pgTimetz, pgTimetzColumn, pgTimetzStoredText, pgTsquery, pgUnboundedIntColumn, pgUuid, pgUuidColumn, pgVarbit, pgVarbitColumn, pgVarchar, pgVarcharColumn, phrasetoTsquery, placeholder, plaintoTsquery, planIssues, policyInputFromSerialized, policyRoleList, postgresAggregateDescriptors, postgresCodec, postgresCodecDescriptorRegistry, postgresCodecRegistry, postgresCodecTraitsOf, postgresCreateNamespace, postgresDataTypeEntries, postgresDataTypes, postgresError, postgresNativeAuthoringTypes, postgresNowGeneratorControlDescriptors, postgresNowGenerators, postgresPslTypeConstructors, postgresRenderCheckExpressions, postgresResolveDefault, postgresScalarAuthoringTypes, postgresTextDataTypes, primaryKey, prisma7PostgresBinding, qualifiedEnumName, qualifyName, qualifyTableName, quoteIdentifier, quoteQualifiedName, rawSql, readPostgresDefault, renderCallsToTypeScript, renderFullTextIndexDocument, renderOps, resolveDdlSchemaForNamespaceStorage, resolveIdentityValue, rlsEnabledAst, rlsPolicyExistsAst, sequenceNameAvailableAst, sql, stackDataTypes, tableExistsAst, tableIsEmptyAst, tablePrimaryKeyAst, text, textArray, timestamptz, timestamptzJsDate, toRegclass, toTsquery, tsquery, unique, validateEnumValueLength, websearchToTsquery, weightGroupsOf };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as postgresAggregateDescriptors } from "./aggregates-
|
|
1
|
+
import { t as postgresAggregateDescriptors } from "./aggregates-C2xqsGZ2.mjs";
|
|
2
2
|
export { postgresAggregateDescriptors };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { n as parsePostgresListText, t as decodePostgresListText } from "./list-decoder-BcrLExnx-hTa7qY7a.mjs";
|
|
2
2
|
import { t as postgresNowGeneratorControlDescriptors } from "./date-time-now-generators-CMkXVbMG-CYwplAuf.mjs";
|
|
3
|
-
import { i as postgresTargetDescriptor, n as postgresPslTypeConstructors, r as postgresScalarAuthoringTypes, t as postgresNativeAuthoringTypes } from "./control-
|
|
3
|
+
import { i as postgresTargetDescriptor, n as postgresPslTypeConstructors, r as postgresScalarAuthoringTypes, t as postgresNativeAuthoringTypes } from "./control-C6XU7Guz.mjs";
|
|
4
4
|
export { decodePostgresListText, postgresTargetDescriptor as default, parsePostgresListText, postgresNativeAuthoringTypes, postgresNowGeneratorControlDescriptors, postgresPslTypeConstructors, postgresScalarAuthoringTypes };
|
package/dist/target__control.mjs
CHANGED
|
@@ -7,18 +7,18 @@ import { P as setFallbackTemporal, i as decodePostgresListText, o as parsePostgr
|
|
|
7
7
|
import { s as fullTextIndexDefinitionOf } from "./full-text-index-definition-BPxQQBuC-BrpDsuJu.mjs";
|
|
8
8
|
import { i as PostgresRlsPolicy, n as PostgresRlsEnablement, o as PostgresRole } from "./postgres-schema-C6w1rzOF-bzaF5PIS.mjs";
|
|
9
9
|
import { r as computeContentHash } from "./canonicalize-RdxoUHao-DK_M6HU-.mjs";
|
|
10
|
-
import { c as postgresNowGeneratorControlDescriptors, t as POLICY_BLOCK_KEYWORDS } from "./authoring-
|
|
10
|
+
import { c as postgresNativeAuthoringTypes, f as postgresPslTypeConstructors, l as postgresNowGeneratorControlDescriptors, p as postgresScalarAuthoringTypes, t as POLICY_BLOCK_KEYWORDS } from "./authoring-NKZZKf0m-aFhCcgbc.mjs";
|
|
11
11
|
import { t as postgresRenderCheckExpressions } from "./check-expressions-7uCCP01t-WtUqfqkP.mjs";
|
|
12
|
-
import { t as postgresTargetDescriptorMeta } from "./descriptor-meta-
|
|
12
|
+
import { t as postgresTargetDescriptorMeta } from "./descriptor-meta-nvriPVgI-B-ZW5haL.mjs";
|
|
13
13
|
import { a as postgresDiffSubjectGranularity, i as postgresDiffSubjectEntityKind } from "./postgres-table-schema-node-BBkitBQh-DT1T5VWU.mjs";
|
|
14
14
|
import { t as PostgresDatabaseSchemaNode } from "./postgres-role-schema-node-B8Z5i5D--PObwlU2Z.mjs";
|
|
15
15
|
import { i as qualifyTableName } from "./planner-sql-checks-DJ9RWk0S-DpNK0_as.mjs";
|
|
16
|
-
import { r as diffPostgresSchema } from "./diff-database-schema-
|
|
17
|
-
import { t as PostgresContractSerializer } from "./postgres-contract-view-
|
|
18
|
-
import { o as postgresContractToSchema } from "./postgres-migration-
|
|
19
|
-
import { t as createPostgresMigrationPlanner } from "./planner-
|
|
16
|
+
import { r as diffPostgresSchema } from "./diff-database-schema-BjbxFQr1-CxXB4GhI.mjs";
|
|
17
|
+
import { t as PostgresContractSerializer } from "./postgres-contract-view-BkuNbRzj-DXXkgI5Y.mjs";
|
|
18
|
+
import { o as postgresContractToSchema } from "./postgres-migration-Bi7QKUYk-ed-QEmS1.mjs";
|
|
19
|
+
import { t as createPostgresMigrationPlanner } from "./planner-Dzp0sfa8-BQQk49Bc.mjs";
|
|
20
20
|
import { n as MARKER_LOCK_SQL, t as MARKER_LOCK_KEY } from "./marker-lock-DFc1Tfv5-QMJSzMIa.mjs";
|
|
21
|
-
import {
|
|
21
|
+
import { a as buildIndexAttribute, c as buildNativeEnumBlock, d as inferPostgresPslContract, f as namedArg, g as positionalArg, h as parseDefaultAttributeString, i as buildFullTextIndexAttribute, n as buildAttribute, o as buildMapAttribute, r as buildCheckAttribute, s as buildModelConstraintAttribute, t as SYNTHETIC_SPAN } from "./infer-psl-contract-CwtwKri_-Ccao-UmG.mjs";
|
|
22
22
|
import { dataTypeParams, requiredParamKeys, validateCodecTypeParams } from "@prisma/orm-framework/components/codec";
|
|
23
23
|
import { blindCast } from "@prisma/orm-framework/utils/casts";
|
|
24
24
|
import { InternalError } from "@prisma/orm-framework/utils/internal-error";
|
|
@@ -30,14 +30,14 @@ import { APP_SPACE_ID, failedPrecheckWhy, schemaCheckWhy, withFailingSpace } fro
|
|
|
30
30
|
import { assertDefined, invariant } from "@prisma/orm-framework/utils/assertions";
|
|
31
31
|
import { composeCheckWirePrefix, computeCheckContentHash, computeIndexContentHash, formatWireName, parseNaming } from "@prisma/orm-family-sql/schema-ir/naming";
|
|
32
32
|
import { ifDefined } from "@prisma/orm-framework/utils/defined";
|
|
33
|
-
import {
|
|
34
|
-
import { authoringTypeConstructorArguments, findAuthoringTypeConstructorCall } from "@prisma/orm-framework/components/authoring";
|
|
33
|
+
import { authoringTypeConstructorArguments, findAuthoringTypeConstructorCall, getAuthoringTypeConstructor } from "@prisma/orm-framework/components/authoring";
|
|
35
34
|
import { NAME_THE_PSL_SOURCE_LOSES, isPslIdentifier } from "@prisma/orm-framework/psl-parser";
|
|
36
35
|
import { printSqlExpressionLiteral, sqlTextsReadBack } from "@prisma/orm-family-sql/contract/sql-expression";
|
|
36
|
+
import { convertedColumnOf, requiredColumnOf, requiredColumnsOfMigration, rowsWithoutValueFailure, runnerFailure, runnerSuccess, unconvertedFieldOf } from "@prisma/orm-family-sql/family/control";
|
|
37
37
|
import { notOk, ok, okVoid } from "@prisma/orm-framework/utils/result";
|
|
38
38
|
import { SqlSchemaVerifierBase } from "@prisma/orm-family-sql/family/ir";
|
|
39
39
|
import { effectiveControlPolicy } from "@prisma/orm-framework/contract/types";
|
|
40
|
-
import { generatorCallsFor, inferredTypeConstructors, mapDefault,
|
|
40
|
+
import { generatorCallsFor, inferredTypeConstructors, mapDefault, writeDefaultLiteral, writtenTypeArguments } from "@prisma/orm-family-sql/family/psl-build";
|
|
41
41
|
import { UNBOUND_PSL_NAMESPACE_NAME, UNSPECIFIED_PSL_NAMESPACE_ID, makePslNamespace, makePslNamespaceEntries } from "@prisma/orm-framework/components/psl-ast";
|
|
42
42
|
import { Temporal } from "temporal-polyfill/full/implementation";
|
|
43
43
|
import { SqlQueryError } from "@prisma/orm-family-sql/errors";
|
|
@@ -597,13 +597,13 @@ function refuseColumnWithoutPslType(column, coordinate) {
|
|
|
597
597
|
});
|
|
598
598
|
}
|
|
599
599
|
/**
|
|
600
|
-
* Refuses a
|
|
601
|
-
* argument between its quotes as written, with no escapes.
|
|
600
|
+
* Refuses a type constructor call whose arguments no PSL literal writes: an argument that is not a value of a data type, or a value no literal of its data type reads back as.
|
|
602
601
|
*/
|
|
603
|
-
function refuseUnwritableTypeArgument(
|
|
604
|
-
throw unsupported(`column ${coordinate}
|
|
602
|
+
function refuseUnwritableTypeArgument(call, coordinate) {
|
|
603
|
+
throw unsupported(`column ${coordinate} is written ${`${call.path.join(".")}(${call.args.map((arg) => JSON.stringify(arg)).join(", ")})`}, and an argument has no PSL literal that reads back as it.`, "Each argument of a type constructor is written as a literal of its data type, and contract print writes it only when the literal reads back as the same value.", KEEP_SOURCE, {
|
|
605
604
|
coordinate,
|
|
606
|
-
|
|
605
|
+
path: call.path.join("."),
|
|
606
|
+
arguments: call.args
|
|
607
607
|
});
|
|
608
608
|
}
|
|
609
609
|
function refuseDefaultOutsideEnum(input) {
|
|
@@ -1231,9 +1231,10 @@ function baseTypeName(column, dataTypeLookup, coordinate) {
|
|
|
1231
1231
|
if (dataType === void 0 || !isSqlDataType(dataType)) return refuseColumnWithoutPslType(column, coordinate);
|
|
1232
1232
|
return unquotedSqlBaseName(dataType, dataTypeParams(dataType, column.typeParams));
|
|
1233
1233
|
}
|
|
1234
|
-
/**
|
|
1235
|
-
function
|
|
1236
|
-
|
|
1234
|
+
/** The arguments of `call` as PSL writes them, each a literal of its data type that reads back as the argument. */
|
|
1235
|
+
function typeArgumentTexts(call, authoringTypes, dataTypes, coordinate) {
|
|
1236
|
+
const descriptor = getAuthoringTypeConstructor({ type: authoringTypes }, call.path);
|
|
1237
|
+
return (descriptor && writtenTypeArguments(descriptor, call.args, dataTypes)) ?? refuseUnwritableTypeArgument(call, coordinate);
|
|
1237
1238
|
}
|
|
1238
1239
|
function typeCall(path, args) {
|
|
1239
1240
|
const name = path.join(".");
|
|
@@ -1276,7 +1277,7 @@ function inferredConstructorCall(column, inferredConstructors) {
|
|
|
1276
1277
|
*/
|
|
1277
1278
|
function buildColumnType(input) {
|
|
1278
1279
|
const { column, inferredConstructors, authoringTypes, enumBlockNames, coordinate } = input;
|
|
1279
|
-
const baseName = baseTypeName(column, input.
|
|
1280
|
+
const baseName = baseTypeName(column, input.dataTypes.lookup, coordinate);
|
|
1280
1281
|
const enumBlockName = column.valueSet?.entityName ?? enumBlockNames.get(baseName);
|
|
1281
1282
|
if (column.codecId === "pg/enum@1" && enumBlockName !== void 0) return {
|
|
1282
1283
|
kind: "enum",
|
|
@@ -1294,7 +1295,7 @@ function buildColumnType(input) {
|
|
|
1294
1295
|
typeName: domainEnumName
|
|
1295
1296
|
};
|
|
1296
1297
|
const call = inferredConstructorCall(column, inferredConstructors) ?? findAuthoringTypeConstructorCall(authoringTypes, column);
|
|
1297
|
-
if (call !== void 0) return typeCall(call.path, call
|
|
1298
|
+
if (call !== void 0) return typeCall(call.path, typeArgumentTexts(call, authoringTypes, input.dataTypes, coordinate));
|
|
1298
1299
|
refuseColumnWithoutPslType(column, coordinate);
|
|
1299
1300
|
}
|
|
1300
1301
|
/**
|
|
@@ -1347,7 +1348,7 @@ function buildMemberType(input) {
|
|
|
1347
1348
|
}),
|
|
1348
1349
|
inferredConstructors: input.inferredConstructors,
|
|
1349
1350
|
authoringTypes: input.context.authoringContributions.type,
|
|
1350
|
-
|
|
1351
|
+
dataTypes: input.context.dataTypes,
|
|
1351
1352
|
enumBlockNames: input.enumBlockNames,
|
|
1352
1353
|
coordinate
|
|
1353
1354
|
});
|
|
@@ -1402,7 +1403,7 @@ function buildTypesBlock(contract, inferredConstructors, context) {
|
|
|
1402
1403
|
}),
|
|
1403
1404
|
inferredConstructors,
|
|
1404
1405
|
authoringTypes: context.authoringContributions.type,
|
|
1405
|
-
|
|
1406
|
+
dataTypes: context.dataTypes,
|
|
1406
1407
|
enumBlockNames: /* @__PURE__ */ new Map(),
|
|
1407
1408
|
coordinate: `types.${name}`
|
|
1408
1409
|
});
|
|
@@ -2205,7 +2206,7 @@ function buildScalarFields(input) {
|
|
|
2205
2206
|
column,
|
|
2206
2207
|
inferredConstructors,
|
|
2207
2208
|
authoringTypes: context.authoringContributions.type,
|
|
2208
|
-
|
|
2209
|
+
dataTypes: context.dataTypes,
|
|
2209
2210
|
enumBlockNames: enums.blockNamesByTypeName,
|
|
2210
2211
|
coordinate,
|
|
2211
2212
|
namespaceId: entry.namespaceId
|