@prisma/orm-target-postgres 8.0.0-rc.12-dev.19 → 8.0.0-rc.12-dev.20
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-C2dMP6ky-C3sCmY0D.mjs → adapter-C2dMP6ky-DJ4qd297.mjs} +2 -2
- package/dist/{adapter-C2dMP6ky-C3sCmY0D.mjs.map → adapter-C2dMP6ky-DJ4qd297.mjs.map} +1 -1
- package/dist/adapter.mjs +3 -3
- package/dist/adapter__adapter.mjs +1 -1
- package/dist/adapter__control.mjs +2 -2
- package/dist/adapter__runtime.mjs +1 -1
- package/dist/{control-BQwbxkUD.mjs → control-BPA8oU8O.mjs} +5 -5
- package/dist/{control-BQwbxkUD.mjs.map → control-BPA8oU8O.mjs.map} +1 -1
- package/dist/{control-adapter-CEhnRpI1-CVP-0X0J.mjs → control-adapter-CEhnRpI1-D0-PjR_O.mjs} +2 -2
- package/dist/{control-adapter-CEhnRpI1-CVP-0X0J.mjs.map → control-adapter-CEhnRpI1-D0-PjR_O.mjs.map} +1 -1
- package/dist/{default-normalizer-DLdguuFP-B-UOEOol.mjs → default-normalizer-Bp3IhMR9-D0uYVRLZ.mjs} +3 -3
- package/dist/default-normalizer-Bp3IhMR9-D0uYVRLZ.mjs.map +1 -0
- package/dist/{diff-database-schema-H-AyMtNV-BU4P2mUV.mjs → diff-database-schema-BUYy91Fo-d7ABPxW9.mjs} +3 -3
- package/dist/{diff-database-schema-H-AyMtNV-BU4P2mUV.mjs.map → diff-database-schema-BUYy91Fo-d7ABPxW9.mjs.map} +1 -1
- package/dist/{infer-psl-contract-D7DttV46-CrEiFvAI.mjs → infer-psl-contract-Daj0b_Vd-DOd6cTZN.mjs} +3 -3
- package/dist/{infer-psl-contract-D7DttV46-CrEiFvAI.mjs.map → infer-psl-contract-Daj0b_Vd-DOd6cTZN.mjs.map} +1 -1
- package/dist/{planner-PRBI3FKm-DpB61BTz.mjs → planner-CuyOgsjG-DefGza6Z.mjs} +3 -3
- package/dist/{planner-PRBI3FKm-DpB61BTz.mjs.map → planner-CuyOgsjG-DefGza6Z.mjs.map} +1 -1
- package/dist/{prisma7-binding-Bt7c2d_m.mjs → prisma7-binding-CRgYmsCN.mjs} +3 -3
- package/dist/{prisma7-binding-Bt7c2d_m.mjs.map → prisma7-binding-CRgYmsCN.mjs.map} +1 -1
- package/dist/target.mjs +5 -5
- package/dist/target__control.mjs +1 -1
- package/dist/target__default-normalizer.mjs +1 -1
- package/dist/target__diff-database-schema.mjs +1 -1
- package/dist/target__planner.mjs +2 -2
- package/dist/target__prisma7-binding.mjs +1 -1
- package/package.json +9 -9
- package/dist/default-normalizer-DLdguuFP-B-UOEOol.mjs.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as createPostgresCodecRegistryWithBuiltins } from "./codecs-D3WwIWZp.mjs";
|
|
2
2
|
import { n as renderLoweredSql, t as adapterError } from "./sql-renderer-CgUgFbU4-CmbXJTbL.mjs";
|
|
3
|
-
import { t as PostgresControlAdapter } from "./control-adapter-CEhnRpI1-
|
|
3
|
+
import { t as PostgresControlAdapter } from "./control-adapter-CEhnRpI1-D0-PjR_O.mjs";
|
|
4
4
|
import { isDdlNode } from "@prisma/orm-family-sql/relational-core/ast";
|
|
5
5
|
import { APP_SPACE_ID } from "@prisma/orm-framework/components/control";
|
|
6
6
|
//#region ../../../3-targets/6-adapters/postgres/dist/adapter-C2dMP6ky.mjs
|
|
@@ -95,4 +95,4 @@ function createPostgresAdapterWithCodecRegistry(codecRegistry) {
|
|
|
95
95
|
//#endregion
|
|
96
96
|
export { createPostgresAdapterWithCodecRegistry as n, postgresRawCodecInferer as r, createPostgresAdapter as t };
|
|
97
97
|
|
|
98
|
-
//# sourceMappingURL=adapter-C2dMP6ky-
|
|
98
|
+
//# sourceMappingURL=adapter-C2dMP6ky-DJ4qd297.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter-C2dMP6ky-
|
|
1
|
+
{"version":3,"file":"adapter-C2dMP6ky-DJ4qd297.mjs","names":[],"sources":["../../../../3-targets/6-adapters/postgres/dist/adapter-C2dMP6ky.mjs"],"sourcesContent":["import { n as adapterError, t as renderLoweredSql } from \"./sql-renderer-CgUgFbU4.mjs\";\nimport { t as PostgresControlAdapter } from \"./control-adapter-CEhnRpI1.mjs\";\nimport { APP_SPACE_ID } from \"@internal/framework-components/control\";\nimport { isDdlNode } from \"@internal/sql-relational-core/ast\";\nimport { createPostgresCodecRegistryWithBuiltins } from \"@internal/target-postgres/codecs\";\n//#region src/core/adapter.ts\nconst defaultCapabilities = Object.freeze({\n\tpostgres: {\n\t\torderBy: true,\n\t\tlimit: true,\n\t\tlateral: true,\n\t\tjsonAgg: true,\n\t\treturning: true,\n\t\tdistinctOn: true\n\t},\n\tsql: {\n\t\tenums: true,\n\t\treturning: true,\n\t\tdefaultInInsert: true,\n\t\tlateral: true,\n\t\tscalarList: true,\n\t\tcheckConstraint: true,\n\t\tinsertOnConflictSkip: true,\n\t\tinsertOnConflictWithoutTarget: true\n\t}\n});\nvar PostgresAdapterImpl = class {\n\tfamilyId = \"sql\";\n\ttargetId = \"postgres\";\n\tprofile;\n\tcodecRegistry;\n\tconstructor(codecRegistry, profileId) {\n\t\tthis.codecRegistry = codecRegistry;\n\t\tconst controlAdapter = new PostgresControlAdapter(codecRegistry);\n\t\tthis.profile = Object.freeze({\n\t\t\tid: profileId ?? \"postgres/default@1\",\n\t\t\ttarget: \"postgres\",\n\t\t\tcapabilities: defaultCapabilities,\n\t\t\treadMarker: (queryable) => controlAdapter.readMarkerDiscriminated({\n\t\t\t\tfamilyId: \"sql\",\n\t\t\t\ttargetId: \"postgres\",\n\t\t\t\tquery: async (sql, params) => {\n\t\t\t\t\tconst rows = [];\n\t\t\t\t\tfor await (const row of queryable.query({\n\t\t\t\t\t\tsql,\n\t\t\t\t\t\t...params === void 0 ? {} : { params }\n\t\t\t\t\t})) rows.push(row);\n\t\t\t\t\treturn { rows };\n\t\t\t\t},\n\t\t\t\tclose: async () => {}\n\t\t\t}, APP_SPACE_ID)\n\t\t});\n\t}\n\tlower(ast, context) {\n\t\tif (isDdlNode(ast)) throw adapterError(\"RUNTIME.DDL_UNSUPPORTED\", \"lower() does not lower DDL on the runtime adapter — DDL lowering is a control-plane concern handled by the control adapter.\", { meta: { surface: \"runtime-adapter\" } });\n\t\treturn renderLoweredSql(ast, context.contract, this.codecRegistry);\n\t}\n};\nconst INT4_MIN = -2147483648;\nconst INT4_MAX = 2147483647;\n/**\n* The codec a bare JS number is bound through.\n*\n* An integer picks the narrowest column type that holds it: `int4` while it\n* fits the signed 32-bit range, `int8` (number-valued) up to the safe-integer\n* limit. Past that limit a JS number is no longer an exact integer, so it\n* binds as `float8` rather than pretending to a precision it does not have.\n*/\nfunction inferNumberCodecId(value) {\n\tif (!Number.isSafeInteger(value)) return \"pg/float8@1\";\n\treturn value >= INT4_MIN && value <= INT4_MAX ? \"pg/int4@1\" : \"pg/int8number@1\";\n}\n/**\n* Codec-id lookup for bare-literal interpolations used by `fns.raw` on a postgres client. Contributed as the descriptor's static `rawCodecInferer` slot.\n*\n* The ids are versioned because that is how the codec registry keys them: lowering resolves an interpolated value's codec by exact id through `descriptorFor`.\n*/\nconst postgresRawCodecInferer = { inferCodec(value) {\n\tswitch (typeof value) {\n\t\tcase \"number\": return inferNumberCodecId(value);\n\t\tcase \"bigint\": return \"pg/int8@1\";\n\t\tcase \"string\": return \"pg/text@1\";\n\t\tcase \"boolean\": return \"pg/bool@1\";\n\t\tcase \"object\": if (value instanceof Uint8Array) return \"pg/bytea@1\";\n\t}\n\tthrow adapterError(\"RUNTIME.RAW_SQL_UNSUPPORTED_INTERPOLATION\", \"unsupported JS value type for raw-SQL interpolation: wrap this value in `param(...)` with an explicit codec\", { meta: { valueType: typeof value } });\n} };\nfunction createPostgresAdapter(options) {\n\tconst codecRegistry = createPostgresCodecRegistryWithBuiltins(options?.codecDescriptors);\n\treturn Object.freeze(new PostgresAdapterImpl(codecRegistry, options?.profileId));\n}\nfunction createPostgresAdapterWithCodecRegistry(codecRegistry) {\n\treturn Object.freeze(new PostgresAdapterImpl(codecRegistry));\n}\n//#endregion\nexport { createPostgresAdapterWithCodecRegistry as n, postgresRawCodecInferer as r, createPostgresAdapter as t };\n\n//# sourceMappingURL=adapter-C2dMP6ky.mjs.map"],"mappings":";;;;;;AAMA,MAAM,sBAAsB,OAAO,OAAO;CACzC,UAAU;EACT,SAAS;EACT,OAAO;EACP,SAAS;EACT,SAAS;EACT,WAAW;EACX,YAAY;CACb;CACA,KAAK;EACJ,OAAO;EACP,WAAW;EACX,iBAAiB;EACjB,SAAS;EACT,YAAY;EACZ,iBAAiB;EACjB,sBAAsB;EACtB,+BAA+B;CAChC;AACD,CAAC;AACD,IAAI,sBAAsB,MAAM;CAC/B,WAAW;CACX,WAAW;CACX;CACA;CACA,YAAY,eAAe,WAAW;EACrC,KAAK,gBAAgB;EACrB,MAAM,iBAAiB,IAAI,uBAAuB,aAAa;EAC/D,KAAK,UAAU,OAAO,OAAO;GAC5B,IAAI,aAAa;GACjB,QAAQ;GACR,cAAc;GACd,aAAa,cAAc,eAAe,wBAAwB;IACjE,UAAU;IACV,UAAU;IACV,OAAO,OAAO,KAAK,WAAW;KAC7B,MAAM,OAAO,CAAC;KACd,WAAW,MAAM,OAAO,UAAU,MAAM;MACvC;MACA,GAAG,WAAW,KAAK,IAAI,CAAC,IAAI,EAAE,OAAO;KACtC,CAAC,GAAG,KAAK,KAAK,GAAG;KACjB,OAAO,EAAE,KAAK;IACf;IACA,OAAO,YAAY,CAAC;GACrB,GAAG,YAAY;EAChB,CAAC;CACF;CACA,MAAM,KAAK,SAAS;EACnB,IAAI,UAAU,GAAG,GAAG,MAAM,aAAa,2BAA2B,+HAA+H,EAAE,MAAM,EAAE,SAAS,kBAAkB,EAAE,CAAC;EACzO,OAAO,iBAAiB,KAAK,QAAQ,UAAU,KAAK,aAAa;CAClE;AACD;AACA,MAAM,WAAW;AACjB,MAAM,WAAW;;;;;;;;;AASjB,SAAS,mBAAmB,OAAO;CAClC,IAAI,CAAC,OAAO,cAAc,KAAK,GAAG,OAAO;CACzC,OAAO,SAAS,YAAY,SAAS,WAAW,cAAc;AAC/D;;;;;;AAMA,MAAM,0BAA0B,EAAE,WAAW,OAAO;CACnD,QAAQ,OAAO,OAAf;EACC,KAAK,UAAU,OAAO,mBAAmB,KAAK;EAC9C,KAAK,UAAU,OAAO;EACtB,KAAK,UAAU,OAAO;EACtB,KAAK,WAAW,OAAO;EACvB,KAAK,UAAU,IAAI,iBAAiB,YAAY,OAAO;CACxD;CACA,MAAM,aAAa,6CAA6C,+GAA+G,EAAE,MAAM,EAAE,WAAW,OAAO,MAAM,EAAE,CAAC;AACrN,EAAE;AACF,SAAS,sBAAsB,SAAS;CACvC,MAAM,gBAAgB,wCAAwC,SAAS,gBAAgB;CACvF,OAAO,OAAO,OAAO,IAAI,oBAAoB,eAAe,SAAS,SAAS,CAAC;AAChF;AACA,SAAS,uCAAuC,eAAe;CAC9D,OAAO,OAAO,OAAO,IAAI,oBAAoB,aAAa,CAAC;AAC5D"}
|
package/dist/adapter.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { i as createPostgresCodecRegistryWithBuiltins, r as createPostgresBuiltinCodecLookup } from "./codecs-D3WwIWZp.mjs";
|
|
2
2
|
import { n as qualifyName, r as quoteIdentifier, t as escapeLiteral } from "./sql-utils-Bh-mnsSY-D6hnFPrP.mjs";
|
|
3
|
-
import { t as parsePostgresDefault } from "./default-normalizer-
|
|
3
|
+
import { t as parsePostgresDefault } from "./default-normalizer-Bp3IhMR9-D0uYVRLZ.mjs";
|
|
4
4
|
import { t as normalizeSchemaNativeType } from "./native-type-normalizer-yvd3tqv-.mjs";
|
|
5
5
|
import { n as renderLoweredSql } from "./sql-renderer-CgUgFbU4-CmbXJTbL.mjs";
|
|
6
|
-
import { t as PostgresControlAdapter } from "./control-adapter-CEhnRpI1-
|
|
7
|
-
import { r as postgresRawCodecInferer, t as createPostgresAdapter } from "./adapter-C2dMP6ky-
|
|
6
|
+
import { t as PostgresControlAdapter } from "./control-adapter-CEhnRpI1-D0-PjR_O.mjs";
|
|
7
|
+
import { r as postgresRawCodecInferer, t as createPostgresAdapter } from "./adapter-C2dMP6ky-DJ4qd297.mjs";
|
|
8
8
|
import { C as timestamptzTemporalColumn, E as varcharColumn, S as timestamptzStringColumn, T as varbitColumn, _ as timeStringColumn, a as dateStringColumn, b as timestampTemporalColumn, c as float8Column, d as int8Column, f as intervalColumn, g as textColumn, h as numericColumn, i as charColumn, l as int2Column, m as jsonbColumn, n as boolColumn, o as dateTemporalColumn, p as jsonColumn, r as byteaColumn, s as float4Column, t as bitColumn, u as int4Column, v as timeTemporalColumn, w as timetzColumn, x as timestamptzJsDateColumn, y as timestampStringColumn } from "./column-types-CB_qVLNC.mjs";
|
|
9
9
|
export { PostgresControlAdapter, bitColumn, boolColumn, byteaColumn, charColumn, createPostgresAdapter, createPostgresBuiltinCodecLookup, createPostgresCodecRegistryWithBuiltins, dateStringColumn, dateTemporalColumn, escapeLiteral, float4Column, float8Column, int2Column, int4Column, int8Column, intervalColumn, jsonColumn, jsonbColumn, normalizeSchemaNativeType, numericColumn, parsePostgresDefault, postgresRawCodecInferer, qualifyName, quoteIdentifier, renderLoweredSql, textColumn, timeStringColumn, timeTemporalColumn, timestampStringColumn, timestampTemporalColumn, timestamptzJsDateColumn, timestamptzStringColumn, timestamptzTemporalColumn, timetzColumn, varbitColumn, varcharColumn };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { r as postgresRawCodecInferer, t as createPostgresAdapter } from "./adapter-C2dMP6ky-
|
|
1
|
+
import { r as postgresRawCodecInferer, t as createPostgresAdapter } from "./adapter-C2dMP6ky-DJ4qd297.mjs";
|
|
2
2
|
export { createPostgresAdapter, postgresRawCodecInferer };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { C as PG_TIMESTAMPTZ_DATE_CODEC_ID } from "./codec-ids-Cb0yO-IS--e0P2rfI.mjs";
|
|
2
2
|
import { i as createPostgresCodecRegistryWithBuiltins, r as createPostgresBuiltinCodecLookup, t as assemblePostgresCodecRegistry } from "./codecs-D3WwIWZp.mjs";
|
|
3
3
|
import { n as qualifyName, r as quoteIdentifier, t as escapeLiteral } from "./sql-utils-Bh-mnsSY-D6hnFPrP.mjs";
|
|
4
|
-
import { t as parsePostgresDefault } from "./default-normalizer-
|
|
4
|
+
import { t as parsePostgresDefault } from "./default-normalizer-Bp3IhMR9-D0uYVRLZ.mjs";
|
|
5
5
|
import { a as instantNowControlDescriptor, s as plainDateTimeNowControlDescriptor } from "./authoring-CSC0-DjI-CA5cgVmB.mjs";
|
|
6
6
|
import { t as postgresDataTypeEntries } from "./data-type-entries-Fxm2HDZk-D4AAd63w.mjs";
|
|
7
7
|
import { t as normalizeSchemaNativeType } from "./native-type-normalizer-yvd3tqv-.mjs";
|
|
8
|
-
import { t as PostgresControlAdapter } from "./control-adapter-CEhnRpI1-
|
|
8
|
+
import { t as PostgresControlAdapter } from "./control-adapter-CEhnRpI1-D0-PjR_O.mjs";
|
|
9
9
|
import { t as postgresAdapterDescriptorMeta } from "./descriptor-meta-F1wsOtt2-BFm3bVJ6.mjs";
|
|
10
10
|
import { timestampNowControlDescriptor } from "@prisma/orm-framework/components/control";
|
|
11
11
|
import { sqlDefaultLiteralTagEntry } from "@prisma/orm-family-sql/family/control";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as postgresCodecRegistry } from "./registry-Bf5BvREu-DJ7g3REJ.mjs";
|
|
2
2
|
import { t as assemblePostgresCodecRegistry } from "./codecs-D3WwIWZp.mjs";
|
|
3
3
|
import { i as instantNow, n as PLAIN_DATE_TIME_NOW_GENERATOR_ID, o as plainDateTimeNow, t as INSTANT_NOW_GENERATOR_ID } from "./authoring-CSC0-DjI-CA5cgVmB.mjs";
|
|
4
|
-
import { n as createPostgresAdapterWithCodecRegistry, r as postgresRawCodecInferer } from "./adapter-C2dMP6ky-
|
|
4
|
+
import { n as createPostgresAdapterWithCodecRegistry, r as postgresRawCodecInferer } from "./adapter-C2dMP6ky-DJ4qd297.mjs";
|
|
5
5
|
import { t as postgresAdapterDescriptorMeta } from "./descriptor-meta-F1wsOtt2-BFm3bVJ6.mjs";
|
|
6
6
|
import { builtinGeneratorIds } from "@prisma/orm-framework/ids";
|
|
7
7
|
import { timestampNowRuntimeGenerator } from "@prisma/orm-family-sql/family/runtime";
|
|
@@ -4,7 +4,7 @@ import { s as postgresError } from "./errors-DYyzTYzE-39CV_aMo.mjs";
|
|
|
4
4
|
import { t as DEFAULT_NAMESPACE_ID } from "./namespace-ids-xtp_ZY86-Cpp8PTxD.mjs";
|
|
5
5
|
import { t as PostgresNativeEnum } from "./postgres-native-enum-CdP3b_-R-Cgz9KEKx.mjs";
|
|
6
6
|
import { i as PostgresRlsPolicy, n as PostgresRlsEnablement, o as PostgresRole } from "./postgres-schema-MIh_qSUu-gKCH4OhS.mjs";
|
|
7
|
-
import { n as postgresResolveDefault } from "./default-normalizer-
|
|
7
|
+
import { n as postgresResolveDefault } from "./default-normalizer-Bp3IhMR9-D0uYVRLZ.mjs";
|
|
8
8
|
import { n as computeContentHash } from "./canonicalize-CrN3u_xM-D4MrOqcB.mjs";
|
|
9
9
|
import { m as postgresNowGeneratorIdFor, r as POLICY_BLOCK_KEYWORDS } from "./authoring-CSC0-DjI-CA5cgVmB.mjs";
|
|
10
10
|
import { t as postgresRenderCheckExpressions } from "./check-expressions-DLCs-SXx-itMQrUsX.mjs";
|
|
@@ -12,10 +12,10 @@ import { t as postgresTargetDescriptorMeta } from "./descriptor-meta--zYVau3w-D-
|
|
|
12
12
|
import { a as postgresDiffSubjectGranularity, i as postgresDiffSubjectEntityKind } from "./postgres-table-schema-node-BBkitBQh-DT1T5VWU.mjs";
|
|
13
13
|
import { t as PostgresDatabaseSchemaNode } from "./postgres-role-schema-node-B8Z5i5D--PObwlU2Z.mjs";
|
|
14
14
|
import { r as renderDefaultLiteral } from "./planner-ddl-builders-BncbM2oU-DR8NvtdY.mjs";
|
|
15
|
-
import { n as contractToPostgresDatabaseSchemaNode, r as diffPostgresSchema } from "./diff-database-schema-
|
|
15
|
+
import { n as contractToPostgresDatabaseSchemaNode, r as diffPostgresSchema } from "./diff-database-schema-BUYy91Fo-d7ABPxW9.mjs";
|
|
16
16
|
import { t as PostgresContractSerializer } from "./postgres-contract-view-BTNJukLn-QzZysnih.mjs";
|
|
17
|
-
import { t as createPostgresMigrationPlanner } from "./planner-
|
|
18
|
-
import { a as buildMapAttribute, d as inferPostgresPslContract, f as namedArg, i as buildIndexAttribute, m as positionalArg, n as buildAttribute, o as buildModelConstraintAttribute, p as parseDefaultAttributeString, r as buildCheckAttribute, s as buildNativeEnumBlock, t as SYNTHETIC_SPAN, u as createPostgresTypeMap } from "./infer-psl-contract-
|
|
17
|
+
import { t as createPostgresMigrationPlanner } from "./planner-CuyOgsjG-DefGza6Z.mjs";
|
|
18
|
+
import { a as buildMapAttribute, d as inferPostgresPslContract, f as namedArg, i as buildIndexAttribute, m as positionalArg, n as buildAttribute, o as buildModelConstraintAttribute, p as parseDefaultAttributeString, r as buildCheckAttribute, s as buildNativeEnumBlock, t as SYNTHETIC_SPAN, u as createPostgresTypeMap } from "./infer-psl-contract-Daj0b_Vd-DOd6cTZN.mjs";
|
|
19
19
|
import { escapePslString } from "@prisma/orm-family-sql/relational-core/ast";
|
|
20
20
|
import { blindCast } from "@prisma/orm-framework/utils/casts";
|
|
21
21
|
import { UNBOUND_NAMESPACE_ID } from "@prisma/orm-framework/components/ir";
|
|
@@ -2347,4 +2347,4 @@ const postgresTargetDescriptor = {
|
|
|
2347
2347
|
//#endregion
|
|
2348
2348
|
export { postgresTargetDescriptor as n, postgresRenderDefault as t };
|
|
2349
2349
|
|
|
2350
|
-
//# sourceMappingURL=control-
|
|
2350
|
+
//# sourceMappingURL=control-BPA8oU8O.mjs.map
|