@prisma/orm-postgres 8.0.0-rc.11-dev.13 → 8.0.0-rc.11-dev.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,12 @@
1
+ import { SqlRuntimeBase } from "@prisma/orm-family-sql/runtime";
2
+ import postgresTarget from "@prisma/orm-target-postgres/target/runtime";
3
+ //#region ../../../3-extensions/postgres/dist/postgres-runtime-oM2EIAjm.mjs
4
+ var PostgresRuntimeImpl = class extends SqlRuntimeBase {
5
+ getListDecoder() {
6
+ return postgresTarget.listDecoder();
7
+ }
8
+ };
9
+ //#endregion
10
+ export { PostgresRuntimeImpl as t };
11
+
12
+ //# sourceMappingURL=postgres-runtime-oM2EIAjm-CZIDUstk.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"postgres-runtime-oM2EIAjm-CZIDUstk.mjs","names":[],"sources":["../../../../3-extensions/postgres/dist/postgres-runtime-oM2EIAjm.mjs"],"sourcesContent":["import { SqlRuntimeBase } from \"@internal/sql-runtime\";\nimport postgresTarget from \"@internal/target-postgres/runtime\";\n//#region src/runtime/postgres-runtime.ts\nvar PostgresRuntimeImpl = class extends SqlRuntimeBase {\n\tgetListDecoder() {\n\t\treturn postgresTarget.listDecoder();\n\t}\n};\n//#endregion\nexport { PostgresRuntimeImpl as t };\n\n//# sourceMappingURL=postgres-runtime-oM2EIAjm.mjs.map"],"mappings":";;;AAGA,IAAI,sBAAsB,cAAc,eAAe;CACtD,iBAAiB;EAChB,OAAO,eAAe,YAAY;CACnC;AACD"}
@@ -12,7 +12,10 @@ import { SqlStorage } from "@prisma/orm-family-sql/contract/types";
12
12
  * extensions (e.g. Supabase) can subclass it; app code never references it directly.
13
13
  */
14
14
  interface PostgresRuntime extends Runtime {}
15
- declare class PostgresRuntimeImpl<TContract extends Contract<SqlStorage> = Contract<SqlStorage>> extends SqlRuntimeBase<TContract> {}
15
+ type PostgresListDecoder = (wireValue: unknown, decodeElement: (value: unknown) => Promise<unknown>) => Promise<readonly unknown[]>;
16
+ declare class PostgresRuntimeImpl<TContract extends Contract<SqlStorage> = Contract<SqlStorage>> extends SqlRuntimeBase<TContract> {
17
+ protected getListDecoder(): PostgresListDecoder;
18
+ }
16
19
  //#endregion
17
20
  export { type NamespacedNativeEnums, type PostgresBinding, type PostgresClient, type PostgresOptions, type PostgresOptionsBase, type PostgresOptionsWithContract, type PostgresOptionsWithContractJson, type PostgresRuntime, PostgresRuntimeImpl, buildNamespacedNativeEnums, postgres as default, isPgClient, isPgPool };
18
21
  //# sourceMappingURL=runtime.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.d.mts","names":[],"sources":["../../../../3-extensions/postgres/dist/runtime.d.mts"],"mappings":";;;;;;;;;;;;;UAYU,wBAAwB;cACpB,oBAAoB,kBAAkB,SAAS,cAAc,SAAS,qBAAqB,eAAe"}
1
+ {"version":3,"file":"runtime.d.mts","names":[],"sources":["../../../../3-extensions/postgres/dist/runtime.d.mts"],"mappings":";;;;;;;;;;;;;UAYU,wBAAwB;KAC7B,uBAAuB,oBAAoB,gBAAgB,mBAAmB,qBAAqB;cAC1F,oBAAoB,kBAAkB,SAAS,cAAc,SAAS,qBAAqB,eAAe;YAC5G,kBAAkB"}
package/dist/runtime.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { t as postgresError } from "./errors-DfWK9xep-CYOOg0sB.mjs";
2
2
  import { n as buildPostgresStaticContext, t as buildNamespacedNativeEnums } from "./postgres-static-DBYpkrmX-W8VjIiiv.mjs";
3
- import { t as PostgresRuntimeImpl } from "./postgres-runtime-GybTEgP4-DpGY305_.mjs";
3
+ import { t as PostgresRuntimeImpl } from "./postgres-runtime-oM2EIAjm-CZIDUstk.mjs";
4
4
  import { ifDefined } from "@prisma/orm-framework/utils/defined";
5
5
  import { InternalError } from "@prisma/orm-framework/utils/internal-error";
6
6
  import postgresAdapter from "@prisma/orm-target-postgres/adapter/runtime";
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.mjs","names":[],"sources":["../../../../3-extensions/postgres/dist/runtime.mjs"],"sourcesContent":["import { t as postgresError } from \"./errors-DfWK9xep.mjs\";\nimport { r as buildNamespacedNativeEnums, t as buildPostgresStaticContext } from \"./postgres-static-DBYpkrmX.mjs\";\nimport { t as PostgresRuntimeImpl } from \"./postgres-runtime-GybTEgP4.mjs\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport postgresAdapter from \"@internal/adapter-postgres/runtime\";\nimport postgresDriver, { suppressIdleConnectionErrors } from \"@internal/driver-postgres/runtime\";\nimport { instantiateExecutionStack } from \"@internal/framework-components/execution\";\nimport { sql } from \"@internal/sql-builder/runtime\";\nimport { orm, prepareQuery } from \"@internal/sql-orm-client\";\nimport { createExecutionContext, createSqlExecutionStack, withTransaction } from \"@internal/sql-runtime\";\nimport postgresTarget, { PostgresContractSerializer } from \"@internal/target-postgres/runtime\";\nimport { blindCast, castAs } from \"@internal/utils/casts\";\nimport { Pool } from \"pg\";\n//#region src/runtime/binding.ts\nconst isPgPool = (pg) => \"totalCount\" in pg && \"idleCount\" in pg && \"waitingCount\" in pg;\nconst isPgClient = (pg) => \"escapeIdentifier\" in pg && \"escapeLiteral\" in pg;\nfunction validatePostgresUrl(url) {\n\tconst trimmed = url.trim();\n\tif (trimmed.length === 0) throw postgresError(\"RUNTIME.BINDING_INVALID\", \"Postgres URL must be a non-empty string\", { meta: {\n\t\textension: \"postgres\",\n\t\treason: \"empty url\"\n\t} });\n\tlet parsed;\n\ttry {\n\t\tparsed = new URL(trimmed);\n\t} catch {\n\t\tthrow postgresError(\"RUNTIME.BINDING_INVALID\", \"Postgres URL must be a valid URL\", { meta: {\n\t\t\textension: \"postgres\",\n\t\t\treason: \"unparseable url\"\n\t\t} });\n\t}\n\tif (parsed.protocol !== \"postgres:\" && parsed.protocol !== \"postgresql:\") throw postgresError(\"RUNTIME.BINDING_INVALID\", \"Postgres URL must use postgres:// or postgresql://\", { meta: {\n\t\textension: \"postgres\",\n\t\treason: \"wrong scheme\",\n\t\treceived: parsed.protocol\n\t} });\n\treturn trimmed;\n}\nfunction resolvePostgresBinding(options) {\n\tif (Number(options.binding !== void 0) + Number(options.url !== void 0) + Number(options.pg !== void 0) !== 1) throw postgresError(\"RUNTIME.BINDING_INVALID\", \"Provide one binding input: binding, url, or pg\", {\n\t\tfix: \"Pass exactly one of `binding`, `url`, or `pg`.\",\n\t\tmeta: {\n\t\t\textension: \"postgres\",\n\t\t\treason: \"zero or multiple binding inputs\"\n\t\t}\n\t});\n\tif (options.binding !== void 0) return options.binding;\n\tif (options.url !== void 0) return {\n\t\tkind: \"url\",\n\t\turl: validatePostgresUrl(options.url)\n\t};\n\tconst pgBinding = options.pg;\n\tif (pgBinding === void 0) throw new InternalError(\"Invariant violation: expected pg binding after validation\");\n\tif (isPgPool(pgBinding)) return {\n\t\tkind: \"pgPool\",\n\t\tpool: pgBinding\n\t};\n\tif (isPgClient(pgBinding)) return {\n\t\tkind: \"pgClient\",\n\t\tclient: pgBinding\n\t};\n\tthrow postgresError(\"RUNTIME.BINDING_INVALID\", \"Unable to determine pg binding type from pg input; use binding with explicit kind\", {\n\t\tfix: \"Pass `binding: { kind: \\\"pgPool\\\", pool }` or `binding: { kind: \\\"pgClient\\\", client }` instead of `pg`.\",\n\t\tmeta: {\n\t\t\textension: \"postgres\",\n\t\t\treason: \"unrecognizable pg object\"\n\t\t}\n\t});\n}\nfunction resolveOptionalPostgresBinding(options) {\n\tif (Number(options.binding !== void 0) + Number(options.url !== void 0) + Number(options.pg !== void 0) === 0) return;\n\treturn resolvePostgresBinding(options);\n}\n//#endregion\n//#region src/runtime/postgres.ts\nfunction hasContractJson(options) {\n\treturn \"contractJson\" in options;\n}\nconst contractSerializer = new PostgresContractSerializer();\nfunction resolveContract(options) {\n\tconst contractJson = hasContractJson(options) ? options.contractJson : contractSerializer.serializeContract(options.contract);\n\treturn blindCast(contractSerializer.deserializeContract(contractJson));\n}\nfunction toRuntimeBinding(binding, options) {\n\tif (binding.kind !== \"url\") return binding;\n\treturn {\n\t\tkind: \"pgPool\",\n\t\tpool: suppressIdleConnectionErrors(new Pool({\n\t\t\tconnectionString: binding.url,\n\t\t\tconnectionTimeoutMillis: options.poolOptions?.connectionTimeoutMillis ?? 2e4,\n\t\t\tidleTimeoutMillis: options.poolOptions?.idleTimeoutMillis ?? 3e4\n\t\t}))\n\t};\n}\nfunction postgres(options) {\n\tconst contract = resolveContract(options);\n\tlet binding = resolveOptionalPostgresBinding(options);\n\tconst stack = createSqlExecutionStack({\n\t\ttarget: postgresTarget,\n\t\tadapter: postgresAdapter,\n\t\tdriver: postgresDriver,\n\t\textensions: options.extensions ?? []\n\t});\n\tconst context = createExecutionContext({\n\t\tcontract,\n\t\tstack,\n\t\tdriver: postgresDriver\n\t});\n\tconst { sql: sql$1, raw: rawSqlTag, enums, nativeEnums } = buildPostgresStaticContext(context, stack.adapter.rawCodecInferer);\n\tlet runtimeInstance;\n\tlet runtimeDriver;\n\tlet driverConnected = false;\n\tlet connectPromise;\n\tlet backgroundConnectError;\n\tlet closed = false;\n\tlet ownedDispose;\n\tconst connectDriver = async (resolvedBinding) => {\n\t\tif (driverConnected) return;\n\t\tif (!runtimeDriver) throw new InternalError(\"Postgres runtime driver missing\");\n\t\tif (connectPromise) return connectPromise;\n\t\tconst runtimeBinding = toRuntimeBinding(resolvedBinding, options);\n\t\tif (resolvedBinding.kind === \"url\" && runtimeBinding.kind === \"pgPool\") {\n\t\t\tconst pool = runtimeBinding.pool;\n\t\t\tlet disposed = false;\n\t\t\townedDispose = async () => {\n\t\t\t\tif (disposed) return;\n\t\t\t\tdisposed = true;\n\t\t\t\tawait pool.end().then(() => void 0);\n\t\t\t};\n\t\t}\n\t\tconnectPromise = runtimeDriver.connect(runtimeBinding).then(() => {\n\t\t\tdriverConnected = true;\n\t\t}).catch(async (err) => {\n\t\t\tbackgroundConnectError = err;\n\t\t\tconnectPromise = void 0;\n\t\t\tawait ownedDispose?.().catch(() => void 0);\n\t\t\tthrow err;\n\t\t});\n\t\treturn connectPromise;\n\t};\n\tconst getRuntime = () => {\n\t\tif (closed) throw postgresError(\"DRIVER.NOT_CONNECTED\", \"Postgres client is closed\", {\n\t\t\twhy: \"close() was called on this client.\",\n\t\t\tfix: \"Create a new postgres(...) client.\",\n\t\t\tmeta: { extension: \"postgres\" }\n\t\t});\n\t\tif (backgroundConnectError !== void 0) throw backgroundConnectError;\n\t\tif (runtimeInstance) return runtimeInstance;\n\t\tconst stackInstance = instantiateExecutionStack(stack);\n\t\tconst driverDescriptor = stack.driver;\n\t\tif (!driverDescriptor) throw new InternalError(\"Driver descriptor missing from execution stack\");\n\t\tconst driver = driverDescriptor.create({ cursor: { disabled: true } });\n\t\truntimeDriver = driver;\n\t\tif (binding !== void 0) connectDriver(binding).catch(() => void 0);\n\t\truntimeInstance = new PostgresRuntimeImpl({\n\t\t\tcontext,\n\t\t\tadapter: stackInstance.adapter,\n\t\t\tdriver,\n\t\t\t...ifDefined(\"verifyMarker\", options.verifyMarker),\n\t\t\t...ifDefined(\"middleware\", options.middleware)\n\t\t});\n\t\treturn runtimeInstance;\n\t};\n\tconst orm$1 = orm({\n\t\truntime: {\n\t\t\tquery(plan) {\n\t\t\t\treturn getRuntime().query(plan);\n\t\t\t},\n\t\t\texecute(plan) {\n\t\t\t\treturn getRuntime().execute(plan);\n\t\t\t},\n\t\t\tconnection() {\n\t\t\t\treturn getRuntime().connection();\n\t\t\t}\n\t\t},\n\t\tcontext\n\t});\n\tfunction prepare(declaration, callback) {\n\t\treturn prepareQuery(getRuntime(), declaration, callback);\n\t}\n\treturn {\n\t\tsql: sql$1,\n\t\torm: orm$1,\n\t\tenums,\n\t\tnativeEnums,\n\t\traw: rawSqlTag,\n\t\tcontext,\n\t\tcontract,\n\t\tstack,\n\t\tasync connect(bindingInput) {\n\t\t\tif (closed) throw postgresError(\"DRIVER.NOT_CONNECTED\", \"Postgres client is closed\", {\n\t\t\t\twhy: \"close() was called on this client.\",\n\t\t\t\tfix: \"Create a new postgres(...) client.\",\n\t\t\t\tmeta: { extension: \"postgres\" }\n\t\t\t});\n\t\t\tif (driverConnected || connectPromise) throw postgresError(\"DRIVER.ALREADY_CONNECTED\", \"Postgres client already connected\", {\n\t\t\t\tfix: \"Call connect() at most once per client.\",\n\t\t\t\tmeta: { extension: \"postgres\" }\n\t\t\t});\n\t\t\tif (bindingInput !== void 0) binding = resolvePostgresBinding(bindingInput);\n\t\t\tif (binding === void 0) throw postgresError(\"RUNTIME.BINDING_MISSING\", \"Postgres binding not configured. Pass url/pg/binding to postgres(...) or call db.connect({ ... }).\", { meta: { extension: \"postgres\" } });\n\t\t\tconst runtime = getRuntime();\n\t\t\tif (driverConnected) return runtime;\n\t\t\tawait connectDriver(binding);\n\t\t\treturn runtime;\n\t\t},\n\t\truntime() {\n\t\t\treturn getRuntime();\n\t\t},\n\t\tprepare,\n\t\ttransaction(fn) {\n\t\t\treturn withTransaction(getRuntime(), (txCtx) => {\n\t\t\t\tconst rawCodecInferer = stack.adapter.rawCodecInferer;\n\t\t\t\tconst txSql = sql({\n\t\t\t\t\tcontext,\n\t\t\t\t\trawCodecInferer\n\t\t\t\t});\n\t\t\t\tconst txOrm = orm({\n\t\t\t\t\truntime: {\n\t\t\t\t\t\tquery(plan) {\n\t\t\t\t\t\t\treturn txCtx.query(plan);\n\t\t\t\t\t\t},\n\t\t\t\t\t\texecute(plan) {\n\t\t\t\t\t\t\treturn txCtx.execute(plan);\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tcontext\n\t\t\t\t});\n\t\t\t\treturn fn(Object.assign(castAs(Object.create(txCtx)), {\n\t\t\t\t\tsql: txSql,\n\t\t\t\t\torm: txOrm,\n\t\t\t\t\tenums,\n\t\t\t\t\tnativeEnums\n\t\t\t\t}));\n\t\t\t});\n\t\t},\n\t\tasync close() {\n\t\t\tif (closed) return;\n\t\t\tclosed = true;\n\t\t\tawait connectPromise?.catch(() => void 0);\n\t\t\tawait ownedDispose?.();\n\t\t},\n\t\t[Symbol.asyncDispose]() {\n\t\t\treturn this.close();\n\t\t}\n\t};\n}\n//#endregion\nexport { PostgresRuntimeImpl, buildNamespacedNativeEnums, postgres as default, isPgClient, isPgPool };\n\n//# sourceMappingURL=runtime.mjs.map"],"mappings":";;;;;;;;;;;;;;;AAeA,MAAM,YAAY,OAAO,gBAAgB,MAAM,eAAe,MAAM,kBAAkB;AACtF,MAAM,cAAc,OAAO,sBAAsB,MAAM,mBAAmB;AAC1E,SAAS,oBAAoB,KAAK;CACjC,MAAM,UAAU,IAAI,KAAK;CACzB,IAAI,QAAQ,WAAW,GAAG,MAAM,cAAc,2BAA2B,2CAA2C,EAAE,MAAM;EAC3H,WAAW;EACX,QAAQ;CACT,EAAE,CAAC;CACH,IAAI;CACJ,IAAI;EACH,SAAS,IAAI,IAAI,OAAO;CACzB,QAAQ;EACP,MAAM,cAAc,2BAA2B,oCAAoC,EAAE,MAAM;GAC1F,WAAW;GACX,QAAQ;EACT,EAAE,CAAC;CACJ;CACA,IAAI,OAAO,aAAa,eAAe,OAAO,aAAa,eAAe,MAAM,cAAc,2BAA2B,sDAAsD,EAAE,MAAM;EACtL,WAAW;EACX,QAAQ;EACR,UAAU,OAAO;CAClB,EAAE,CAAC;CACH,OAAO;AACR;AACA,SAAS,uBAAuB,SAAS;CACxC,IAAI,OAAO,QAAQ,YAAY,KAAK,CAAC,IAAI,OAAO,QAAQ,QAAQ,KAAK,CAAC,IAAI,OAAO,QAAQ,OAAO,KAAK,CAAC,MAAM,GAAG,MAAM,cAAc,2BAA2B,kDAAkD;EAC/M,KAAK;EACL,MAAM;GACL,WAAW;GACX,QAAQ;EACT;CACD,CAAC;CACD,IAAI,QAAQ,YAAY,KAAK,GAAG,OAAO,QAAQ;CAC/C,IAAI,QAAQ,QAAQ,KAAK,GAAG,OAAO;EAClC,MAAM;EACN,KAAK,oBAAoB,QAAQ,GAAG;CACrC;CACA,MAAM,YAA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;IACtC,MAAM,QAAQ,IAAI;KACjB;KACA;IACD,CAAC;IACD,MAAM,QAAQ,IAAI;KACjB,SAAS;MACR,MAAM,MAAM;OACX,OAAO,MAAM,MAAM,IAAI;MACxB;MACA,QAAQ,MAAM;OACb,OAAO,MAAM,QAAQ,IAAI;MAC1B;KACD;KACA;IACD,CAAC;IACD,OAAO,GAAG,OAAO,OAAO,OAAO,OAAO,OAAO,KAAK,CAAC,GAAG;KACrD,KAAK;KACL,KAAK;KACL;KACA;IACD,CAAC,CAAC;GACH,CAAC;EACF;EACA,MAAM,QAAQ;GACb,IAAI,QAAQ;GACZ,SAAS;GACT,MAAM,gBAAgB,YAAY,KAAK,CAAC;GACxC,MAAM,eAAe;EACtB;EACA,CAAC,OAAO,gBAAgB;GACvB,OAAO,KAAK,MAAM;EACnB;CACD;AACD"}
1
+ {"version":3,"file":"runtime.mjs","names":[],"sources":["../../../../3-extensions/postgres/dist/runtime.mjs"],"sourcesContent":["import { t as postgresError } from \"./errors-DfWK9xep.mjs\";\nimport { r as buildNamespacedNativeEnums, t as buildPostgresStaticContext } from \"./postgres-static-DBYpkrmX.mjs\";\nimport { t as PostgresRuntimeImpl } from \"./postgres-runtime-oM2EIAjm.mjs\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport postgresAdapter from \"@internal/adapter-postgres/runtime\";\nimport postgresDriver, { suppressIdleConnectionErrors } from \"@internal/driver-postgres/runtime\";\nimport { instantiateExecutionStack } from \"@internal/framework-components/execution\";\nimport { sql } from \"@internal/sql-builder/runtime\";\nimport { orm, prepareQuery } from \"@internal/sql-orm-client\";\nimport { createExecutionContext, createSqlExecutionStack, withTransaction } from \"@internal/sql-runtime\";\nimport postgresTarget, { PostgresContractSerializer } from \"@internal/target-postgres/runtime\";\nimport { blindCast, castAs } from \"@internal/utils/casts\";\nimport { Pool } from \"pg\";\n//#region src/runtime/binding.ts\nconst isPgPool = (pg) => \"totalCount\" in pg && \"idleCount\" in pg && \"waitingCount\" in pg;\nconst isPgClient = (pg) => \"escapeIdentifier\" in pg && \"escapeLiteral\" in pg;\nfunction validatePostgresUrl(url) {\n\tconst trimmed = url.trim();\n\tif (trimmed.length === 0) throw postgresError(\"RUNTIME.BINDING_INVALID\", \"Postgres URL must be a non-empty string\", { meta: {\n\t\textension: \"postgres\",\n\t\treason: \"empty url\"\n\t} });\n\tlet parsed;\n\ttry {\n\t\tparsed = new URL(trimmed);\n\t} catch {\n\t\tthrow postgresError(\"RUNTIME.BINDING_INVALID\", \"Postgres URL must be a valid URL\", { meta: {\n\t\t\textension: \"postgres\",\n\t\t\treason: \"unparseable url\"\n\t\t} });\n\t}\n\tif (parsed.protocol !== \"postgres:\" && parsed.protocol !== \"postgresql:\") throw postgresError(\"RUNTIME.BINDING_INVALID\", \"Postgres URL must use postgres:// or postgresql://\", { meta: {\n\t\textension: \"postgres\",\n\t\treason: \"wrong scheme\",\n\t\treceived: parsed.protocol\n\t} });\n\treturn trimmed;\n}\nfunction resolvePostgresBinding(options) {\n\tif (Number(options.binding !== void 0) + Number(options.url !== void 0) + Number(options.pg !== void 0) !== 1) throw postgresError(\"RUNTIME.BINDING_INVALID\", \"Provide one binding input: binding, url, or pg\", {\n\t\tfix: \"Pass exactly one of `binding`, `url`, or `pg`.\",\n\t\tmeta: {\n\t\t\textension: \"postgres\",\n\t\t\treason: \"zero or multiple binding inputs\"\n\t\t}\n\t});\n\tif (options.binding !== void 0) return options.binding;\n\tif (options.url !== void 0) return {\n\t\tkind: \"url\",\n\t\turl: validatePostgresUrl(options.url)\n\t};\n\tconst pgBinding = options.pg;\n\tif (pgBinding === void 0) throw new InternalError(\"Invariant violation: expected pg binding after validation\");\n\tif (isPgPool(pgBinding)) return {\n\t\tkind: \"pgPool\",\n\t\tpool: pgBinding\n\t};\n\tif (isPgClient(pgBinding)) return {\n\t\tkind: \"pgClient\",\n\t\tclient: pgBinding\n\t};\n\tthrow postgresError(\"RUNTIME.BINDING_INVALID\", \"Unable to determine pg binding type from pg input; use binding with explicit kind\", {\n\t\tfix: \"Pass `binding: { kind: \\\"pgPool\\\", pool }` or `binding: { kind: \\\"pgClient\\\", client }` instead of `pg`.\",\n\t\tmeta: {\n\t\t\textension: \"postgres\",\n\t\t\treason: \"unrecognizable pg object\"\n\t\t}\n\t});\n}\nfunction resolveOptionalPostgresBinding(options) {\n\tif (Number(options.binding !== void 0) + Number(options.url !== void 0) + Number(options.pg !== void 0) === 0) return;\n\treturn resolvePostgresBinding(options);\n}\n//#endregion\n//#region src/runtime/postgres.ts\nfunction hasContractJson(options) {\n\treturn \"contractJson\" in options;\n}\nconst contractSerializer = new PostgresContractSerializer();\nfunction resolveContract(options) {\n\tconst contractJson = hasContractJson(options) ? options.contractJson : contractSerializer.serializeContract(options.contract);\n\treturn blindCast(contractSerializer.deserializeContract(contractJson));\n}\nfunction toRuntimeBinding(binding, options) {\n\tif (binding.kind !== \"url\") return binding;\n\treturn {\n\t\tkind: \"pgPool\",\n\t\tpool: suppressIdleConnectionErrors(new Pool({\n\t\t\tconnectionString: binding.url,\n\t\t\tconnectionTimeoutMillis: options.poolOptions?.connectionTimeoutMillis ?? 2e4,\n\t\t\tidleTimeoutMillis: options.poolOptions?.idleTimeoutMillis ?? 3e4\n\t\t}))\n\t};\n}\nfunction postgres(options) {\n\tconst contract = resolveContract(options);\n\tlet binding = resolveOptionalPostgresBinding(options);\n\tconst stack = createSqlExecutionStack({\n\t\ttarget: postgresTarget,\n\t\tadapter: postgresAdapter,\n\t\tdriver: postgresDriver,\n\t\textensions: options.extensions ?? []\n\t});\n\tconst context = createExecutionContext({\n\t\tcontract,\n\t\tstack,\n\t\tdriver: postgresDriver\n\t});\n\tconst { sql: sql$1, raw: rawSqlTag, enums, nativeEnums } = buildPostgresStaticContext(context, stack.adapter.rawCodecInferer);\n\tlet runtimeInstance;\n\tlet runtimeDriver;\n\tlet driverConnected = false;\n\tlet connectPromise;\n\tlet backgroundConnectError;\n\tlet closed = false;\n\tlet ownedDispose;\n\tconst connectDriver = async (resolvedBinding) => {\n\t\tif (driverConnected) return;\n\t\tif (!runtimeDriver) throw new InternalError(\"Postgres runtime driver missing\");\n\t\tif (connectPromise) return connectPromise;\n\t\tconst runtimeBinding = toRuntimeBinding(resolvedBinding, options);\n\t\tif (resolvedBinding.kind === \"url\" && runtimeBinding.kind === \"pgPool\") {\n\t\t\tconst pool = runtimeBinding.pool;\n\t\t\tlet disposed = false;\n\t\t\townedDispose = async () => {\n\t\t\t\tif (disposed) return;\n\t\t\t\tdisposed = true;\n\t\t\t\tawait pool.end().then(() => void 0);\n\t\t\t};\n\t\t}\n\t\tconnectPromise = runtimeDriver.connect(runtimeBinding).then(() => {\n\t\t\tdriverConnected = true;\n\t\t}).catch(async (err) => {\n\t\t\tbackgroundConnectError = err;\n\t\t\tconnectPromise = void 0;\n\t\t\tawait ownedDispose?.().catch(() => void 0);\n\t\t\tthrow err;\n\t\t});\n\t\treturn connectPromise;\n\t};\n\tconst getRuntime = () => {\n\t\tif (closed) throw postgresError(\"DRIVER.NOT_CONNECTED\", \"Postgres client is closed\", {\n\t\t\twhy: \"close() was called on this client.\",\n\t\t\tfix: \"Create a new postgres(...) client.\",\n\t\t\tmeta: { extension: \"postgres\" }\n\t\t});\n\t\tif (backgroundConnectError !== void 0) throw backgroundConnectError;\n\t\tif (runtimeInstance) return runtimeInstance;\n\t\tconst stackInstance = instantiateExecutionStack(stack);\n\t\tconst driverDescriptor = stack.driver;\n\t\tif (!driverDescriptor) throw new InternalError(\"Driver descriptor missing from execution stack\");\n\t\tconst driver = driverDescriptor.create({ cursor: { disabled: true } });\n\t\truntimeDriver = driver;\n\t\tif (binding !== void 0) connectDriver(binding).catch(() => void 0);\n\t\truntimeInstance = new PostgresRuntimeImpl({\n\t\t\tcontext,\n\t\t\tadapter: stackInstance.adapter,\n\t\t\tdriver,\n\t\t\t...ifDefined(\"verifyMarker\", options.verifyMarker),\n\t\t\t...ifDefined(\"middleware\", options.middleware)\n\t\t});\n\t\treturn runtimeInstance;\n\t};\n\tconst orm$1 = orm({\n\t\truntime: {\n\t\t\tquery(plan) {\n\t\t\t\treturn getRuntime().query(plan);\n\t\t\t},\n\t\t\texecute(plan) {\n\t\t\t\treturn getRuntime().execute(plan);\n\t\t\t},\n\t\t\tconnection() {\n\t\t\t\treturn getRuntime().connection();\n\t\t\t}\n\t\t},\n\t\tcontext\n\t});\n\tfunction prepare(declaration, callback) {\n\t\treturn prepareQuery(getRuntime(), declaration, callback);\n\t}\n\treturn {\n\t\tsql: sql$1,\n\t\torm: orm$1,\n\t\tenums,\n\t\tnativeEnums,\n\t\traw: rawSqlTag,\n\t\tcontext,\n\t\tcontract,\n\t\tstack,\n\t\tasync connect(bindingInput) {\n\t\t\tif (closed) throw postgresError(\"DRIVER.NOT_CONNECTED\", \"Postgres client is closed\", {\n\t\t\t\twhy: \"close() was called on this client.\",\n\t\t\t\tfix: \"Create a new postgres(...) client.\",\n\t\t\t\tmeta: { extension: \"postgres\" }\n\t\t\t});\n\t\t\tif (driverConnected || connectPromise) throw postgresError(\"DRIVER.ALREADY_CONNECTED\", \"Postgres client already connected\", {\n\t\t\t\tfix: \"Call connect() at most once per client.\",\n\t\t\t\tmeta: { extension: \"postgres\" }\n\t\t\t});\n\t\t\tif (bindingInput !== void 0) binding = resolvePostgresBinding(bindingInput);\n\t\t\tif (binding === void 0) throw postgresError(\"RUNTIME.BINDING_MISSING\", \"Postgres binding not configured. Pass url/pg/binding to postgres(...) or call db.connect({ ... }).\", { meta: { extension: \"postgres\" } });\n\t\t\tconst runtime = getRuntime();\n\t\t\tif (driverConnected) return runtime;\n\t\t\tawait connectDriver(binding);\n\t\t\treturn runtime;\n\t\t},\n\t\truntime() {\n\t\t\treturn getRuntime();\n\t\t},\n\t\tprepare,\n\t\ttransaction(fn) {\n\t\t\treturn withTransaction(getRuntime(), (txCtx) => {\n\t\t\t\tconst rawCodecInferer = stack.adapter.rawCodecInferer;\n\t\t\t\tconst txSql = sql({\n\t\t\t\t\tcontext,\n\t\t\t\t\trawCodecInferer\n\t\t\t\t});\n\t\t\t\tconst txOrm = orm({\n\t\t\t\t\truntime: {\n\t\t\t\t\t\tquery(plan) {\n\t\t\t\t\t\t\treturn txCtx.query(plan);\n\t\t\t\t\t\t},\n\t\t\t\t\t\texecute(plan) {\n\t\t\t\t\t\t\treturn txCtx.execute(plan);\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tcontext\n\t\t\t\t});\n\t\t\t\treturn fn(Object.assign(castAs(Object.create(txCtx)), {\n\t\t\t\t\tsql: txSql,\n\t\t\t\t\torm: txOrm,\n\t\t\t\t\tenums,\n\t\t\t\t\tnativeEnums\n\t\t\t\t}));\n\t\t\t});\n\t\t},\n\t\tasync close() {\n\t\t\tif (closed) return;\n\t\t\tclosed = true;\n\t\t\tawait connectPromise?.catch(() => void 0);\n\t\t\tawait ownedDispose?.();\n\t\t},\n\t\t[Symbol.asyncDispose]() {\n\t\t\treturn this.close();\n\t\t}\n\t};\n}\n//#endregion\nexport { PostgresRuntimeImpl, buildNamespacedNativeEnums, postgres as default, isPgClient, isPgPool };\n\n//# sourceMappingURL=runtime.mjs.map"],"mappings":";;;;;;;;;;;;;;;AAeA,MAAM,YAAY,OAAO,gBAAgB,MAAM,eAAe,MAAM,kBAAkB;AACtF,MAAM,cAAc,OAAO,sBAAsB,MAAM,mBAAmB;AAC1E,SAAS,oBAAoB,KAAK;CACjC,MAAM,UAAU,IAAI,KAAK;CACzB,IAAI,QAAQ,WAAW,GAAG,MAAM,cAAc,2BAA2B,2CAA2C,EAAE,MAAM;EAC3H,WAAW;EACX,QAAQ;CACT,EAAE,CAAC;CACH,IAAI;CACJ,IAAI;EACH,SAAS,IAAI,IAAI,OAAO;CACzB,QAAQ;EACP,MAAM,cAAc,2BAA2B,oCAAoC,EAAE,MAAM;GAC1F,WAAW;GACX,QAAQ;EACT,EAAE,CAAC;CACJ;CACA,IAAI,OAAO,aAAa,eAAe,OAAO,aAAa,eAAe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MAAM,EAAE,WAAW,WAAW;GAC/B,CAAC;GACD,IAAI,mBAAmB,gBAAgB,MAAM,cAAc,4BAA4B,qCAAqC;IAC3H,KAAK;IACL,MAAM,EAAE,WAAW,WAAW;GAC/B,CAAC;GACD,IAAI,iBAAiB,KAAK,GAAG,UAAU,uBAAuB,YAAY;GAC1E,IAAI,YAAY,KAAK,GAAG,MAAM,cAAc,2BAA2B,sGAAsG,EAAE,MAAM,EAAE,WAAW,WAAW,EAAE,CAAC;GAChN,MAAM,UAAU,WAAW;GAC3B,IAAI,iBAAiB,OAAO;GAC5B,MAAM,cAAc,OAAO;GAC3B,OAAO;EACR;EACA,UAAU;GACT,OAAO,WAAW;EACnB;EACA;EACA,YAAY,IAAI;GACf,OAAO,gBAAgB,WAAW,IAAI,UAAU;IAC/C,MAAM,kBAAkB,MAAM,QAAQ;IACtC,MAAM,QAAQ,IAAI;KACjB;KACA;IACD,CAAC;IACD,MAAM,QAAQ,IAAI;KACjB,SAAS;MACR,MAAM,MAAM;OACX,OAAO,MAAM,MAAM,IAAI;MACxB;MACA,QAAQ,MAAM;OACb,OAAO,MAAM,QAAQ,IAAI;MAC1B;KACD;KACA;IACD,CAAC;IACD,OAAO,GAAG,OAAO,OAAO,OAAO,OAAO,OAAO,KAAK,CAAC,GAAG;KACrD,KAAK;KACL,KAAK;KACL;KACA;IACD,CAAC,CAAC;GACH,CAAC;EACF;EACA,MAAM,QAAQ;GACb,IAAI,QAAQ;GACZ,SAAS;GACT,MAAM,gBAAgB,YAAY,KAAK,CAAC;GACxC,MAAM,eAAe;EACtB;EACA,CAAC,OAAO,gBAAgB;GACvB,OAAO,KAAK,MAAM;EACnB;CACD;AACD"}
@@ -1,5 +1,5 @@
1
1
  import { t as postgresError } from "./errors-DfWK9xep-CYOOg0sB.mjs";
2
- import { t as PostgresRuntimeImpl } from "./postgres-runtime-GybTEgP4-DpGY305_.mjs";
2
+ import { t as PostgresRuntimeImpl } from "./postgres-runtime-oM2EIAjm-CZIDUstk.mjs";
3
3
  import { ifDefined } from "@prisma/orm-framework/utils/defined";
4
4
  import { InternalError } from "@prisma/orm-framework/utils/internal-error";
5
5
  import postgresAdapter from "@prisma/orm-target-postgres/adapter/runtime";
@@ -1 +1 @@
1
- {"version":3,"file":"serverless.mjs","names":[],"sources":["../../../../3-extensions/postgres/dist/serverless.mjs"],"sourcesContent":["import { t as postgresError } from \"./errors-DfWK9xep.mjs\";\nimport { t as PostgresRuntimeImpl } from \"./postgres-runtime-GybTEgP4.mjs\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport postgresAdapter from \"@internal/adapter-postgres/runtime\";\nimport postgresDriver, { suppressIdleConnectionErrors } from \"@internal/driver-postgres/runtime\";\nimport { instantiateExecutionStack } from \"@internal/framework-components/execution\";\nimport { sql } from \"@internal/sql-builder/runtime\";\nimport { createExecutionContext, createSqlExecutionStack } from \"@internal/sql-runtime\";\nimport postgresTarget, { PostgresContractSerializer } from \"@internal/target-postgres/runtime\";\nimport { Client } from \"pg\";\n//#region src/runtime/postgres-serverless.ts\nfunction hasContractJson(options) {\n\treturn \"contractJson\" in options;\n}\nconst contractSerializer = new PostgresContractSerializer();\nfunction resolveContract(options) {\n\tconst contractJson = hasContractJson(options) ? options.contractJson : contractSerializer.serializeContract(options.contract);\n\treturn contractSerializer.deserializeContract(contractJson);\n}\nfunction validateConnectionString(url) {\n\tconst trimmed = url.trim();\n\tif (trimmed.length === 0) throw postgresError(\"RUNTIME.BINDING_INVALID\", \"Postgres URL must be a non-empty string\", { meta: {\n\t\textension: \"postgres\",\n\t\treason: \"empty url\"\n\t} });\n\treturn trimmed;\n}\nfunction postgresServerless(options) {\n\tconst contract = resolveContract(options);\n\tconst stack = createSqlExecutionStack({\n\t\ttarget: postgresTarget,\n\t\tadapter: postgresAdapter,\n\t\tdriver: postgresDriver,\n\t\textensions: options.extensions ?? []\n\t});\n\tconst context = createExecutionContext({\n\t\tcontract,\n\t\tstack\n\t});\n\treturn {\n\t\tsql: sql({\n\t\t\tcontext,\n\t\t\trawCodecInferer: stack.adapter.rawCodecInferer\n\t\t}),\n\t\tcontext,\n\t\tstack,\n\t\tcontract,\n\t\tasync connect(binding) {\n\t\t\tconst url = validateConnectionString(binding.url);\n\t\t\tconst driverDescriptor = stack.driver;\n\t\t\tif (!driverDescriptor) throw new InternalError(\"Driver descriptor missing from execution stack\");\n\t\t\tconst stackInstance = instantiateExecutionStack(stack);\n\t\t\tconst driver = driverDescriptor.create({ ...ifDefined(\"cursor\", options.cursor) });\n\t\t\tconst client = suppressIdleConnectionErrors(new Client({ connectionString: url }));\n\t\t\tawait driver.connect({\n\t\t\t\tkind: \"pgClient\",\n\t\t\t\tclient\n\t\t\t});\n\t\t\tlet runtime;\n\t\t\ttry {\n\t\t\t\truntime = new PostgresRuntimeImpl({\n\t\t\t\t\tcontext,\n\t\t\t\t\tadapter: stackInstance.adapter,\n\t\t\t\t\tdriver,\n\t\t\t\t\t...ifDefined(\"verifyMarker\", options.verifyMarker),\n\t\t\t\t\t...ifDefined(\"middleware\", options.middleware)\n\t\t\t\t});\n\t\t\t} catch (err) {\n\t\t\t\tawait driver.close().catch(() => void 0);\n\t\t\t\tthrow err;\n\t\t\t}\n\t\t\tObject.defineProperty(runtime, Symbol.asyncDispose, {\n\t\t\t\tvalue: () => runtime.close(),\n\t\t\t\tconfigurable: true,\n\t\t\t\twritable: false,\n\t\t\t\tenumerable: false\n\t\t\t});\n\t\t\treturn runtime;\n\t\t}\n\t};\n}\n//#endregion\nexport { postgresServerless as default };\n\n//# sourceMappingURL=serverless.mjs.map"],"mappings":";;;;;;;;;;;;AAYA,SAAS,gBAAgB,SAAS;CACjC,OAAO,kBAAkB;AAC1B;AACA,MAAM,qBAAqB,IAAI,2BAA2B;AAC1D,SAAS,gBAAgB,SAAS;CACjC,MAAM,eAAe,gBAAgB,OAAO,IAAI,QAAQ,eAAe,mBAAmB,kBAAkB,QAAQ,QAAQ;CAC5H,OAAO,mBA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ACV,YAAY;GACb,CAAC;GACD,OAAO;EACR;CACD;AACD"}
1
+ {"version":3,"file":"serverless.mjs","names":[],"sources":["../../../../3-extensions/postgres/dist/serverless.mjs"],"sourcesContent":["import { t as postgresError } from \"./errors-DfWK9xep.mjs\";\nimport { t as PostgresRuntimeImpl } from \"./postgres-runtime-oM2EIAjm.mjs\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport postgresAdapter from \"@internal/adapter-postgres/runtime\";\nimport postgresDriver, { suppressIdleConnectionErrors } from \"@internal/driver-postgres/runtime\";\nimport { instantiateExecutionStack } from \"@internal/framework-components/execution\";\nimport { sql } from \"@internal/sql-builder/runtime\";\nimport { createExecutionContext, createSqlExecutionStack } from \"@internal/sql-runtime\";\nimport postgresTarget, { PostgresContractSerializer } from \"@internal/target-postgres/runtime\";\nimport { Client } from \"pg\";\n//#region src/runtime/postgres-serverless.ts\nfunction hasContractJson(options) {\n\treturn \"contractJson\" in options;\n}\nconst contractSerializer = new PostgresContractSerializer();\nfunction resolveContract(options) {\n\tconst contractJson = hasContractJson(options) ? options.contractJson : contractSerializer.serializeContract(options.contract);\n\treturn contractSerializer.deserializeContract(contractJson);\n}\nfunction validateConnectionString(url) {\n\tconst trimmed = url.trim();\n\tif (trimmed.length === 0) throw postgresError(\"RUNTIME.BINDING_INVALID\", \"Postgres URL must be a non-empty string\", { meta: {\n\t\textension: \"postgres\",\n\t\treason: \"empty url\"\n\t} });\n\treturn trimmed;\n}\nfunction postgresServerless(options) {\n\tconst contract = resolveContract(options);\n\tconst stack = createSqlExecutionStack({\n\t\ttarget: postgresTarget,\n\t\tadapter: postgresAdapter,\n\t\tdriver: postgresDriver,\n\t\textensions: options.extensions ?? []\n\t});\n\tconst context = createExecutionContext({\n\t\tcontract,\n\t\tstack\n\t});\n\treturn {\n\t\tsql: sql({\n\t\t\tcontext,\n\t\t\trawCodecInferer: stack.adapter.rawCodecInferer\n\t\t}),\n\t\tcontext,\n\t\tstack,\n\t\tcontract,\n\t\tasync connect(binding) {\n\t\t\tconst url = validateConnectionString(binding.url);\n\t\t\tconst driverDescriptor = stack.driver;\n\t\t\tif (!driverDescriptor) throw new InternalError(\"Driver descriptor missing from execution stack\");\n\t\t\tconst stackInstance = instantiateExecutionStack(stack);\n\t\t\tconst driver = driverDescriptor.create({ ...ifDefined(\"cursor\", options.cursor) });\n\t\t\tconst client = suppressIdleConnectionErrors(new Client({ connectionString: url }));\n\t\t\tawait driver.connect({\n\t\t\t\tkind: \"pgClient\",\n\t\t\t\tclient\n\t\t\t});\n\t\t\tlet runtime;\n\t\t\ttry {\n\t\t\t\truntime = new PostgresRuntimeImpl({\n\t\t\t\t\tcontext,\n\t\t\t\t\tadapter: stackInstance.adapter,\n\t\t\t\t\tdriver,\n\t\t\t\t\t...ifDefined(\"verifyMarker\", options.verifyMarker),\n\t\t\t\t\t...ifDefined(\"middleware\", options.middleware)\n\t\t\t\t});\n\t\t\t} catch (err) {\n\t\t\t\tawait driver.close().catch(() => void 0);\n\t\t\t\tthrow err;\n\t\t\t}\n\t\t\tObject.defineProperty(runtime, Symbol.asyncDispose, {\n\t\t\t\tvalue: () => runtime.close(),\n\t\t\t\tconfigurable: true,\n\t\t\t\twritable: false,\n\t\t\t\tenumerable: false\n\t\t\t});\n\t\t\treturn runtime;\n\t\t}\n\t};\n}\n//#endregion\nexport { postgresServerless as default };\n\n//# sourceMappingURL=serverless.mjs.map"],"mappings":";;;;;;;;;;;;AAYA,SAAS,gBAAgB,SAAS;CACjC,OAAO,kBAAkB;AAC1B;AACA,MAAM,qBAAqB,IAAI,2BAA2B;AAC1D,SAAS,gBAAgB,SAAS;CACjC,MAAM,eAAe,gBAAgB,OAAO,IAAI,QAAQ,eAAe,mBAAmB,kBAAkB,QAAQ,QAAQ;CAC5H,OAAO,mBAAmB,oBAAoB,YAAY;AAC3D;AACA,SAAS,yBAAyB,KAAK;CACtC,MAAM,UAAU,IAAI,KAAK;CACzB,IAAI,QAA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": "@prisma/orm-postgres",
3
- "version": "8.0.0-rc.11-dev.13",
3
+ "version": "8.0.0-rc.11-dev.14",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -10,20 +10,20 @@
10
10
  "skills"
11
11
  ],
12
12
  "dependencies": {
13
- "@prisma/orm-family-sql": "8.0.0-rc.11-dev.13",
14
- "@prisma/orm-framework": "8.0.0-rc.11-dev.13",
15
- "@prisma/orm-target-postgres": "8.0.0-rc.11-dev.13",
16
- "@prisma/orm-toolchain": "8.0.0-rc.11-dev.13",
13
+ "@prisma/orm-family-sql": "8.0.0-rc.11-dev.14",
14
+ "@prisma/orm-framework": "8.0.0-rc.11-dev.14",
15
+ "@prisma/orm-target-postgres": "8.0.0-rc.11-dev.14",
16
+ "@prisma/orm-toolchain": "8.0.0-rc.11-dev.14",
17
17
  "@types/node": "26.1.2",
18
18
  "@types/pg": "8.20.4",
19
19
  "pathe": "^2.0.3",
20
20
  "pg": "8.22.0"
21
21
  },
22
22
  "devDependencies": {
23
- "@internal/postgres": "8.0.0-rc.11-dev.13",
24
- "@repo/tsconfig": "8.0.0-rc.11-dev.13",
25
- "@internal/publish-surface": "8.0.0-rc.11-dev.13",
26
- "@repo/tsdown": "8.0.0-rc.11-dev.13",
23
+ "@internal/postgres": "8.0.0-rc.11-dev.14",
24
+ "@repo/tsconfig": "8.0.0-rc.11-dev.14",
25
+ "@internal/publish-surface": "8.0.0-rc.11-dev.14",
26
+ "@repo/tsdown": "8.0.0-rc.11-dev.14",
27
27
  "tsdown": "0.22.14",
28
28
  "typescript": "5.9.3",
29
29
  "vitest": "5.0.0-rc.2"
@@ -15,7 +15,7 @@ description: >-
15
15
  ORM 7 or earlier (schema.prisma + @prisma/client).
16
16
  metadata:
17
17
  library: '@prisma/orm-postgres'
18
- library_version: '8.0.0-rc.11-dev.13'
18
+ library_version: '8.0.0-rc.11-dev.14'
19
19
  version: '2026-09-12'
20
20
  ---
21
21
 
@@ -5,6 +5,9 @@ to: 8.0.0-rc.12
5
5
  changes:
6
6
  - id: params-only-sql-facade-prepare
7
7
  summary: Replace injected SQL-builder preparation callbacks with params-only callbacks and lexical facade SQL access.
8
+ - id: postgres-target-owned-list-framing
9
+ summary: |
10
+ PostgreSQL list result decoding is target-owned; direct driver reads now expose raw array literals, and fixed-scale numeric arrays return database-normalized decimal text such as `"1.5000000000"`.
8
11
  ---
9
12
 
10
13
  ## `params-only-sql-facade-prepare`
@@ -26,3 +29,7 @@ const query = await db.prepare({ id: 'pg/int4@1' }, (params) =>
26
29
  ```
27
30
 
28
31
  Apply the same translation to SQLite's flat SQL facade (`sql.users` becomes `db.sql.users`), retaining its existing codec ids. Keep `.query(target, params, options?)` and SQL statistics `.execute(target, params, options?)` calls unchanged. Do not rewrite historical release notes, applied upgrade recipes, generated contracts or tests as part of this source translation.
32
+
33
+ ## `postgres-target-owned-list-framing`
34
+
35
+ Review application code and snapshots that assert exact PostgreSQL list result spellings. Ordinary Prisma Next runtime reads still return JavaScript arrays, and builtin and enum lists now use the same raw-text-to-element-codec path. If you assert `Decimal[]` / `numeric[]` strings for fixed-scale columns, update those expectations to PostgreSQL's database-normalized scale: a `numeric(30,10)[]` element inserted as `1.5` reads as `"1.5000000000"`; scalar numeric decoding already follows this text-preserving policy. If you use lower-level Postgres driver direct-query rows, parse raw PostgreSQL array literal strings such as `'{a,b}'` instead of expecting registered builtin arrays to arrive as JavaScript arrays. Do not re-emit contracts solely for this change: codec ids, `typeParams`, and `CodecRef.many` stay unchanged.
@@ -10,6 +10,9 @@ changes:
10
10
  summary: Type ORM preparation descriptions with the shared compositional Preparable protocol and pass their contained plan to SQL runtime.
11
11
  - id: params-only-sql-facade-prepare
12
12
  summary: Replace injected SQL-builder preparation callbacks with params-only callbacks and lexical facade SQL access.
13
+ - id: postgres-list-element-codecs-receive-raw-strings
14
+ summary: |
15
+ PostgreSQL list decoding now parses array frames in the target and passes raw string elements to the scalar element codec; custom PostgreSQL codecs used in lists must accept those raw element spellings.
13
16
  - id: preserve-prepared-reference-nullability
14
17
  summary: Preserve declaration nullability when constructing or cloning PreparedParamRef AST nodes.
15
18
  - id: preserve-orm-pagination-expressions
@@ -55,3 +58,7 @@ const query = await db.prepare({ id: 'pg/int4@1' }, (params) =>
55
58
  ```
56
59
 
57
60
  Apply the same translation to SQLite's flat SQL facade (`sql.users` becomes `db.sql.users`), retaining its existing codec ids. Keep `.query(target, params, options?)` and SQL statistics `.execute(target, params, options?)` calls unchanged. Do not rewrite historical release notes, applied upgrade recipes, generated contracts or tests as part of this source translation.
61
+
62
+ ## `postgres-list-element-codecs-receive-raw-strings`
63
+
64
+ Review PostgreSQL extension codecs whose descriptors can be used by `CodecRef.many` list columns. Inbound list framing is now target-owned: the target parses the Postgres array literal and invokes the scalar element codec for each non-null raw string element. Keep scalar direct-query compatibility as needed, but make the element `decode(wire, ctx)` accept the raw text spelling Postgres emits for that scalar value; the built-in numeric, boolean, integer, and float codecs accept both raw strings and native scalar wire values for this reason. Do not add a native-array fallback at the list-frame boundary, and do not add compatibility exports or codec-id aliases. `codecId`, `typeParams`, and emitted `CodecRef.many` shapes are unchanged.
@@ -1,7 +0,0 @@
1
- import { SqlRuntimeBase } from "@prisma/orm-family-sql/runtime";
2
- //#region ../../../3-extensions/postgres/dist/postgres-runtime-GybTEgP4.mjs
3
- var PostgresRuntimeImpl = class extends SqlRuntimeBase {};
4
- //#endregion
5
- export { PostgresRuntimeImpl as t };
6
-
7
- //# sourceMappingURL=postgres-runtime-GybTEgP4-DpGY305_.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"postgres-runtime-GybTEgP4-DpGY305_.mjs","names":[],"sources":["../../../../3-extensions/postgres/dist/postgres-runtime-GybTEgP4.mjs"],"sourcesContent":["import { SqlRuntimeBase } from \"@internal/sql-runtime\";\n//#region src/runtime/postgres-runtime.ts\nvar PostgresRuntimeImpl = class extends SqlRuntimeBase {};\n//#endregion\nexport { PostgresRuntimeImpl as t };\n\n//# sourceMappingURL=postgres-runtime-GybTEgP4.mjs.map"],"mappings":";;AAEA,IAAI,sBAAsB,cAAc,eAAe,CAAC"}