@prisma/orm-target-postgres 8.0.0-rc.21-dev.17 → 8.0.0-rc.21-dev.18
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.mjs +3 -3
- 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/{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-PgoH1VQ4-B1jIQ7fO.mjs} +90 -5
- package/dist/descriptor-meta-PgoH1VQ4-B1jIQ7fO.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-DWW3L3C4.mjs → prisma7-binding--jMCU4Gy.mjs} +4 -87
- package/dist/prisma7-binding--jMCU4Gy.mjs.map +1 -0
- package/dist/{prisma7-binding-C99OHIsY.d.mts → prisma7-binding-_yXlIwi0.d.mts} +2 -1
- package/dist/{prisma7-binding-C99OHIsY.d.mts.map → prisma7-binding-_yXlIwi0.d.mts.map} +1 -1
- package/dist/registry-DHzMw0It-CWaFrPqq.mjs +15 -0
- package/dist/registry-DHzMw0It-CWaFrPqq.mjs.map +1 -0
- package/dist/target.d.mts +2 -2
- package/dist/target.mjs +7 -6
- 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,7 +1,7 @@
|
|
|
1
1
|
import { tt as postgresDataTypes } from "./data-types-DHpMs3mz-BllVpLs5.mjs";
|
|
2
|
-
import { i as createPostgresCodecRegistryWithBuiltins } from "./codec-registry-
|
|
2
|
+
import { i as createPostgresCodecRegistryWithBuiltins } from "./codec-registry-CdaRA3IV-xihQy4jg.mjs";
|
|
3
3
|
import { n as renderLoweredSql, t as adapterError } from "./sql-renderer-DrSed-6w-Ckp99B2a.mjs";
|
|
4
|
-
import { n as postgresAdapterCapabilities, t as PostgresControlAdapter } from "./contract-contributions-DS1YZqxl-
|
|
4
|
+
import { n as postgresAdapterCapabilities, t as PostgresControlAdapter } from "./contract-contributions-DS1YZqxl-B1ZaAkPj.mjs";
|
|
5
5
|
import { isDdlNode } from "@prisma/orm-family-sql/relational-core/ast";
|
|
6
6
|
import { assembleDataTypes } from "@prisma/orm-framework/components/codec";
|
|
7
7
|
import { APP_SPACE_ID } from "@prisma/orm-framework/components/control";
|
|
@@ -86,4 +86,4 @@ function createPostgresAdapterWithCodecRegistry(codecRegistry, dataTypeLookup, d
|
|
|
86
86
|
//#endregion
|
|
87
87
|
export { createPostgresAdapterWithCodecRegistry as n, postgresRawCodecInferer as r, createPostgresAdapter as t };
|
|
88
88
|
|
|
89
|
-
//# sourceMappingURL=adapter-DJoHcCZV-
|
|
89
|
+
//# sourceMappingURL=adapter-DJoHcCZV-B6ixkVJl.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter-DJoHcCZV-
|
|
1
|
+
{"version":3,"file":"adapter-DJoHcCZV-B6ixkVJl.mjs","names":[],"sources":["../../../../3-targets/postgres/2-adapter/dist/adapter-DJoHcCZV.mjs"],"sourcesContent":["import { n as adapterError, t as renderLoweredSql } from \"./sql-renderer-DrSed-6w.mjs\";\nimport { n as PostgresControlAdapter, r as postgresAdapterCapabilities } from \"./contract-contributions-DS1YZqxl.mjs\";\nimport { assembleDataTypes } from \"@internal/framework-components/codec\";\nimport { APP_SPACE_ID } from \"@internal/framework-components/control\";\nimport { isDdlNode } from \"@internal/sql-relational-core/ast\";\nimport { createPostgresCodecRegistryWithBuiltins } from \"@internal/target-postgres/codecs\";\nimport { postgresDataTypes } from \"@internal/target-postgres/data-types\";\n//#region src/core/adapter.ts\nvar PostgresAdapterImpl = class {\n\tfamilyId = \"sql\";\n\ttargetId = \"postgres\";\n\tprofile;\n\tcodecRegistry;\n\tdataTypeLookup;\n\tconstructor(codecRegistry, dataTypeLookup, declaredDataTypes, profileId) {\n\t\tthis.codecRegistry = codecRegistry;\n\t\tthis.dataTypeLookup = dataTypeLookup;\n\t\tconst controlAdapter = new PostgresControlAdapter(codecRegistry, dataTypeLookup, declaredDataTypes);\n\t\tthis.profile = Object.freeze({\n\t\t\tid: profileId ?? \"postgres/default@1\",\n\t\t\ttarget: \"postgres\",\n\t\t\tcapabilities: postgresAdapterCapabilities,\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, this.dataTypeLookup, postgresAdapterCapabilities);\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 dataTypes = assembleDataTypes([{\n\t\tid: \"postgres\",\n\t\tdataTypes: postgresDataTypes\n\t}, {\n\t\tid: \"createPostgresAdapter\",\n\t\tdataTypes: options?.dataTypes ?? []\n\t}]);\n\tconst codecRegistry = createPostgresCodecRegistryWithBuiltins(options?.codecDescriptors, dataTypes.lookup);\n\treturn Object.freeze(new PostgresAdapterImpl(codecRegistry, dataTypes.lookup, dataTypes.declared.map(({ type }) => type), options?.profileId));\n}\nfunction createPostgresAdapterWithCodecRegistry(codecRegistry, dataTypeLookup, declaredDataTypes) {\n\treturn Object.freeze(new PostgresAdapterImpl(codecRegistry, dataTypeLookup, declaredDataTypes));\n}\n//#endregion\nexport { createPostgresAdapterWithCodecRegistry as n, postgresRawCodecInferer as r, createPostgresAdapter as t };\n\n//# sourceMappingURL=adapter-DJoHcCZV.mjs.map"],"mappings":";;;;;;;;AAQA,IAAI,sBAAsB,MAAM;CAC/B,WAAW;CACX,WAAW;CACX;CACA;CACA;CACA,YAAY,eAAe,gBAAgB,mBAAmB,WAAW;EACxE,KAAK,gBAAgB;EACrB,KAAK,iBAAiB;EACtB,MAAM,iBAAiB,IAAI,uBAAuB,eAAe,gBAAgB,iBAAiB;EAClG,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,I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utils-VXrIh8dJ-DVxo_Ygp.mjs";
|
|
2
|
-
import { i as createPostgresCodecRegistryWithBuiltins, r as createPostgresBuiltinCodecLookup } from "./codec-registry-
|
|
2
|
+
import { i as createPostgresCodecRegistryWithBuiltins, r as createPostgresBuiltinCodecLookup } from "./codec-registry-CdaRA3IV-xihQy4jg.mjs";
|
|
3
3
|
import { n as renderLoweredSql } from "./sql-renderer-DrSed-6w-Ckp99B2a.mjs";
|
|
4
|
-
import { n as postgresAdapterCapabilities, r as postgresAdapterContractContributions, t as PostgresControlAdapter } from "./contract-contributions-DS1YZqxl-
|
|
5
|
-
import { r as postgresRawCodecInferer, t as createPostgresAdapter } from "./adapter-DJoHcCZV-
|
|
4
|
+
import { n as postgresAdapterCapabilities, r as postgresAdapterContractContributions, t as PostgresControlAdapter } from "./contract-contributions-DS1YZqxl-B1ZaAkPj.mjs";
|
|
5
|
+
import { r as postgresRawCodecInferer, t as createPostgresAdapter } from "./adapter-DJoHcCZV-B6ixkVJl.mjs";
|
|
6
6
|
import { A as varcharColumn, C as timestampStringColumn, D as timestamptzTemporalColumn, E as timestamptzStringColumn, O as timetzColumn, S as timestampJsDateColumn, T as timestamptzJsDateColumn, _ as rawColumn, a as dateStringColumn, b as timeTemporalColumn, c as float8Column, d as int8Column, f as intervalPartsColumn, g as numericColumn, h as jsonbColumn, i as charColumn, k as varbitColumn, l as int2Column, m as jsonColumn, n as boolColumn, o as dateTemporalColumn, p as intervalStringColumn, r as byteaColumn, s as float4Column, t as bitColumn, u as int4Column, v as textColumn, w as timestampTemporalColumn, x as timestampInstantColumn, y as timeStringColumn } from "./column-types-B11Mxo9V.mjs";
|
|
7
7
|
export { PostgresControlAdapter, bitColumn, boolColumn, byteaColumn, charColumn, createPostgresAdapter, createPostgresBuiltinCodecLookup, createPostgresCodecRegistryWithBuiltins, dateStringColumn, dateTemporalColumn, escapeLiteral, float4Column, float8Column, int2Column, int4Column, int8Column, intervalPartsColumn, intervalStringColumn, jsonColumn, jsonbColumn, numericColumn, postgresAdapterCapabilities, postgresAdapterContractContributions, postgresRawCodecInferer, qualifyName, quoteIdentifier, rawColumn, renderLoweredSql, textColumn, timeStringColumn, timeTemporalColumn, timestampInstantColumn, timestampJsDateColumn, timestampStringColumn, timestampTemporalColumn, timestamptzJsDateColumn, timestamptzStringColumn, timestamptzTemporalColumn, timetzColumn, varbitColumn, varcharColumn };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as postgresAdapterCapabilities, r as postgresAdapterContractContributions } from "./contract-contributions-DS1YZqxl-
|
|
2
|
-
import { r as postgresRawCodecInferer, t as createPostgresAdapter } from "./adapter-DJoHcCZV-
|
|
1
|
+
import { n as postgresAdapterCapabilities, r as postgresAdapterContractContributions } from "./contract-contributions-DS1YZqxl-B1ZaAkPj.mjs";
|
|
2
|
+
import { r as postgresRawCodecInferer, t as createPostgresAdapter } from "./adapter-DJoHcCZV-B6ixkVJl.mjs";
|
|
3
3
|
export { createPostgresAdapter, postgresAdapterCapabilities, postgresAdapterContractContributions, postgresRawCodecInferer };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as quoteIdentifier, i as qualifyName, n as escapeLiteral } from "./sql-utils-VXrIh8dJ-DVxo_Ygp.mjs";
|
|
2
|
-
import { i as createPostgresCodecRegistryWithBuiltins, r as createPostgresBuiltinCodecLookup, t as assemblePostgresCodecRegistry } from "./codec-registry-
|
|
3
|
-
import { t as PostgresControlAdapter } from "./contract-contributions-DS1YZqxl-
|
|
4
|
-
import { t as postgresAdapterDescriptorMeta } from "./descriptor-meta-5gncreHF-
|
|
2
|
+
import { i as createPostgresCodecRegistryWithBuiltins, r as createPostgresBuiltinCodecLookup, t as assemblePostgresCodecRegistry } from "./codec-registry-CdaRA3IV-xihQy4jg.mjs";
|
|
3
|
+
import { t as PostgresControlAdapter } from "./contract-contributions-DS1YZqxl-B1ZaAkPj.mjs";
|
|
4
|
+
import { t as postgresAdapterDescriptorMeta } from "./descriptor-meta-5gncreHF-Ddhsf2ah.mjs";
|
|
5
5
|
import { sqlDefaultFunctions } from "@prisma/orm-family-sql/family/control";
|
|
6
6
|
//#region ../../../3-targets/postgres/2-adapter/dist/control.mjs
|
|
7
7
|
const postgresDefaultFunctionRegistryEntries = Object.entries(sqlDefaultFunctions());
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as postgresCodecRegistry } from "./registry-DHzMw0It-CWaFrPqq.mjs";
|
|
2
|
+
import { t as assemblePostgresCodecRegistry } from "./codec-registry-CdaRA3IV-xihQy4jg.mjs";
|
|
2
3
|
import { d as postgresNowGenerators } from "./date-time-now-generators-CEqbD2GP-B95xid7h.mjs";
|
|
3
|
-
import { n as createPostgresAdapterWithCodecRegistry, r as postgresRawCodecInferer } from "./adapter-DJoHcCZV-
|
|
4
|
-
import { t as postgresAdapterDescriptorMeta } from "./descriptor-meta-5gncreHF-
|
|
4
|
+
import { n as createPostgresAdapterWithCodecRegistry, r as postgresRawCodecInferer } from "./adapter-DJoHcCZV-B6ixkVJl.mjs";
|
|
5
|
+
import { t as postgresAdapterDescriptorMeta } from "./descriptor-meta-5gncreHF-Ddhsf2ah.mjs";
|
|
5
6
|
import { assembleDataTypes } from "@prisma/orm-framework/components/codec";
|
|
6
7
|
import { timestampNowRuntimeGenerator } from "@prisma/orm-family-sql/family/runtime";
|
|
7
8
|
import { builtinGeneratorIds } from "@prisma/orm-framework/ids";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter__runtime.mjs","names":[],"sources":["../../../../3-targets/postgres/2-adapter/dist/runtime.mjs"],"sourcesContent":["import { n as createPostgresAdapterWithCodecRegistry, r as postgresRawCodecInferer } from \"./adapter-DJoHcCZV.mjs\";\nimport { t as postgresAdapterDescriptorMeta } from \"./descriptor-meta-5gncreHF.mjs\";\nimport { assembleDataTypes } from \"@internal/framework-components/codec\";\nimport { assemblePostgresCodecRegistry, postgresCodecRegistry } from \"@internal/target-postgres/codecs\";\nimport { timestampNowRuntimeGenerator } from \"@internal/family-sql/runtime\";\nimport { builtinGeneratorIds } from \"@internal/ids\";\nimport { generateId } from \"@internal/ids/runtime\";\nimport { postgresNowGenerators } from \"@internal/target-postgres/runtime\";\n//#region src/exports/runtime.ts\nfunction createPostgresMutationDefaultGenerators() {\n\treturn [\n\t\t...builtinGeneratorIds.map((id) => ({\n\t\t\tid,\n\t\t\tgenerate: (params) => {\n\t\t\t\treturn generateId(params ? {\n\t\t\t\t\tid,\n\t\t\t\t\tparams\n\t\t\t\t} : { id });\n\t\t\t},\n\t\t\tstability: \"field\"\n\t\t})),\n\t\ttimestampNowRuntimeGenerator(),\n\t\t...postgresNowGenerators.map(({ id, generate }) => ({\n\t\t\tid,\n\t\t\tgenerate,\n\t\t\tstability: \"query\"\n\t\t}))\n\t];\n}\nconst postgresRuntimeAdapterDescriptor = {\n\t...postgresAdapterDescriptorMeta,\n\tcodecs: () => Array.from(postgresCodecRegistry.values()),\n\tmutationDefaultGenerators: createPostgresMutationDefaultGenerators,\n\trawCodecInferer: postgresRawCodecInferer,\n\tcreate(stack) {\n\t\tconst components = [\n\t\t\tstack.target,\n\t\t\tstack.adapter,\n\t\t\t...stack.extensions\n\t\t];\n\t\tconst dataTypes = assembleDataTypes(components);\n\t\treturn createPostgresAdapterWithCodecRegistry(assemblePostgresCodecRegistry(components, dataTypes.lookup), dataTypes.lookup, dataTypes.declared.map(({ type }) => type));\n\t}\n};\n//#endregion\nexport { postgresRuntimeAdapterDescriptor as default };\n\n//# sourceMappingURL=runtime.mjs.map"],"mappings":"
|
|
1
|
+
{"version":3,"file":"adapter__runtime.mjs","names":[],"sources":["../../../../3-targets/postgres/2-adapter/dist/runtime.mjs"],"sourcesContent":["import { n as createPostgresAdapterWithCodecRegistry, r as postgresRawCodecInferer } from \"./adapter-DJoHcCZV.mjs\";\nimport { t as postgresAdapterDescriptorMeta } from \"./descriptor-meta-5gncreHF.mjs\";\nimport { assembleDataTypes } from \"@internal/framework-components/codec\";\nimport { assemblePostgresCodecRegistry, postgresCodecRegistry } from \"@internal/target-postgres/codecs\";\nimport { timestampNowRuntimeGenerator } from \"@internal/family-sql/runtime\";\nimport { builtinGeneratorIds } from \"@internal/ids\";\nimport { generateId } from \"@internal/ids/runtime\";\nimport { postgresNowGenerators } from \"@internal/target-postgres/runtime\";\n//#region src/exports/runtime.ts\nfunction createPostgresMutationDefaultGenerators() {\n\treturn [\n\t\t...builtinGeneratorIds.map((id) => ({\n\t\t\tid,\n\t\t\tgenerate: (params) => {\n\t\t\t\treturn generateId(params ? {\n\t\t\t\t\tid,\n\t\t\t\t\tparams\n\t\t\t\t} : { id });\n\t\t\t},\n\t\t\tstability: \"field\"\n\t\t})),\n\t\ttimestampNowRuntimeGenerator(),\n\t\t...postgresNowGenerators.map(({ id, generate }) => ({\n\t\t\tid,\n\t\t\tgenerate,\n\t\t\tstability: \"query\"\n\t\t}))\n\t];\n}\nconst postgresRuntimeAdapterDescriptor = {\n\t...postgresAdapterDescriptorMeta,\n\tcodecs: () => Array.from(postgresCodecRegistry.values()),\n\tmutationDefaultGenerators: createPostgresMutationDefaultGenerators,\n\trawCodecInferer: postgresRawCodecInferer,\n\tcreate(stack) {\n\t\tconst components = [\n\t\t\tstack.target,\n\t\t\tstack.adapter,\n\t\t\t...stack.extensions\n\t\t];\n\t\tconst dataTypes = assembleDataTypes(components);\n\t\treturn createPostgresAdapterWithCodecRegistry(assemblePostgresCodecRegistry(components, dataTypes.lookup), dataTypes.lookup, dataTypes.declared.map(({ type }) => type));\n\t}\n};\n//#endregion\nexport { postgresRuntimeAdapterDescriptor as default };\n\n//# sourceMappingURL=runtime.mjs.map"],"mappings":";;;;;;;;;;AASA,SAAS,0CAA0C;CAClD,OAAO;EACN,GAAG,oBAAoB,KAAK,QAAQ;GACnC;GACA,WAAW,WAAW;IACrB,OAAO,WAAW,SAAS;KAC1B;KACA;IACD,IAAI,EAAE,GAAG,CAAC;GACX;GACA,WAAW;EACZ,EAAE;EACF,6BAA6B;EAC7B,GAAG,sBAAsB,KAAK,EAAE,IAAI,gBAAgB;GACnD;GACA;GACA,WAAW;EACZ,EAAE;CACH;AACD;AACA,MAAM,mCAAmC;CACxC,GAAG;CACH,cAAc,MAAM,KAAK,sBAAsB,OAAO,CAAC;CACvD,2BAA2B;CAC3B,iBAAiB;CACjB,OAAO,OAAO;EACb,MAAM,aAAa;GAClB,MAAM;GACN,MAAM;GACN,GAAG,MAAM;EACV;EACA,MAAM,YAAY,kBAAkB,UAAU;EAC9C,OAAO,uCAAuC,8BAA8B,YAAY,UAAU,MAAM,GAAG,UAAU,QAAQ,UAAU,SAAS,KAAK,EAAE,WAAW,IAAI,CAAC;CACxK;AACD"}
|
|
@@ -1,17 +1,9 @@
|
|
|
1
1
|
import { n as buildPostgresCodecDescriptorRegistry } from "./codec-descriptor-DBeD0UlS-BfvrE-KZ.mjs";
|
|
2
2
|
import { i as createPostgresBuiltinDataTypeLookup } from "./data-types-DHpMs3mz-BllVpLs5.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { t as postgresCodecDescriptorRegistry } from "./registry-DHzMw0It-CWaFrPqq.mjs";
|
|
4
4
|
import { structuredError } from "@prisma/orm-framework/utils/structured-error";
|
|
5
5
|
import { extractCodecLookup } from "@prisma/orm-framework/components/control";
|
|
6
|
-
|
|
7
|
-
//#region ../../../3-targets/postgres/1-target/dist/codec-registry-D-bD-lFp.mjs
|
|
8
|
-
/**
|
|
9
|
-
* Registry of every codec descriptor shipped by `@internal/target-postgres`.
|
|
10
|
-
*
|
|
11
|
-
* 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.
|
|
12
|
-
*/
|
|
13
|
-
const postgresCodecRegistry = buildCodecDescriptorRegistry(codecDescriptors);
|
|
14
|
-
const postgresCodecDescriptorRegistry = buildPostgresCodecDescriptorRegistry(codecDescriptors);
|
|
6
|
+
//#region ../../../3-targets/postgres/1-target/dist/codec-registry-CdaRA3IV.mjs
|
|
15
7
|
/**
|
|
16
8
|
* A registry of `descriptors`, refusing a codec whose data type `dataTypeLookup` does not have: the
|
|
17
9
|
* SQL renderer writes a parameter's cast from the data type its codec represents.
|
|
@@ -56,6 +48,6 @@ function createPostgresBuiltinCodecLookup() {
|
|
|
56
48
|
return createPostgresCodecRegistryWithBuiltins();
|
|
57
49
|
}
|
|
58
50
|
//#endregion
|
|
59
|
-
export {
|
|
51
|
+
export { createPostgresCodecRegistryWithBuiltins as i, assemblePostgresCodecRegistryWithBuiltins as n, createPostgresBuiltinCodecLookup as r, assemblePostgresCodecRegistry as t };
|
|
60
52
|
|
|
61
|
-
//# sourceMappingURL=codec-registry-
|
|
53
|
+
//# sourceMappingURL=codec-registry-CdaRA3IV-xihQy4jg.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codec-registry-CdaRA3IV-xihQy4jg.mjs","names":[],"sources":["../../../../3-targets/postgres/1-target/dist/codec-registry-CdaRA3IV.mjs"],"sourcesContent":["import { t as createPostgresBuiltinDataTypeLookup } from \"./data-types-DHpMs3mz.mjs\";\nimport { n as buildPostgresCodecDescriptorRegistry } from \"./codec-descriptor-DBeD0UlS.mjs\";\nimport { t as postgresCodecDescriptorRegistry } from \"./registry-DHzMw0It.mjs\";\nimport { structuredError } from \"@internal/utils/structured-error\";\nimport { extractCodecLookup } from \"@internal/framework-components/control\";\n//#region src/core/codec-registry.ts\n/**\n* A registry of `descriptors`, refusing a codec whose data type `dataTypeLookup` does not have: the\n* SQL renderer writes a parameter's cast from the data type its codec represents.\n*/\nfunction buildPostgresCodecRegistry(descriptors, dataTypeLookup) {\n\tconst descriptorRegistry = buildPostgresCodecDescriptorRegistry(descriptors);\n\tconst validatedDescriptors = Array.from(descriptorRegistry.values());\n\tfor (const descriptor of validatedDescriptors) if (!dataTypeLookup.has(descriptor.dataType)) throw structuredError(\"CONTRACT.DATA_TYPE_UNREGISTERED\", `Codec \"${descriptor.codecId}\" represents data type \"${descriptor.dataType}\", which no component registers.`, {\n\t\twhy: \"A parameter of this codec is written with a cast named by its data type.\",\n\t\tfix: \"Pass the data type beside the codec: in `dataTypes` of createPostgresAdapter, or in the `dataTypes` of the extension that contributes the codec.\",\n\t\tmeta: {\n\t\t\tcodecId: descriptor.codecId,\n\t\t\tdataType: descriptor.dataType\n\t\t}\n\t});\n\tconst registry = {\n\t\t...extractCodecLookup([{\n\t\t\tid: \"postgres-codecs\",\n\t\t\ttypes: { codecTypes: { codecDescriptors: validatedDescriptors } }\n\t\t}]),\n\t\tdescriptorFor: (codecId) => descriptorRegistry.descriptorFor(codecId),\n\t\tvalues: () => descriptorRegistry.values()\n\t};\n\treturn Object.freeze(registry);\n}\nfunction assemblePostgresCodecRegistry(components, dataTypeLookup) {\n\treturn buildPostgresCodecRegistry(components.flatMap((component) => component.types?.codecTypes?.codecDescriptors ?? []), dataTypeLookup);\n}\nfunction assemblePostgresCodecRegistryWithBuiltins(extensions, dataTypeLookup) {\n\treturn buildPostgresCodecRegistry([...postgresCodecDescriptorRegistry.values(), ...extensions.flatMap((extension) => extension.types?.codecTypes?.codecDescriptors ?? [])], dataTypeLookup);\n}\n/** A registry of the built-in codecs and `codecDescriptors`, whose data types `dataTypeLookup` has. */\nfunction createPostgresCodecRegistryWithBuiltins(codecDescriptors = [], dataTypeLookup = createPostgresBuiltinDataTypeLookup()) {\n\treturn buildPostgresCodecRegistry([...postgresCodecDescriptorRegistry.values(), ...codecDescriptors], dataTypeLookup);\n}\n/**\n* Build a coherent PostgreSQL codec registry populated with built-in descriptors only.\n*\n* The returned registry supports both ordinary codec materialization and PostgreSQL target behavior. Stack-composed paths build the same combined registry from their complete ordered descriptor contributions.\n*/\nfunction createPostgresBuiltinCodecLookup() {\n\treturn createPostgresCodecRegistryWithBuiltins();\n}\n//#endregion\nexport { createPostgresCodecRegistryWithBuiltins as i, assemblePostgresCodecRegistryWithBuiltins as n, createPostgresBuiltinCodecLookup as r, assemblePostgresCodecRegistry as t };\n\n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
|
|
3
3
|
import { u as postgresError } from "./errors-DpdPXR_L-DailcY-X.mjs";
|
|
4
4
|
import { a as quoteIdentifier, n as escapeLiteral, r as inlineLiteral } from "./sql-utils-VXrIh8dJ-DVxo_Ygp.mjs";
|
|
5
5
|
import { u as parsePostgresListText } from "./codecs-BtalD4yQ-BVQxal3w.mjs";
|
|
6
|
-
import {
|
|
6
|
+
import { n as postgresCodecRegistry } from "./registry-DHzMw0It-CWaFrPqq.mjs";
|
|
7
7
|
import { a as jsonb, c as textArray, i as int8, l as timestamptz, n as buildSignMarkerBootstrapQueries, o as pgTable, r as int4, s as text, t as buildControlTableBootstrapQueries } from "./contract-free-DmNEp1_Y.mjs";
|
|
8
8
|
import { i as policyRoleList, t as POLICY_COMMAND_SQL } from "./canonicalize-RdxoUHao-FTTkizfe.mjs";
|
|
9
9
|
import { i as PostgresTableSchemaNode, n as PostgresNativeEnumSchemaNode, r as PostgresSchemaNodeKind, t as PostgresExtensionSchemaNode } from "./postgres-table-schema-node-nY6II-Uv-Bj-lgmSi.mjs";
|
|
@@ -1446,4 +1446,4 @@ const postgresAdapterContractContributions = {
|
|
|
1446
1446
|
//#endregion
|
|
1447
1447
|
export { postgresAdapterCapabilities as n, postgresAdapterContractContributions as r, PostgresControlAdapter as t };
|
|
1448
1448
|
|
|
1449
|
-
//# sourceMappingURL=contract-contributions-DS1YZqxl-
|
|
1449
|
+
//# sourceMappingURL=contract-contributions-DS1YZqxl-B1ZaAkPj.mjs.map
|