@prisma/orm-target-postgres 8.0.0-rc.21-dev.17 → 8.0.0-rc.21-dev.19
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-DJoHcCZV-CWdrs4yI.mjs → adapter-DJoHcCZV-B6ixkVJl.mjs} +3 -3
- package/dist/{adapter-DJoHcCZV-CWdrs4yI.mjs.map → adapter-DJoHcCZV-B6ixkVJl.mjs.map} +1 -1
- package/dist/{adapter-B52C9G6y.d.mts → adapter-Dz86ldS1.d.mts} +12 -12
- package/dist/{adapter-B52C9G6y.d.mts.map → adapter-Dz86ldS1.d.mts.map} +1 -1
- package/dist/adapter.d.mts +1 -1
- package/dist/adapter.mjs +3 -3
- package/dist/adapter__adapter.d.mts +1 -1
- package/dist/adapter__adapter.mjs +2 -2
- package/dist/adapter__control.mjs +3 -3
- package/dist/adapter__runtime.mjs +4 -3
- package/dist/adapter__runtime.mjs.map +1 -1
- package/dist/{aggregates-CCEULCRK.d.mts → aggregates-CJGvlOCM.d.mts} +12 -12
- package/dist/{aggregates-CCEULCRK.d.mts.map → aggregates-CJGvlOCM.d.mts.map} +1 -1
- package/dist/{codec-registry-D-bD-lFp-BCSmwfrE.mjs → codec-registry-CdaRA3IV-xihQy4jg.mjs} +4 -12
- package/dist/codec-registry-CdaRA3IV-xihQy4jg.mjs.map +1 -0
- package/dist/{contract-contributions-DS1YZqxl-CipEzWQj.mjs → contract-contributions-DS1YZqxl-B1ZaAkPj.mjs} +2 -2
- package/dist/{contract-contributions-DS1YZqxl-CipEzWQj.mjs.map → contract-contributions-DS1YZqxl-B1ZaAkPj.mjs.map} +1 -1
- package/dist/{descriptor-meta-5gncreHF-BD1kpxJu.mjs → descriptor-meta-5gncreHF-Ddhsf2ah.mjs} +3 -3
- package/dist/{descriptor-meta-5gncreHF-BD1kpxJu.mjs.map → descriptor-meta-5gncreHF-Ddhsf2ah.mjs.map} +1 -1
- package/dist/{descriptor-meta-CszCf4Hs-DVGeuxNv.mjs → descriptor-meta-CM8JcgF6-9xeMMIU7.mjs} +101 -5
- package/dist/descriptor-meta-CM8JcgF6-9xeMMIU7.mjs.map +1 -0
- package/dist/{infer-psl-contract-BP2DgxTx-BqV8gUu4.mjs → infer-psl-contract-BMId3JOv-C60JxHhw.mjs} +4 -4
- package/dist/{infer-psl-contract-BP2DgxTx-BqV8gUu4.mjs.map → infer-psl-contract-BMId3JOv-C60JxHhw.mjs.map} +1 -1
- package/dist/migration-Be_iuIpn.mjs.map +1 -1
- package/dist/{pack-DhZHVCZj.d.mts → pack-ClOo5FU_.d.mts} +2 -1
- package/dist/{pack-DhZHVCZj.d.mts.map → pack-ClOo5FU_.d.mts.map} +1 -1
- package/dist/{planner-D1mzh6Cb-B1Z2YTiQ.mjs → planner-CDm2HgFf-B_21J0On.mjs} +4 -4
- package/dist/{planner-D1mzh6Cb-B1Z2YTiQ.mjs.map → planner-CDm2HgFf-B_21J0On.mjs.map} +1 -1
- package/dist/{planner-produced-postgres-migration-Cw8gbwED-tyj9TLlB.mjs → planner-produced-postgres-migration-CY_oA2Cg-BPAYFkog.mjs} +3 -3
- package/dist/{planner-produced-postgres-migration-Cw8gbwED-tyj9TLlB.mjs.map → planner-produced-postgres-migration-CY_oA2Cg-BPAYFkog.mjs.map} +1 -1
- package/dist/{postgres-contract-view-iwNgaXQw-QzVSakJT.mjs → postgres-contract-view-CjaULiD8-u4IOYsAL.mjs} +3 -3
- package/dist/{postgres-contract-view-iwNgaXQw-QzVSakJT.mjs.map → postgres-contract-view-CjaULiD8-u4IOYsAL.mjs.map} +1 -1
- package/dist/{postgres-migration-BhijSOgq-CP_oflub.mjs → postgres-migration-Dpq0EQUr-Ck9zs-fY.mjs} +3 -3
- package/dist/{postgres-migration-BhijSOgq-CP_oflub.mjs.map → postgres-migration-Dpq0EQUr-Ck9zs-fY.mjs.map} +1 -1
- package/dist/{prisma7-binding-C99OHIsY.d.mts → prisma7-binding-Bb8yzr_1.d.mts} +16 -3
- package/dist/{prisma7-binding-C99OHIsY.d.mts.map → prisma7-binding-Bb8yzr_1.d.mts.map} +1 -1
- package/dist/{prisma7-binding-DWW3L3C4.mjs → prisma7-binding-Da3n3xz9.mjs} +9 -87
- package/dist/prisma7-binding-Da3n3xz9.mjs.map +1 -0
- package/dist/registry-DHzMw0It-CWaFrPqq.mjs +15 -0
- package/dist/registry-DHzMw0It-CWaFrPqq.mjs.map +1 -0
- package/dist/target.d.mts +3 -3
- package/dist/target.mjs +7 -6
- package/dist/target__aggregates.d.mts +1 -1
- package/dist/target__codecs.mjs +2 -1
- package/dist/target__control.mjs +6 -6
- package/dist/target__control.mjs.map +1 -1
- package/dist/target__migration.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.mjs +1 -1
- package/dist/target__planner.mjs +1 -1
- package/dist/target__prisma7-binding.d.mts +1 -1
- package/dist/target__prisma7-binding.mjs +1 -1
- package/dist/target__runtime.mjs +1 -1
- package/dist/target__runtime.mjs.map +1 -1
- package/package.json +9 -9
- package/dist/codec-registry-D-bD-lFp-BCSmwfrE.mjs.map +0 -1
- package/dist/descriptor-meta-CszCf4Hs-DVGeuxNv.mjs.map +0 -1
- package/dist/prisma7-binding-DWW3L3C4.mjs.map +0 -1
|
@@ -1,18 +1,13 @@
|
|
|
1
1
|
import { r as inlineLiteral } from "./sql-utils-VXrIh8dJ-DVxo_Ygp.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { a as postgresCodecDescriptorRegistry } from "./codec-registry-D-bD-lFp-BCSmwfrE.mjs";
|
|
2
|
+
import { H as pgTime, J as pgTimetz, K as pgTimestamptz, M as pgJsonb, W as pgTimestamp, it as postgresYearText, j as pgJson, m as pgBytea, tt as postgresDataTypes, y as pgDate } from "./data-types-DHpMs3mz-BllVpLs5.mjs";
|
|
4
3
|
import { v as postgresCreateNamespace } from "./postgres-schema-BBWgs4fX-DWdYxNi8.mjs";
|
|
5
|
-
import { c as postgresScalarAndNativeTypeConstructors } from "./authoring-BFb5LVsK-CkHmM-aP.mjs";
|
|
6
4
|
import { t as postgresDataTypeEntries } from "./data-type-entries-Df5SOplt-DHEaXqF0.mjs";
|
|
7
|
-
import { t as postgresTargetDescriptorMeta } from "./descriptor-meta-
|
|
5
|
+
import { n as prisma7PostgresTypeMap, t as postgresTargetDescriptorMeta } from "./descriptor-meta-CM8JcgF6-9xeMMIU7.mjs";
|
|
8
6
|
import { n as defaultPrimaryKeyName, t as defaultForeignKeyName } from "./default-constraint-names-Cz9Yoeim-sUzOGvIm.mjs";
|
|
9
|
-
import { d as createPostgresDefaultMapping, h as noInferredDefaults, m as noColumnDefaults, u as buildPslDocumentAst } from "./infer-psl-contract-
|
|
10
|
-
import { createDataTypeLookup } from "@prisma/orm-framework/components/codec";
|
|
7
|
+
import { d as createPostgresDefaultMapping, h as noInferredDefaults, m as noColumnDefaults, u as buildPslDocumentAst } from "./infer-psl-contract-BMId3JOv-C60JxHhw.mjs";
|
|
11
8
|
import { InternalError } from "@prisma/orm-framework/utils/internal-error";
|
|
12
9
|
import { isSqlDataType, renderSqlTypeName } from "@prisma/orm-family-sql/contract/data-type";
|
|
13
|
-
import { authoringTypeConstructorArguments } from "@prisma/orm-framework/components/authoring";
|
|
14
10
|
import { SqlSchemaIR, SqlTableIR } from "@prisma/orm-family-sql/schema-ir/types";
|
|
15
|
-
import { inferredTypeConstructors } from "@prisma/orm-family-sql/family/psl-build";
|
|
16
11
|
import { toModelName } from "@prisma/orm-family-sql/family/psl-infer";
|
|
17
12
|
import { flatPslModels } from "@prisma/orm-framework/components/psl-ast";
|
|
18
13
|
//#region ../../../3-targets/postgres/1-target/dist/prisma7-binding.mjs
|
|
@@ -83,84 +78,6 @@ function printedWall(microseconds, precision) {
|
|
|
83
78
|
const two = (n) => String(n).padStart(2, "0");
|
|
84
79
|
return `${`${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)}`}`;
|
|
85
80
|
}
|
|
86
|
-
const of = (type, params = {}) => ({
|
|
87
|
-
dataType: type.id,
|
|
88
|
-
params
|
|
89
|
-
});
|
|
90
|
-
/**
|
|
91
|
-
* 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`, and `@db.Bit` the `bit(1)` it stores for `BIT`.
|
|
92
|
-
*/
|
|
93
|
-
const prisma7PostgresTypes = {
|
|
94
|
-
scalars: {
|
|
95
|
-
String: of(pgText),
|
|
96
|
-
Boolean: of(pgBool),
|
|
97
|
-
Int: of(pgInt4),
|
|
98
|
-
BigInt: of(pgInt8),
|
|
99
|
-
Float: of(pgFloat8),
|
|
100
|
-
Decimal: of(pgNumeric, {
|
|
101
|
-
precision: 65,
|
|
102
|
-
scale: 30
|
|
103
|
-
}),
|
|
104
|
-
DateTime: of(pgTimestamp, { precision: 3 }),
|
|
105
|
-
Json: of(pgJsonb),
|
|
106
|
-
Bytes: of(pgBytea)
|
|
107
|
-
},
|
|
108
|
-
nativeTypes: {
|
|
109
|
-
Text: of(pgText),
|
|
110
|
-
VarChar: of(pgVarchar),
|
|
111
|
-
Char: of(pgChar, { length: 1 }),
|
|
112
|
-
Uuid: of(pgUuid),
|
|
113
|
-
Inet: of(pgInet),
|
|
114
|
-
Boolean: of(pgBool),
|
|
115
|
-
Integer: of(pgInt4),
|
|
116
|
-
SmallInt: of(pgInt2),
|
|
117
|
-
BigInt: of(pgInt8),
|
|
118
|
-
Real: of(pgFloat4),
|
|
119
|
-
DoublePrecision: of(pgFloat8),
|
|
120
|
-
Decimal: of(pgNumeric),
|
|
121
|
-
Timestamp: of(pgTimestamp),
|
|
122
|
-
Timestamptz: of(pgTimestamptz),
|
|
123
|
-
Date: of(pgDate),
|
|
124
|
-
Time: of(pgTime),
|
|
125
|
-
Timetz: of(pgTimetz),
|
|
126
|
-
Json: of(pgJson),
|
|
127
|
-
JsonB: of(pgJsonb),
|
|
128
|
-
ByteA: of(pgBytea),
|
|
129
|
-
Bit: of(pgBit, { length: 1 }),
|
|
130
|
-
VarBit: of(pgVarbit),
|
|
131
|
-
Xml: of(pgXml),
|
|
132
|
-
Oid: of(pgOid),
|
|
133
|
-
Money: of(pgMoney)
|
|
134
|
-
}
|
|
135
|
-
};
|
|
136
|
-
const marked = inferredTypeConstructors({
|
|
137
|
-
authoringTypes: postgresScalarAndNativeTypeConstructors,
|
|
138
|
-
codecLookup: postgresCodecDescriptorRegistry,
|
|
139
|
-
dataTypeLookup: createDataTypeLookup(postgresDataTypes)
|
|
140
|
-
});
|
|
141
|
-
/**
|
|
142
|
-
* 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.
|
|
143
|
-
*/
|
|
144
|
-
function mappingOf({ dataType, params }) {
|
|
145
|
-
const markedConstructor = marked.get(dataType);
|
|
146
|
-
const args = markedConstructor === void 0 ? void 0 : authoringTypeConstructorArguments(markedConstructor.descriptor, {
|
|
147
|
-
codecId: markedConstructor.descriptor.output.codecId,
|
|
148
|
-
typeParams: params
|
|
149
|
-
});
|
|
150
|
-
if (markedConstructor === void 0 || args === void 0) throw new InternalError(`No constructor marked inferred writes ${dataType} with these parameters.`);
|
|
151
|
-
return {
|
|
152
|
-
constructorName: markedConstructor.path.join("."),
|
|
153
|
-
args
|
|
154
|
-
};
|
|
155
|
-
}
|
|
156
|
-
function mappingsOf(types) {
|
|
157
|
-
return Object.fromEntries(Object.entries(types).map(([name, type]) => [name, mappingOf(type)]));
|
|
158
|
-
}
|
|
159
|
-
/** {@link prisma7PostgresTypes} as the Prisma 7 reader takes it: each type's constructor call. */
|
|
160
|
-
const prisma7PostgresTypeMap = {
|
|
161
|
-
scalars: mappingsOf(prisma7PostgresTypes.scalars),
|
|
162
|
-
nativeTypes: mappingsOf(prisma7PostgresTypes.nativeTypes)
|
|
163
|
-
};
|
|
164
81
|
const EMPTY_FOREIGN_KEY_EXTRAS = {
|
|
165
82
|
extraRelationsByTable: /* @__PURE__ */ new Map(),
|
|
166
83
|
crossSpaceFieldNamesByTable: /* @__PURE__ */ new Map(),
|
|
@@ -301,6 +218,11 @@ const prisma7PostgresBinding = {
|
|
|
301
218
|
id: "paradedb",
|
|
302
219
|
importName: "paradedb",
|
|
303
220
|
importPath: "@prisma/orm-extension-paradedb/control"
|
|
221
|
+
},
|
|
222
|
+
citext: {
|
|
223
|
+
id: "citext",
|
|
224
|
+
importName: "citext",
|
|
225
|
+
importPath: "@prisma/orm-postgres-contrib/citext/control"
|
|
304
226
|
}
|
|
305
227
|
}
|
|
306
228
|
},
|
|
@@ -348,4 +270,4 @@ const prisma7PostgresBinding = {
|
|
|
348
270
|
//#endregion
|
|
349
271
|
export { prisma7PostgresBinding as t };
|
|
350
272
|
|
|
351
|
-
//# sourceMappingURL=prisma7-binding-
|
|
273
|
+
//# sourceMappingURL=prisma7-binding-Da3n3xz9.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prisma7-binding-Da3n3xz9.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-DHpMs3mz.mjs\";\nimport { r as inlineLiteral } from \"./sql-utils-VXrIh8dJ.mjs\";\nimport { t as postgresDataTypeEntries } from \"./data-type-entries-Df5SOplt.mjs\";\nimport { i as postgresCreateNamespace } from \"./postgres-schema-BBWgs4fX.mjs\";\nimport { n as prisma7PostgresTypeMap, t as postgresTargetDescriptorMeta } from \"./descriptor-meta-CM8JcgF6.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-BMId3JOv.mjs\";\nimport { isSqlDataType, renderSqlTypeName } from \"@internal/sql-contract/data-type\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { SqlSchemaIR, SqlTableIR } from \"@internal/sql-schema-ir/types\";\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/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: [\"Int\"],\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,OAAO;EACvB,KAAK,OAAO,IAAI,OAAO;EACvB,KAAK,SAAS,IAAI,OAAO,GAAG,QAAQ;EACpC,KAAK,YAAY,IAAI,OAAO,GAAG,KAAK,GAAG;EACvC,KAAK,cAAc,IAAI,OAAO,GAAG,KAAK,GAAG,QAAQ;EACjD,SAAS;CACV;AACD;AACA,MAAM,0BAA0B;AAChC,MAAM,oBAAoB,KAAK,IAAI,KAAK,GAAG,CAAC;;;;AAI5C,SAAS,sBAAsB,MAAM,UAAU,WAAW;CACzD,MAAM,QAAQ,SAAS,KAAK,IAAI;CAChC,IAAI,UAAU,QAAQ,aAAa,OAAO,IAAI,OAAO,KAAK;CAC1D,MAAM,GAAG,OAAO,IAAI,QAAQ,IAAI,OAAO,MAAM;CAC7C,MAAM,CAAC,MAAM,IAAI,WAAW,MAAM,MAAM,MAAM,GAAG;CACjD,IAAI,SAAS,UAAU,WAAW,OAAO,KAAK;CAC9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ACP,IAAI;IACJ,YAAY;IACZ,YAAY;GACb;GACA,SAAS;IACR,IAAI;IACJ,YAAY;IACZ,YAAY;GACb;GACA,WAAW;IACV,IAAI;IACJ,YAAY;IACZ,YAAY;GACb;GACA,QAAQ;IACP,IAAI;IACJ,YAAY;IACZ,YAAY;GACb;EACD;CACD;CACA,YAAY;EACX,OAAO;EACP,MAAM;EACN,KAAK;EACL,MAAM;EACN,QAAQ;EACR,MAAM;CACP;;CAEA,oBAAoB;CACpB,wBAAwB;EACvB,YAAY;EACZ,YAAY;CACb;CACA;CACA;CACA,qBAAqB,EAAE,UAAU,iBAAiB;EACjD,IAAI,aAAa,OAAO,MAAM,aAAa,QAAQ,IAAI,OAAO,EAAE,MAAM,OAAO;EAC7E,MAAM,MAAM,MAAM,QAAQ;EAC1B,IAAI,QAAQ,KAAK,GAAG,OAAO,KAAK;EAChC,IAAI,aAAa,QAAQ,IAAI,OAAO;GACnC,MAAM;GACN;GACA,MAAM;EACP;EACA,IAAI,CAAC,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"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { n as buildPostgresCodecDescriptorRegistry } from "./codec-descriptor-DBeD0UlS-BfvrE-KZ.mjs";
|
|
2
|
+
import { s as codecDescriptors } from "./codecs-BtalD4yQ-BVQxal3w.mjs";
|
|
3
|
+
import { buildCodecDescriptorRegistry } from "@prisma/orm-family-sql/relational-core/codec-descriptor-registry";
|
|
4
|
+
//#region ../../../3-targets/postgres/1-target/dist/registry-DHzMw0It.mjs
|
|
5
|
+
/**
|
|
6
|
+
* Registry of every codec descriptor shipped by `@internal/target-postgres`.
|
|
7
|
+
*
|
|
8
|
+
* Public consumer surface for the postgres codec set: the postgres adapter and any other consumer that needs to enumerate or look up a postgres codec by id consumes this rather than the raw descriptor array. See ADR 208.
|
|
9
|
+
*/
|
|
10
|
+
const postgresCodecRegistry = buildCodecDescriptorRegistry(codecDescriptors);
|
|
11
|
+
const postgresCodecDescriptorRegistry = buildPostgresCodecDescriptorRegistry(codecDescriptors);
|
|
12
|
+
//#endregion
|
|
13
|
+
export { postgresCodecRegistry as n, postgresCodecDescriptorRegistry as t };
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=registry-DHzMw0It-CWaFrPqq.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry-DHzMw0It-CWaFrPqq.mjs","names":[],"sources":["../../../../3-targets/postgres/1-target/dist/registry-DHzMw0It.mjs"],"sourcesContent":["import { n as buildPostgresCodecDescriptorRegistry } from \"./codec-descriptor-DBeD0UlS.mjs\";\nimport { t as codecDescriptors } from \"./codecs-BtalD4yQ.mjs\";\nimport { buildCodecDescriptorRegistry } from \"@internal/sql-relational-core/codec-descriptor-registry\";\n//#region src/core/registry.ts\n/**\n* Registry of every codec descriptor shipped by `@internal/target-postgres`.\n*\n* Public consumer surface for the postgres codec set: the postgres adapter and any other consumer that needs to enumerate or look up a postgres codec by id consumes this rather than the raw descriptor array. See ADR 208.\n*/\nconst postgresCodecRegistry = buildCodecDescriptorRegistry(codecDescriptors);\nconst postgresCodecDescriptorRegistry = buildPostgresCodecDescriptorRegistry(codecDescriptors);\n//#endregion\nexport { postgresCodecRegistry as n, postgresCodecDescriptorRegistry as t };\n\n//# sourceMappingURL=registry-DHzMw0It.mjs.map"],"mappings":";;;;;;;;;AASA,MAAM,wBAAwB,6BAA6B,gBAAgB;AAC3E,MAAM,kCAAkC,qCAAqC,gBAAgB"}
|
package/dist/target.d.mts
CHANGED
|
@@ -18,7 +18,7 @@ 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-
|
|
21
|
+
import { t as postgresAggregateDescriptors } from "./aggregates-CJGvlOCM.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";
|
|
@@ -45,7 +45,7 @@ import { a as fn, c as placeholder, d as sql, f as unique, i as createExtension,
|
|
|
45
45
|
import { n as IntrospectedTypeText, r as introspectedTypeText, t as CatalogColumnType } from "./native-type-normalizer-BaGa9eeb.mjs";
|
|
46
46
|
import "./op-factory-call-D2HXLJQJ.mjs";
|
|
47
47
|
import "./operation-types-DExfW5kG.mjs";
|
|
48
|
-
import "./pack-
|
|
48
|
+
import "./pack-ClOo5FU_.mjs";
|
|
49
49
|
import { t as TypeScriptRenderablePostgresMigration } from "./planner-produced-postgres-migration-Cx9bERx3-DRNnR16E.mjs";
|
|
50
50
|
import { n as createPostgresMigrationPlanner, t as contractToPostgresDatabaseSchemaNode } from "./planner-Bl3kIyMG.mjs";
|
|
51
51
|
import { t as buildColumnTypeSql } from "./planner-ddl-builders-CPM3y7cQ.mjs";
|
|
@@ -53,7 +53,7 @@ import { n as resolveIdentityValue, t as buildBuiltinIdentityValue } from "./pla
|
|
|
53
53
|
import "./planner-produced-postgres-migration-DRPVY4iL.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-
|
|
56
|
+
import { t as prisma7PostgresBinding } from "./prisma7-binding-Bb8yzr_1.mjs";
|
|
57
57
|
import { t as renderOps } from "./render-ops-Bl84i7ut.mjs";
|
|
58
58
|
import { t as renderCallsToTypeScript } from "./render-typescript-BysdXYpH.mjs";
|
|
59
59
|
import { n as PostgresListDecoder, r as PostgresRuntimeTargetInstance, t as PostgresContractSerializer } from "./runtime-BJetnmVm.mjs";
|
package/dist/target.mjs
CHANGED
|
@@ -6,7 +6,8 @@ import { a as quoteIdentifier, i as qualifyName, n as escapeLiteral, o as quoteQ
|
|
|
6
6
|
import { $ as pgVarchar, B as pgText, C as pgFloat4, D as pgInt4, E as pgInt2, F as pgMoneyStoredText, G as pgTimestampStoredText, H as pgTime, I as pgNumeric, J as pgTimetz, K as pgTimestamptz, L as pgNumericParams, M as pgJsonb, N as pgJsonbEnumRefusal, O as pgInt8, P as pgMoney, Q as pgVarbit, R as pgOid, S as pgEnumParams, T as pgInet, U as pgTimeStoredText, V as pgTextArray, W as pgTimestamp, X as pgTsquery, Y as pgTimetzStoredText, Z as pgUuid, _ as pgChar, at as qualifiedEnumName, b as pgDateStoredText, d as pgBit, et as pgXml, f as pgBitLengthParams, i as createPostgresBuiltinDataTypeLookup, j as pgJson, k as pgInterval, m as pgBytea, p as pgBool, q as pgTimestamptzStoredText, rt as postgresTextDataTypes, s as isPgOid, tt as postgresDataTypes, u as moneyTextOfCents, v as pgCharacterLengthParams, w as pgFloat8, x as pgEnum, y as pgDate, z as pgPrecisionParams } from "./data-types-DHpMs3mz-BllVpLs5.mjs";
|
|
7
7
|
import { t as PostgresNativeEnum } from "./postgres-native-enum-CdP3b_-R-DgG3pi5p.mjs";
|
|
8
8
|
import { A as pgNumericColumn, B as pgVarbitColumn, C as pgIntColumn, D as pgJsonColumn, E as pgIntervalStringDescriptor, F as pgTimestamptzDateColumn, H as pgXmlColumn, I as pgTimestamptzDateDescriptor, L as pgTimetzColumn, M as pgTextColumn, N as pgTimestampDateColumn, O as pgJsonbColumn, P as pgTimestampDateDescriptor, R as pgUnboundedIntColumn, S as pgInt8NumberColumn, T as pgIntervalStringColumn, V as pgVarcharColumn, _ as pgFloatColumn, a as PgTimestamptzDateCodec, b as pgInt4Column, c as decodePostgresListText, d as pgBitColumn, f as pgBoolColumn, g as pgFloat8Column, h as pgFloat4Column, i as PgTimestampDateDescriptor, j as pgOidColumn, k as pgMoneyColumn, l as isPgEnumParams, m as pgEnumDescriptor, n as PgIntervalStringDescriptor, o as PgTimestamptzDateDescriptor, p as pgCharColumn, r as PgTimestampDateCodec, t as PgIntervalStringCodec, u as parsePostgresListText, v as pgInetColumn, w as pgIntervalColumn, x as pgInt8Column, y as pgInt2Column, z as pgUuidColumn } from "./codecs-BtalD4yQ-BVQxal3w.mjs";
|
|
9
|
-
import {
|
|
9
|
+
import { n as postgresCodecRegistry, t as postgresCodecDescriptorRegistry } from "./registry-DHzMw0It-CWaFrPqq.mjs";
|
|
10
|
+
import { i as createPostgresCodecRegistryWithBuiltins, n as assemblePostgresCodecRegistryWithBuiltins, r as createPostgresBuiltinCodecLookup, t as assemblePostgresCodecRegistry } from "./codec-registry-CdaRA3IV-xihQy4jg.mjs";
|
|
10
11
|
import { f as weightGroupsOf, l as fullTextIndexProblems, n as FULL_TEXT_INDEX_TYPE, o as describeFullTextIndexProblem, t as DEFAULT_FULL_TEXT_SEARCH_LANGUAGE } from "./full-text-index-definition-MfjtL-x7-ImaTAFMs.mjs";
|
|
11
12
|
import { _ as policyInputFromSerialized, c as PostgresRole, d as PostgresTableSource, f as PostgresUnboundSchema, i as PostgresRlsEnablement, m as isPostgresSchema, o as PostgresRlsPolicy, t as PostgresExtension, u as PostgresSchema, v as postgresCreateNamespace } from "./postgres-schema-BBWgs4fX-DWdYxNi8.mjs";
|
|
12
13
|
import { _ as PostgresDropIndex, a as PostgresAlterIndexRename, b as PostgresDropType, c as PostgresAlterTable, d as PostgresCreatePolicy, f as PostgresCreateSchema, g as PostgresDisableRowLevelSecurity, h as PostgresDdlNode, i as DropDefaultAction, l as PostgresAlterTableSetSchema, m as PostgresCreateType, n as AddConstraintAction, o as PostgresAlterPolicyRename, p as PostgresCreateTable, r as AlterColumnTypeAction, s as PostgresAlterSchemaRename, t as AddColumnAction, u as PostgresCreateIndex, v as PostgresDropPolicy, y as PostgresDropSchema } from "./nodes-G8VTh4PM-DNvIhHag.mjs";
|
|
@@ -29,18 +30,18 @@ import { t as buildColumnTypeSql } from "./planner-ddl-builders-C_7XNgLd-Ddc_tlv
|
|
|
29
30
|
import { n as resolveIdentityValue, t as buildBuiltinIdentityValue } from "./planner-identity-values-CfyHM25P-DYnKZgOb.mjs";
|
|
30
31
|
import { a as planIssues, t as coalesceSubtreeIssues } from "./control-policy-DYDR6FhY-CPBeYqu5.mjs";
|
|
31
32
|
import { n as contractToPostgresDatabaseSchemaNode, t as buildPostgresPlanDiff } from "./diff-database-schema-DyoCp8VS-BKtXp-eB.mjs";
|
|
32
|
-
import { n as PostgresContractView, t as PostgresContractSerializer } from "./postgres-contract-view-
|
|
33
|
+
import { n as PostgresContractView, t as PostgresContractSerializer } from "./postgres-contract-view-CjaULiD8-u4IOYsAL.mjs";
|
|
33
34
|
import { t as dataTransform } from "./data-transform-h9agBu_c-RlC5A7aY.mjs";
|
|
34
|
-
import { t as PostgresMigration } from "./postgres-migration-
|
|
35
|
+
import { t as PostgresMigration } from "./postgres-migration-Dpq0EQUr-Ck9zs-fY.mjs";
|
|
35
36
|
import { t as renderOps } from "./render-ops-5VMQY7FM-Cdil7oOP.mjs";
|
|
36
37
|
import { t as renderCallsToTypeScript } from "./render-typescript-Dqp1Spgn-B4mJhuVr.mjs";
|
|
37
|
-
import { t as TypeScriptRenderablePostgresMigration } from "./planner-produced-postgres-migration-
|
|
38
|
-
import { t as createPostgresMigrationPlanner } from "./planner-
|
|
38
|
+
import { t as TypeScriptRenderablePostgresMigration } from "./planner-produced-postgres-migration-CY_oA2Cg-BPAYFkog.mjs";
|
|
39
|
+
import { t as createPostgresMigrationPlanner } from "./planner-CDm2HgFf-B_21J0On.mjs";
|
|
39
40
|
import { n as MARKER_LOCK_SQL, t as MARKER_LOCK_KEY } from "./marker-lock-DFc1Tfv5-BkBKBRE3.mjs";
|
|
40
41
|
import { c as toTsquery, l as websearchToTsquery, n as fullTextDocument, o as phrasetoTsquery, s as plaintoTsquery, t as FullTextDocument } from "./full-text-parsers-DIfNR9AQ-tVmTju-Y.mjs";
|
|
41
42
|
import { t as tsquery } from "./full-text-B9mXDcsJ.mjs";
|
|
42
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";
|
|
43
44
|
import { t as introspectedTypeText } from "./native-type-normalizer-CY4mkU_2.mjs";
|
|
44
45
|
import { i as hasUniqueConstraint, n as hasForeignKey, r as hasIndex, t as buildSchemaLookupMap } from "./planner-schema-lookup-BbUY9oVy.mjs";
|
|
45
|
-
import { t as prisma7PostgresBinding } from "./prisma7-binding-
|
|
46
|
+
import { t as prisma7PostgresBinding } from "./prisma7-binding-Da3n3xz9.mjs";
|
|
46
47
|
export { AddCheckConstraintCall, AddColumnAction, AddColumnCall, AddColumnWithTemporaryDefaultCall, AddConstraintAction, AddForeignKeyCall, AddNativeEnumValueCall, AddPrimaryKeyCall, AddRequiredColumnToEmptyTableCall, AddUniqueCall, AlterColumnTypeAction, AlterColumnTypeCall, CreateExtensionCall, CreateIndexCall, CreateNativeEnumTypeCall, CreatePostgresRlsPolicyCall, CreateSchemaCall, CreateTableCall, DEFAULT_FULL_TEXT_SEARCH_LANGUAGE, DataTransformCall, DisableRowLevelSecurityCall, DropCheckConstraintCall, DropColumnCall, DropConstraintCall, DropDefaultAction, DropDefaultCall, DropExtensionCall, DropIndexCall, DropNativeEnumTypeCall, DropNotNullCall, DropPostgresRlsPolicyCall, DropSchemaCall, 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_INTERVAL_STRING_CODEC_ID, PG_INT_CODEC_ID, PG_JSONB_CODEC_ID, PG_JSON_CODEC_ID, PG_MONEY_CODEC_ID, PG_NUMERIC_CODEC_ID, PG_OID_CODEC_ID, PG_TEXT_ARRAY_CODEC_ID, PG_TEXT_CODEC_ID, PG_TIMESTAMPTZ_DATE_CODEC_ID, PG_TIMESTAMPTZ_STRING_CODEC_ID, PG_TIMESTAMPTZ_TEMPORAL_CODEC_ID, PG_TIMESTAMP_DATE_CODEC_ID, PG_TIMESTAMP_INSTANT_CODEC_ID, PG_TIMESTAMP_STRING_CODEC_ID, PG_TIMESTAMP_TEMPORAL_CODEC_ID, PG_TIMETZ_CODEC_ID, PG_TIME_STRING_CODEC_ID, PG_TIME_TEMPORAL_CODEC_ID, PG_TSQUERY_CODEC_ID, PG_UNBOUNDED_INT_CODEC_ID, PG_UUID_CODEC_ID, PG_VARBIT_CODEC_ID, PG_VARCHAR_CODEC_ID, PG_XML_CODEC_ID, POLICY_COMMAND_SQL, POLICY_OPERATION_PREDICATES, PgIntervalStringCodec, PgIntervalStringDescriptor, PgTimestampDateCodec, PgTimestampDateDescriptor, PgTimestamptzDateCodec, PgTimestamptzDateDescriptor, PostgresAlterIndexRename, PostgresAlterPolicyRename, PostgresAlterSchemaRename, PostgresAlterTable, PostgresAlterTableSetSchema, PostgresCodecDescriptor, PostgresContractSerializer, PostgresContractView, PostgresCreateIndex, PostgresCreatePolicy, PostgresCreateSchema, PostgresCreateTable, PostgresCreateType, PostgresDatabaseSchemaNode, PostgresDdlNode, PostgresDisableRowLevelSecurity, PostgresDropIndex, PostgresDropPolicy, PostgresDropSchema, PostgresDropType, PostgresExtension, PostgresExtensionSchemaNode, PostgresNamespaceSchemaNode, PostgresNativeEnum, PostgresNativeEnumSchemaNode, PostgresPolicySchemaNode, PostgresRlsEnablement, PostgresRlsPolicy, PostgresRole, PostgresRoleSchemaNode, PostgresSchema, PostgresSchemaNodeKind, PostgresTableSchemaNode, PostgresTableSource, PostgresUnboundSchema, RawSqlCall, RemoveStoredValueCall, RenameColumnCall, RenameConstraintCall, RenameIndexCall, RenamePostgresRlsPolicyCall, RenameSchemaCall, 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, createExtension, 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, postgresNativeAuthoringTypes, postgresNowGeneratorControlDescriptors, postgresNowGenerators, postgresRenderCheckExpressions, postgresResolveDefault, postgresScalarAndNativeTypeConstructors, 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-CJGvlOCM.mjs";
|
|
2
2
|
export { postgresAggregateDescriptors };
|
package/dist/target__codecs.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { A as pgNumericColumn, B as pgVarbitColumn, C as pgIntColumn, D as pgJsonColumn, E as pgIntervalStringDescriptor, F as pgTimestamptzDateColumn, H as pgXmlColumn, I as pgTimestamptzDateDescriptor, L as pgTimetzColumn, M as pgTextColumn, N as pgTimestampDateColumn, O as pgJsonbColumn, P as pgTimestampDateDescriptor, R as pgUnboundedIntColumn, S as pgInt8NumberColumn, T as pgIntervalStringColumn, V as pgVarcharColumn, _ as pgFloatColumn, a as PgTimestamptzDateCodec, b as pgInt4Column, d as pgBitColumn, f as pgBoolColumn, g as pgFloat8Column, h as pgFloat4Column, i as PgTimestampDateDescriptor, j as pgOidColumn, k as pgMoneyColumn, l as isPgEnumParams, m as pgEnumDescriptor, n as PgIntervalStringDescriptor, o as PgTimestamptzDateDescriptor, p as pgCharColumn, r as PgTimestampDateCodec, t as PgIntervalStringCodec, u as parsePostgresListText, v as pgInetColumn, w as pgIntervalColumn, x as pgInt8Column, y as pgInt2Column, z as pgUuidColumn } from "./codecs-BtalD4yQ-BVQxal3w.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { n as postgresCodecRegistry, t as postgresCodecDescriptorRegistry } from "./registry-DHzMw0It-CWaFrPqq.mjs";
|
|
3
|
+
import { i as createPostgresCodecRegistryWithBuiltins, n as assemblePostgresCodecRegistryWithBuiltins, r as createPostgresBuiltinCodecLookup, t as assemblePostgresCodecRegistry } from "./codec-registry-CdaRA3IV-xihQy4jg.mjs";
|
|
3
4
|
export { PgIntervalStringCodec, PgIntervalStringDescriptor, PgTimestampDateCodec, PgTimestampDateDescriptor, PgTimestamptzDateCodec, PgTimestamptzDateDescriptor, assemblePostgresCodecRegistry, assemblePostgresCodecRegistryWithBuiltins, createPostgresBuiltinCodecLookup, createPostgresCodecRegistryWithBuiltins, isPgEnumParams, parsePostgresListText, pgBitColumn, pgBoolColumn, pgCharColumn, pgEnumDescriptor, pgFloat4Column, pgFloat8Column, pgFloatColumn, pgInetColumn, pgInt2Column, pgInt4Column, pgInt8Column, pgInt8NumberColumn, pgIntColumn, pgIntervalColumn, pgIntervalStringColumn, pgIntervalStringDescriptor, pgJsonColumn, pgJsonbColumn, pgMoneyColumn, pgNumericColumn, pgOidColumn, pgTextColumn, pgTimestampDateColumn, pgTimestampDateDescriptor, pgTimestamptzDateColumn, pgTimestamptzDateDescriptor, pgTimetzColumn, pgUnboundedIntColumn, pgUuidColumn, pgVarbitColumn, pgVarcharColumn, pgXmlColumn, postgresCodecDescriptorRegistry, postgresCodecRegistry };
|
package/dist/target__control.mjs
CHANGED
|
@@ -10,17 +10,17 @@ import { r as computeContentHash } from "./canonicalize-RdxoUHao-FTTkizfe.mjs";
|
|
|
10
10
|
import { c as postgresScalarAndNativeTypeConstructors, l as postgresScalarAuthoringTypes, s as postgresNativeAuthoringTypes, t as POLICY_BLOCK_KEYWORDS } from "./authoring-BFb5LVsK-CkHmM-aP.mjs";
|
|
11
11
|
import { t as postgresRenderCheckExpressions } from "./check-expressions-DL9WtMO5-CUcbN2JG.mjs";
|
|
12
12
|
import { u as postgresNowGeneratorControlDescriptors } from "./date-time-now-generators-CEqbD2GP-B95xid7h.mjs";
|
|
13
|
-
import { t as postgresTargetDescriptorMeta } from "./descriptor-meta-
|
|
13
|
+
import { t as postgresTargetDescriptorMeta } from "./descriptor-meta-CM8JcgF6-9xeMMIU7.mjs";
|
|
14
14
|
import { a as postgresDiffSubjectEntityKind, o as postgresDiffSubjectGranularity } from "./postgres-table-schema-node-nY6II-Uv-Bj-lgmSi.mjs";
|
|
15
15
|
import { t as PostgresDatabaseSchemaNode } from "./postgres-role-schema-node-DuljIQWp-D6Q5JyEs.mjs";
|
|
16
16
|
import { i as qualifyTableName } from "./planner-sql-checks-FU4T7wgu-C-tIJOH-.mjs";
|
|
17
17
|
import { $ as schemaContentsOf, Q as schemaBlockingObjects, et as schemaObjectsSummary, q as dropCheckConstraintId, z as SCHEMA_OBJECTS_SQL } from "./op-factory-call-DyQO1ZdB-CnbOJIf8.mjs";
|
|
18
18
|
import { r as diffPostgresSchema } from "./diff-database-schema-DyoCp8VS-BKtXp-eB.mjs";
|
|
19
|
-
import { t as PostgresContractSerializer } from "./postgres-contract-view-
|
|
20
|
-
import { o as postgresContractToSchema } from "./postgres-migration-
|
|
21
|
-
import { n as keepRowsEdit, t as createPostgresMigrationPlanner } from "./planner-
|
|
19
|
+
import { t as PostgresContractSerializer } from "./postgres-contract-view-CjaULiD8-u4IOYsAL.mjs";
|
|
20
|
+
import { o as postgresContractToSchema } from "./postgres-migration-Dpq0EQUr-Ck9zs-fY.mjs";
|
|
21
|
+
import { n as keepRowsEdit, t as createPostgresMigrationPlanner } from "./planner-CDm2HgFf-B_21J0On.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-
|
|
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-BMId3JOv-C60JxHhw.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";
|
|
@@ -34,11 +34,11 @@ import { CHECK_KINDS, composeCheckWirePrefix, computeCheckContentHash, computeIn
|
|
|
34
34
|
import { authoringTypeConstructorArguments, findAuthoringTypeConstructorCall, getAuthoringTypeConstructor, writeTypedLiteral, writtenTypeArguments } from "@prisma/orm-framework/components/authoring";
|
|
35
35
|
import { NAME_THE_PSL_SOURCE_LOSES, isPslIdentifier } from "@prisma/orm-framework/psl-parser";
|
|
36
36
|
import { printSqlExpressionLiteral, sqlTextsReadBack } from "@prisma/orm-family-sql/contract/sql-expression";
|
|
37
|
+
import { generatorCallsFor, inferredTypeConstructors, mapDefault, writtenTypeChoiceCall } from "@prisma/orm-family-sql/family/psl-build";
|
|
37
38
|
import { convertedColumnOf, requiredColumnOf, requiredColumnsOfMigration, rowsHoldingValueOf, rowsHoldingValueSummary, rowsWithoutValueFailure, runnerFailure, runnerSuccess, unconvertedFieldOf } from "@prisma/orm-family-sql/family/control";
|
|
38
39
|
import { notOk, ok, okVoid } from "@prisma/orm-framework/utils/result";
|
|
39
40
|
import { SqlSchemaVerifierBase } from "@prisma/orm-family-sql/family/ir";
|
|
40
41
|
import { effectiveControlPolicy } from "@prisma/orm-framework/contract/types";
|
|
41
|
-
import { generatorCallsFor, inferredTypeConstructors, mapDefault, writtenTypeChoiceCall } from "@prisma/orm-family-sql/family/psl-build";
|
|
42
42
|
import { UNBOUND_PSL_NAMESPACE_NAME, UNSPECIFIED_PSL_NAMESPACE_ID, makePslNamespace, makePslNamespaceEntries } from "@prisma/orm-framework/components/psl-ast";
|
|
43
43
|
import { escapePslString } from "@prisma/orm-family-sql/contract/data-type-support";
|
|
44
44
|
import { Temporal } from "temporal-polyfill/full/implementation";
|