@prisma/orm-family-sql 8.0.0-rc.11-dev.12 → 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.
@@ -18,7 +18,7 @@ import { Contract, JsonValue, PlanMeta } from "@prisma/orm-framework/contract/ty
18
18
  import { AfterExecuteResult, AfterQueryResult, AsyncIterableResult, ExecuteInterceptResult, ExecutionPlan, QueryInterceptResult, RuntimeCore, RuntimeExecuteOptions, RuntimeLog, RuntimeMiddleware, RuntimeMiddlewareContext } from "@prisma/orm-framework/components/runtime";
19
19
  import { AnyCodecDescriptor, CodecDescriptor } from "@prisma/orm-framework/components/codec";
20
20
  import { ExecutionStack, RuntimeAdapterDescriptor, RuntimeAdapterInstance, RuntimeDriverDescriptor, RuntimeDriverInstance, RuntimeExtensionDescriptor, RuntimeExtensionInstance, RuntimeTargetDescriptor, RuntimeTargetInstance } from "@prisma/orm-framework/components/execution";
21
- //#region ../../../2-sql/5-runtime/dist/prepared-statement-9QpkE6JG.d.mts
21
+ //#region ../../../2-sql/5-runtime/dist/prepared-statement-DZtymlzd.d.mts
22
22
  //#region src/codecs/encoding.d.ts
23
23
  interface ParamMetadata {
24
24
  readonly codec: CodecRef$1 | undefined;
@@ -124,6 +124,7 @@ type ColumnRef = {
124
124
  table: string;
125
125
  column: string;
126
126
  };
127
+ type ListDecoder = (wireValue: unknown, decodeElement: (value: unknown) => Promise<unknown>) => Promise<readonly unknown[]> | readonly unknown[];
127
128
  interface DecodeContext {
128
129
  readonly aliases: ReadonlyArray<string> | undefined;
129
130
  readonly codecs: ReadonlyMap<string, Codec$1>;
@@ -459,6 +460,7 @@ declare abstract class SqlRuntimeBase<TContract extends Contract<SqlStorage> = C
459
460
  */
460
461
  protected acquireRawConnection(): Promise<SqlConnection>;
461
462
  private setupDriverExecution;
463
+ protected getListDecoder(): ListDecoder;
462
464
  private streamRows;
463
465
  private createQueryContexts;
464
466
  private prepareQueryExecution;
@@ -525,5 +527,5 @@ declare class PreparedExecutionImpl<Params> implements PreparedExecution<Params>
525
527
  execute(target: RuntimeQueryable, params: Params, options?: RuntimeExecuteOptions): Promise<SqlStatementStats>;
526
528
  }
527
529
  //#endregion
528
- export { SqlMiddlewareContext as A, TransactionContext as B, RuntimeParameterizedCodecDescriptor as C, SqlExecutionStack as D, RuntimeTransaction as E, SqlRuntimeExtensionDescriptor as F, encodeParamsWithMetadata as G, createExecutionContext as H, SqlRuntimeExtensionInstance as I, withTransaction as J, preparedStatementExecute as K, SqlRuntimeTargetDescriptor as L, SqlRuntimeAdapterInstance as M, SqlRuntimeBase as N, SqlExecutionStackWithDriver as O, SqlRuntimeDriverInstance as P, SqlStaticContributions as R, RuntimeMutationDefaultGenerator as S, RuntimeTelemetryEvent as T, createSqlExecutionStack as U, VerifyMarkerOption as V, deriveParamMetadata as W, PreparedStatementInternals as _, DeclaredNullable as a, RuntimeConnection as b, ParamSpec as c, PreparedExecution as d, PreparedExecutionImpl as f, PreparedStatementImpl as g, PreparedStatementExecuteTarget as h, DeclaredCodecId as i, SqlRuntimeAdapterDescriptor as j, SqlMiddleware as k, ParamsFromDeclaration as l, PreparedStatement as m, ConnectionProvider as n, GeneratorStability as o, PreparedFor as p, preparedStatementQuery as q, Declaration as r, MarkerReader as s, BindSiteParams as t, PrepareCallback as u, PreparedStatementQueryTarget as v, RuntimeQueryable as w, RuntimeFamilyAdapter as x, Runtime as y, TelemetryOutcome as z };
529
- //# sourceMappingURL=prepared-statement-9QpkE6JG-3LY-d6pU.d.mts.map
530
+ export { SqlMiddleware as A, TelemetryOutcome as B, RuntimeOptions as C, RuntimeTransaction as D, RuntimeTelemetryEvent as E, SqlRuntimeDriverInstance as F, deriveParamMetadata as G, VerifyMarkerOption as H, SqlRuntimeExtensionDescriptor as I, preparedStatementQuery as J, encodeParamsWithMetadata as K, SqlRuntimeExtensionInstance as L, SqlRuntimeAdapterDescriptor as M, SqlRuntimeAdapterInstance as N, SqlExecutionStack as O, SqlRuntimeBase as P, SqlRuntimeTargetDescriptor as R, RuntimeMutationDefaultGenerator as S, RuntimeQueryable as T, createExecutionContext as U, TransactionContext as V, createSqlExecutionStack as W, withTransaction as Y, PreparedStatementInternals as _, DeclaredNullable as a, RuntimeConnection as b, ParamSpec as c, PreparedExecution as d, PreparedExecutionImpl as f, PreparedStatementImpl as g, PreparedStatementExecuteTarget as h, DeclaredCodecId as i, SqlMiddlewareContext as j, SqlExecutionStackWithDriver as k, ParamsFromDeclaration as l, PreparedStatement as m, ConnectionProvider as n, GeneratorStability as o, PreparedFor as p, preparedStatementExecute as q, Declaration as r, MarkerReader as s, BindSiteParams as t, PrepareCallback as u, PreparedStatementQueryTarget as v, RuntimeParameterizedCodecDescriptor as w, RuntimeFamilyAdapter as x, Runtime as y, SqlStaticContributions as z };
531
+ //# sourceMappingURL=prepared-statement-DZtymlzd-De0k07Cc.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prepared-statement-DZtymlzd-De0k07Cc.d.mts","names":[],"sources":["../../../../2-sql/5-runtime/dist/prepared-statement-DZtymlzd.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;UAaU;WACC,OAAO;WACP;;iBAEM,oBAAoB,KAAK,uBAAuB;iBAChD,yBAAyB,4BAA4B,mBAAmB,iBAAiB,KAAK,qBAAqB,iBAAiB,wBAAwB;;;UAGnK,6BAA6B;WAC5B,UAAU,SAAS;;;;;;UAMpB;WACC,KAAK;WACL,MAAM;;UAEP,cAAc,kBAAkB,0BAA0B,iCAAiC,kBAAkB,kBAAkB,mBAAmB;WACjJ;;;;;;;;;;;;;;;;;;;EAmBT,eAAe,OAAO,WAAW,KAAK,uBAAuB,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;EA0BrE,aAAa,MAAM,kBAAkB,KAAK,sBAAsB,SAAS,mBAAmB,oBAAoB;EAChH,gBAAgB,MAAM,kBAAkB,KAAK,uBAAuB,QAAQ;EAC5E,OAAO,KAAK,yBAAyB,MAAM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WACjF;WACA,KAAK;WACL,MAAM;WACN,gBAAgB;WAChB,eAAe;WACf,wBAAwB;EACjC,YAAY,WAAW;EACvB,MAAM,QAAQ,kBAAkB,QAAQ,QAAQ,UAAU,wBAAwB,oBAAoB;;;;;;;;;;cAU1F,sBAAsB,mBAAmB,kBAAkB,SAAS;WACvE;WACA,KAAK;WACL,MAAM;WACN,gBAAgB;WAChB,eAAe;WACf,wBAAwB;EACjC,YAAY,WAAW;EACvB,QAAQ,QAAQ,kBAAkB,QAAQ,QAAQ,UAAU,wBAAwB,QAAQ"}
@@ -1,6 +1,6 @@
1
1
  import "./resolve-storage-table-Nyrgk4h8.mjs";
2
- import { S as RuntimeMutationDefaultGenerator } from "./prepared-statement-9QpkE6JG-3LY-d6pU.mjs";
3
- import "./index-Bkg5fqsf.mjs";
2
+ import { S as RuntimeMutationDefaultGenerator } from "./prepared-statement-DZtymlzd-De0k07Cc.mjs";
3
+ import "./index-BR7KsOHN.mjs";
4
4
  import { ResolvedDomainModel, UNBOUND_DOMAIN_NAMESPACE_ID, resolveDomainModel } from "@prisma/orm-framework/contract/types";
5
5
  import { RuntimeFamilyDescriptor, RuntimeFamilyInstance } from "@prisma/orm-framework/components/execution";
6
6
  //#region ../../../2-sql/9-family/dist/runtime.d.mts
@@ -44,4 +44,4 @@ declare const sqlRuntimeFamilyDescriptor: RuntimeFamilyDescriptor<'sql', SqlRunt
44
44
  declare function timestampNowRuntimeGenerator(): RuntimeMutationDefaultGenerator;
45
45
  //#endregion
46
46
  export { timestampNowRuntimeGenerator as a, sqlRuntimeFamilyDescriptor as i, UNBOUND_DOMAIN_NAMESPACE_ID as n, resolveDomainModel as r, ResolvedDomainModel as t };
47
- //# sourceMappingURL=runtime-BhA8jUsk.d.mts.map
47
+ //# sourceMappingURL=runtime-CFokmlux.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"runtime-BhA8jUsk.d.mts","names":[],"sources":["../../../../2-sql/9-family/dist/runtime.d.mts"],"mappings":";;;;;;;;;;;;;;;UAaU,iCAAiC;;;;;;;;;;;cAW7B,4BAA4B,+BAA+B;;;;;;;;;;;;;;;;;iBAiBxD,gCAAgC"}
1
+ {"version":3,"file":"runtime-CFokmlux.d.mts","names":[],"sources":["../../../../2-sql/9-family/dist/runtime.d.mts"],"mappings":";;;;;;;;;;;;;;;UAaU,iCAAiC;;;;;;;;;;;cAW7B,4BAA4B,+BAA+B;;;;;;;;;;;;;;;;;iBAiBxD,gCAAgC"}
@@ -1,5 +1,5 @@
1
1
  import { o as MarkerReadResult } from "./ast-BAsreJBG.mjs";
2
2
  import { d as TypeHelperRegistry, r as ExecutionContext } from "./query-lane-context-cqWxvUWZ-DU48PEoC.mjs";
3
- import { A as SqlMiddlewareContext, B as TransactionContext, C as RuntimeParameterizedCodecDescriptor, D as SqlExecutionStack, E as RuntimeTransaction, F as SqlRuntimeExtensionDescriptor, G as encodeParamsWithMetadata, H as createExecutionContext, I as SqlRuntimeExtensionInstance, J as withTransaction, L as SqlRuntimeTargetDescriptor, M as SqlRuntimeAdapterInstance, N as SqlRuntimeBase, O as SqlExecutionStackWithDriver, P as SqlRuntimeDriverInstance, R as SqlStaticContributions, S as RuntimeMutationDefaultGenerator, T as RuntimeTelemetryEvent, U as createSqlExecutionStack, V as VerifyMarkerOption, W as deriveParamMetadata, _ as PreparedStatementInternals, a as DeclaredNullable, b as RuntimeConnection, c as ParamSpec, d as PreparedExecution, f as PreparedExecutionImpl, g as PreparedStatementImpl, i as DeclaredCodecId, j as SqlRuntimeAdapterDescriptor, k as SqlMiddleware, l as ParamsFromDeclaration, m as PreparedStatement, n as ConnectionProvider, o as GeneratorStability, p as PreparedFor, r as Declaration, s as MarkerReader, t as BindSiteParams, u as PrepareCallback, w as RuntimeQueryable, x as RuntimeFamilyAdapter, y as Runtime, z as TelemetryOutcome } from "./prepared-statement-9QpkE6JG-3LY-d6pU.mjs";
4
- import { a as LintsOptions, c as budgets, d as lints, f as lowerSqlPlan, i as ExecuteInterceptResult, l as createAstCodecRegistry, m as validateContractCodecMappings, n as AfterQueryResult, o as Log, p as validateCodecRegistryCompleteness, r as BudgetsOptions, s as QueryInterceptResult, t as AfterExecuteResult, u as extractCodecIds } from "./index-Bkg5fqsf.mjs";
5
- export { type AfterExecuteResult, type AfterQueryResult, type BindSiteParams, type BudgetsOptions, type ConnectionProvider, type Declaration, type DeclaredCodecId, type DeclaredNullable, type ExecuteInterceptResult, type ExecutionContext, type GeneratorStability, type LintsOptions, type Log, type MarkerReadResult, type MarkerReader, type ParamSpec, type ParamsFromDeclaration, type PrepareCallback, type PreparedExecution, PreparedExecutionImpl, type PreparedFor, type PreparedStatement, PreparedStatementImpl, type PreparedStatementInternals, type QueryInterceptResult, type Runtime, type RuntimeConnection, type RuntimeFamilyAdapter, type RuntimeMutationDefaultGenerator, type RuntimeParameterizedCodecDescriptor, type RuntimeQueryable, type RuntimeTelemetryEvent, type RuntimeTransaction, type SqlExecutionStack, type SqlExecutionStackWithDriver, type SqlMiddleware, type SqlMiddlewareContext, type SqlRuntimeAdapterDescriptor, type SqlRuntimeAdapterInstance, SqlRuntimeBase, type SqlRuntimeDriverInstance, type SqlRuntimeExtensionDescriptor, type SqlRuntimeExtensionInstance, type SqlRuntimeTargetDescriptor, type SqlStaticContributions, type TelemetryOutcome, type TransactionContext, type TypeHelperRegistry, type VerifyMarkerOption, budgets, createAstCodecRegistry, createExecutionContext, createSqlExecutionStack, deriveParamMetadata, encodeParamsWithMetadata, extractCodecIds, lints, lowerSqlPlan, validateCodecRegistryCompleteness, validateContractCodecMappings, withTransaction };
3
+ import { A as SqlMiddleware, B as TelemetryOutcome, C as RuntimeOptions, D as RuntimeTransaction, E as RuntimeTelemetryEvent, F as SqlRuntimeDriverInstance, G as deriveParamMetadata, H as VerifyMarkerOption, I as SqlRuntimeExtensionDescriptor, K as encodeParamsWithMetadata, L as SqlRuntimeExtensionInstance, M as SqlRuntimeAdapterDescriptor, N as SqlRuntimeAdapterInstance, O as SqlExecutionStack, P as SqlRuntimeBase, R as SqlRuntimeTargetDescriptor, S as RuntimeMutationDefaultGenerator, T as RuntimeQueryable, U as createExecutionContext, V as TransactionContext, W as createSqlExecutionStack, Y as withTransaction, _ as PreparedStatementInternals, a as DeclaredNullable, b as RuntimeConnection, c as ParamSpec, d as PreparedExecution, f as PreparedExecutionImpl, g as PreparedStatementImpl, i as DeclaredCodecId, j as SqlMiddlewareContext, k as SqlExecutionStackWithDriver, l as ParamsFromDeclaration, m as PreparedStatement, n as ConnectionProvider, o as GeneratorStability, p as PreparedFor, r as Declaration, s as MarkerReader, t as BindSiteParams, u as PrepareCallback, w as RuntimeParameterizedCodecDescriptor, x as RuntimeFamilyAdapter, y as Runtime, z as SqlStaticContributions } from "./prepared-statement-DZtymlzd-De0k07Cc.mjs";
4
+ import { a as LintsOptions, c as budgets, d as lints, f as lowerSqlPlan, i as ExecuteInterceptResult, l as createAstCodecRegistry, m as validateContractCodecMappings, n as AfterQueryResult, o as Log, p as validateCodecRegistryCompleteness, r as BudgetsOptions, s as QueryInterceptResult, t as AfterExecuteResult, u as extractCodecIds } from "./index-BR7KsOHN.mjs";
5
+ export { type AfterExecuteResult, type AfterQueryResult, type BindSiteParams, type BudgetsOptions, type ConnectionProvider, type Declaration, type DeclaredCodecId, type DeclaredNullable, type ExecuteInterceptResult, type ExecutionContext, type GeneratorStability, type LintsOptions, type Log, type MarkerReadResult, type MarkerReader, type ParamSpec, type ParamsFromDeclaration, type PrepareCallback, type PreparedExecution, PreparedExecutionImpl, type PreparedFor, type PreparedStatement, PreparedStatementImpl, type PreparedStatementInternals, type QueryInterceptResult, type Runtime, type RuntimeConnection, type RuntimeFamilyAdapter, type RuntimeMutationDefaultGenerator, type RuntimeOptions, type RuntimeParameterizedCodecDescriptor, type RuntimeQueryable, type RuntimeTelemetryEvent, type RuntimeTransaction, type SqlExecutionStack, type SqlExecutionStackWithDriver, type SqlMiddleware, type SqlMiddlewareContext, type SqlRuntimeAdapterDescriptor, type SqlRuntimeAdapterInstance, SqlRuntimeBase, type SqlRuntimeDriverInstance, type SqlRuntimeExtensionDescriptor, type SqlRuntimeExtensionInstance, type SqlRuntimeTargetDescriptor, type SqlStaticContributions, type TelemetryOutcome, type TransactionContext, type TypeHelperRegistry, type VerifyMarkerOption, budgets, createAstCodecRegistry, createExecutionContext, createSqlExecutionStack, deriveParamMetadata, encodeParamsWithMetadata, extractCodecIds, lints, lowerSqlPlan, validateCodecRegistryCompleteness, validateContractCodecMappings, withTransaction };
package/dist/runtime.mjs CHANGED
@@ -17,7 +17,7 @@ import { materializeCodec, resolveCodecDescriptorOrThrow } from "@prisma/orm-fra
17
17
  import { canonicalizeJson } from "@prisma/orm-framework/components/utils";
18
18
  import { createExecutionStack } from "@prisma/orm-framework/components/execution";
19
19
  import { hashContent } from "@prisma/orm-framework/utils/hash-content";
20
- //#region ../../../2-sql/5-runtime/dist/exports-BpIxtGGH.mjs
20
+ //#region ../../../2-sql/5-runtime/dist/exports-B7KsqmeZ.mjs
21
21
  /**
22
22
  * Build an {@link AstCodecResolver} bound to a descriptor registry and a per-call instance-context factory.
23
23
  *
@@ -873,6 +873,12 @@ function createExecutionContext(options) {
873
873
  applyMutationDefaults: (options) => applyMutationDefaults(contract, mutationDefaultGeneratorRegistry, options)
874
874
  };
875
875
  }
876
+ const sqlNativeArrayListDecoder = async (wireValue, decodeElement) => {
877
+ if (!Array.isArray(wireValue)) throw new TypeError(`expected an array from the driver for many-typed column, got ${typeof wireValue}`);
878
+ const decoded = [];
879
+ for (const elem of wireValue) decoded.push(await decodeElement(elem));
880
+ return decoded;
881
+ };
876
882
  const WIRE_PREVIEW_LIMIT = 100;
877
883
  const EMPTY_INCLUDE_ALIASES = /* @__PURE__ */ new Set();
878
884
  function projectionListFromAst(ast) {
@@ -977,7 +983,7 @@ function decodeIncludeAggregate(alias, wireValue) {
977
983
  if (wireValue === null || wireValue === void 0) return [];
978
984
  try {
979
985
  if (typeof wireValue === "string") return JSON.parse(wireValue);
980
- if (typeof wireValue === "object") return wireValue;
986
+ if (typeof wireValue === "object") return blindCast(wireValue);
981
987
  return JSON.parse(String(wireValue));
982
988
  } catch (error) {
983
989
  wrapIncludeAggregateFailure(error, alias, wireValue);
@@ -990,9 +996,9 @@ function decodeIncludeAggregate(alias, wireValue) {
990
996
  * The row-level `rowCtx` is repackaged into a per-cell `SqlCodecCallContext` whose `column = { table, name }` is a structural projection of the per-cell `ColumnRef = { table, column }` resolved from the AST-backed `DecodeContext` (the same resolution `wrapDecodeFailure` uses for envelope construction — one resolution per cell, two consumers). Cells the runtime cannot resolve to a single underlying column (aggregate
991
997
  * aliases, computed projections without a simple ref) get `column: undefined`, matching the spec contract that the runtime never silently defaults this field.
992
998
  *
993
- * For `many`-flagged aliases the driver has already parsed the wire form into a JS array; this function maps the element codec over that array element-by-element, passing `null` elements through unchanged. Element-level failures surface through the existing `RUNTIME.DECODE_FAILED` envelope with the column/codec context from the parent cell.
999
+ * For `many`-flagged aliases this function delegates frame traversal to the selected `ListDecoder`, passing `null` elements through unchanged and mapping the same element codec over every non-null element. SQL runtimes without a target-owned contribution select `sqlNativeArrayListDecoder` explicitly before row decoding. Element-level failures surface through the existing `RUNTIME.DECODE_FAILED` envelope with the column/codec context from the parent cell.
994
1000
  */
995
- async function decodeField(alias, wireValue, decodeCtx, rowCtx) {
1001
+ async function decodeField(alias, wireValue, decodeCtx, rowCtx, listDecoder) {
996
1002
  if (wireValue === null) return null;
997
1003
  const codec = decodeCtx.codecs.get(alias);
998
1004
  if (!codec) return wireValue;
@@ -1009,22 +1015,20 @@ async function decodeField(alias, wireValue, decodeCtx, rowCtx) {
1009
1015
  const { column: _drop, ...rowCtxWithoutColumn } = rowCtx;
1010
1016
  cellCtx = rowCtxWithoutColumn;
1011
1017
  }
1012
- if (decodeCtx.manyAliases.has(alias)) {
1013
- if (!Array.isArray(wireValue)) wrapDecodeFailure(/* @__PURE__ */ new TypeError(`expected an array from the driver for many-typed column, got ${typeof wireValue}`), alias, ref, codec, wireValue);
1014
- const decoded = [];
1015
- for (const elem of wireValue) {
1016
- if (elem === null || elem === void 0) {
1017
- decoded.push(null);
1018
- continue;
1019
- }
1020
- try {
1021
- decoded.push(await codec.decode(elem, cellCtx));
1022
- } catch (error) {
1023
- if (isStructuredError(error)) throw error;
1024
- wrapDecodeFailure(error, alias, ref, codec, elem);
1025
- }
1018
+ const decodeElement = async (elem) => {
1019
+ if (elem === null || elem === void 0) return null;
1020
+ try {
1021
+ return await codec.decode(elem, cellCtx);
1022
+ } catch (error) {
1023
+ if (isStructuredError(error)) throw error;
1024
+ wrapDecodeFailure(error, alias, ref, codec, elem);
1026
1025
  }
1027
- return decoded;
1026
+ };
1027
+ if (decodeCtx.manyAliases.has(alias)) try {
1028
+ return await listDecoder(wireValue, decodeElement);
1029
+ } catch (error) {
1030
+ if (isStructuredError(error)) throw error;
1031
+ wrapDecodeFailure(error, alias, ref, codec, wireValue);
1028
1032
  }
1029
1033
  try {
1030
1034
  return await codec.decode(wireValue, cellCtx);
@@ -1042,7 +1046,7 @@ async function decodeField(alias, wireValue, decodeCtx, rowCtx) {
1042
1046
  * - **Mid-flight aborts** race the per-cell `Promise.all` against the signal so the runtime returns promptly even when codec bodies ignore it. In-flight bodies that ignore the signal complete in the background (cooperative cancellation).
1043
1047
  * - Existing structured envelopes (any dotted-code error passing `isStructuredError`, e.g. `RUNTIME.DECODE_FAILED`) from codec bodies pass through unchanged (no double wrap).
1044
1048
  */
1045
- async function decodeRow(row, decodeCtx, rowCtx) {
1049
+ async function decodeRow(row, decodeCtx, rowCtx, listDecoder) {
1046
1050
  checkAborted(rowCtx, "decode");
1047
1051
  const signal = rowCtx.signal;
1048
1052
  const aliases = decodeCtx.aliases ?? Object.keys(row);
@@ -1060,7 +1064,7 @@ async function decodeRow(row, decodeCtx, rowCtx) {
1060
1064
  const tasks = [];
1061
1065
  const includeIndices = [];
1062
1066
  for (let i = 0; i < aliases.length; i++) {
1063
- const alias = aliases[i];
1067
+ const alias = blindCast(aliases[i]);
1064
1068
  const wireValue = row[alias];
1065
1069
  if (decodeCtx.includeAliases.has(alias)) {
1066
1070
  includeIndices.push({
@@ -1071,12 +1075,15 @@ async function decodeRow(row, decodeCtx, rowCtx) {
1071
1075
  tasks.push(Promise.resolve(void 0));
1072
1076
  continue;
1073
1077
  }
1074
- tasks.push(decodeField(alias, wireValue, decodeCtx, rowCtx));
1078
+ tasks.push(decodeField(alias, wireValue, decodeCtx, rowCtx, listDecoder));
1075
1079
  }
1076
1080
  const settled = await raceAgainstAbort(Promise.all(tasks), signal, "decode");
1077
1081
  for (const entry of includeIndices) settled[entry.index] = decodeIncludeAggregate(entry.alias, entry.value);
1078
1082
  const decoded = {};
1079
- for (let i = 0; i < aliases.length; i++) decoded[aliases[i]] = settled[i];
1083
+ for (let i = 0; i < aliases.length; i++) {
1084
+ const alias = blindCast(aliases[i]);
1085
+ decoded[alias] = settled[i];
1086
+ }
1080
1087
  return decoded;
1081
1088
  }
1082
1089
  /**
@@ -1379,6 +1386,9 @@ var SqlRuntimeBase = class extends RuntimeCore {
1379
1386
  if (this.verifyMarkerPromise === null) this.verifyMarkerPromise = this.verifyMarker();
1380
1387
  await this.verifyMarkerPromise;
1381
1388
  }
1389
+ getListDecoder() {
1390
+ return sqlNativeArrayListDecoder;
1391
+ }
1382
1392
  async *streamRows(exec, decodeContext, driverCall, codecCtx, execMiddlewareCtx) {
1383
1393
  await this.setupDriverExecution(exec);
1384
1394
  const startedAt = Date.now();
@@ -1390,7 +1400,7 @@ var SqlRuntimeBase = class extends RuntimeCore {
1390
1400
  checkAborted(codecCtx, "stream");
1391
1401
  const next = await iterator.next();
1392
1402
  if (next.done) break;
1393
- yield blindCast(await decodeRow(next.value, decodeContext, codecCtx));
1403
+ yield blindCast(await decodeRow(next.value, decodeContext, codecCtx, this.getListDecoder()));
1394
1404
  }
1395
1405
  } finally {
1396
1406
  await iterator.return?.();