@prisma/orm-family-sql 8.0.0-rc.17-dev.4 → 8.0.0-rc.17-dev.6
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/orm-client.d.mts +20 -20
- package/dist/orm-client.d.mts.map +1 -1
- package/dist/orm-client.mjs +6 -6
- package/dist/orm-client.mjs.map +1 -1
- package/package.json +18 -18
package/dist/orm-client.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orm-client.mjs","names":["#storage","#reference","#visibleBindings","#aliasCounter","#allocateBinding","#allocateAlias","#clone","#describeAggregate","#installAggregateReducers","#includeScalarReducer","#assertIncludeRefinementMode","#cloneSelf","#cloneWithRow","#createCollection","#lock","#withAnnotationsFromMeta","#dispatch","#descriptionOptions","#forFirst","#collectAnnotationsFromMeta","#reloadMutationRowByIdentity","#createAllWithAnnotations","#resolveConflictSkip","#resolveMtiCreateContext","#executeMtiCreate","#mapCreateRows","#augmentMutationSelection","#assertConflictSkipNotOnMtiVariant","#assertNotMtiVariant","#refuseOnMtiVariant","#buildUpsertConflictCriterion","#reloadMutationRowByCriterion","#withRuntime","#findFirstMatchingRowIdentityWhere","#updateAllWithAnnotations","#executeDeleteReturning","#deleteAllWithAnnotations","#executeDeleteReturningWithIncludes","#createSelf"],"sources":["../../../../3-extensions/sql-orm-client/dist/index.mjs"],"sourcesContent":["import { AsyncIterableResult, createMetaBuilder, isRuntimeError, runtimeError } from \"@internal/framework-components/runtime\";\nimport { AggregateExpr, AndExpr, BinaryExpr, CodecJsonValueProjection, ColumnRef, DefaultValueExpr, DeleteAst, DerivedTableSource, EqColJoinOn, ExistsExpr, InsertAst, InsertOnConflict, JoinAst, JsonArrayAggExpr, JsonDocumentProjection, JsonObjectExpr, ListExpression, LiteralExpr, LockingClause, NativeJsonValueProjection, NotExpr, NullCheckExpr, OrExpr, OrderByItem, ParamRef, ProjectionItem, SelectAst, SubqueryExpr, TableSource, UpdateAst, WindowFuncExpr, checkLimitOffset, collectOrderedParamRefs, isAggregateFn, isOrderByDirection, isOrderByNulls, isWhereExpr, lockIncompatible, lockOptionCapabilities, lockStrengthCapabilities, lockWaitPolicyOf, missingCapability } from \"@internal/sql-relational-core/ast\";\nimport { isExpression, toExpr } from \"@internal/sql-relational-core/expression\";\nimport { blindCast, castAs } from \"@internal/utils/casts\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { InternalError, isInternalError } from \"@internal/utils/internal-error\";\nimport { structuredError } from \"@internal/utils/structured-error\";\nimport { resolveStorageTable } from \"@internal/sql-contract/resolve-storage-table\";\nimport { codecRefForStorageColumn } from \"@internal/sql-relational-core/codec-descriptor-registry\";\nimport { assertDefined, invariant } from \"@internal/utils/assertions\";\nimport { isUniqueConstraintViolation } from \"@internal/sql-errors\";\nimport { domainModelsAtDefaultNamespace } from \"@internal/contract/types\";\n//#region src/aggregate-operations.ts\nconst operationNamesByRegistry = /* @__PURE__ */ new WeakMap();\n/**\n* The operation vocabulary the composed registry contributes, in contribution\n* order — the runtime mirror of the contract's emitted aggregate map, both\n* settled from the same contributed descriptors. Cached per registry: the set\n* is fixed at composition time, and every collection construction reads it.\n*/\nfunction aggregateOperationNames(registry) {\n\tconst cached = operationNamesByRegistry.get(registry);\n\tif (cached !== void 0) return cached;\n\tconst names = [];\n\tconst seen = /* @__PURE__ */ new Set();\n\tfor (const { operation } of registry.values()) {\n\t\tif (seen.has(operation)) continue;\n\t\tseen.add(operation);\n\t\tnames.push(operation);\n\t}\n\toperationNamesByRegistry.set(registry, names);\n\treturn names;\n}\n//#endregion\n//#region src/orm-errors.ts\nfunction ormError(code, message, options) {\n\treturn structuredError(code, message, options);\n}\n//#endregion\n//#region src/storage-resolution.ts\nfunction resolveTableForContract(contract, namespaceId, tableName) {\n\treturn resolveStorageTable(contract.storage, tableName, namespaceId);\n}\nfunction requireStorageTableForContract(contract, namespaceId, tableName) {\n\tconst resolved = resolveTableForContract(contract, namespaceId, tableName);\n\tif (resolved === void 0) throw ormError(\"ORM.TABLE_UNKNOWN\", `Unknown table \"${tableName}\"`, { meta: {\n\t\tnamespaceId,\n\t\ttableName\n\t} });\n\treturn resolved;\n}\nfunction storageTableForContract(contract, namespaceId, tableName) {\n\treturn requireStorageTableForContract(contract, namespaceId, tableName).table;\n}\nfunction domainModelNamesInNamespace(contract, namespaceId) {\n\tconst namespace = contract.domain.namespaces[namespaceId];\n\treturn namespace ? Object.keys(namespace.models) : [];\n}\nfunction domainModelTableInNamespace(contract, namespaceId, modelName) {\n\tconst table = (contract.domain.namespaces[namespaceId]?.models[modelName])?.storage[\"table\"];\n\treturn typeof table === \"string\" ? table : void 0;\n}\nfunction tableSourceForContract(contract, namespaceId, tableName, alias) {\n\tconst resolved = requireStorageTableForContract(contract, namespaceId, tableName);\n\tconst effectiveAlias = alias !== void 0 && alias !== tableName ? alias : void 0;\n\treturn TableSource.named(tableName, effectiveAlias, resolved.namespaceId);\n}\n//#endregion\n//#region src/collection-contract.ts\nconst POLYMORPHIC_DISCRIMINATOR_ALIAS = \"__prisma_polymorphic_discriminator\";\nfunction modelsOf(contract, namespaceId) {\n\tconst namespace = contract.domain.namespaces[namespaceId];\n\tif (namespace === void 0) throw new InternalError(`domain namespace \"${namespaceId}\" is not present on the contract`);\n\treturn blindCast(namespace.models);\n}\nfunction metadataCacheKey(namespaceId, modelName) {\n\treturn JSON.stringify([namespaceId, modelName]);\n}\nfunction modelOf(contract, namespaceId, name) {\n\tconst model = contract.domain.namespaces[namespaceId]?.models[name];\n\treturn model === void 0 ? void 0 : blindCast(model);\n}\nconst fieldToColumnCache = /* @__PURE__ */ new WeakMap();\nconst columnToFieldCache = /* @__PURE__ */ new WeakMap();\nconst polymorphismCache = /* @__PURE__ */ new WeakMap();\nfunction resolvePolymorphismInfo(contract, namespaceId, modelName) {\n\tlet perContract = polymorphismCache.get(contract);\n\tif (!perContract) {\n\t\tperContract = /* @__PURE__ */ new Map();\n\t\tpolymorphismCache.set(contract, perContract);\n\t}\n\tconst cacheKey = metadataCacheKey(namespaceId, modelName);\n\tif (perContract.has(cacheKey)) return perContract.get(cacheKey);\n\tconst models = modelsOf(contract, namespaceId);\n\tconst model = models[modelName];\n\tif (!model?.discriminator || !model.variants) {\n\t\tperContract.set(cacheKey, void 0);\n\t\treturn;\n\t}\n\tconst baseTable = model.storage?.table;\n\tif (!baseTable) {\n\t\tperContract.set(cacheKey, void 0);\n\t\treturn;\n\t}\n\tconst discriminatorField = model.discriminator.field;\n\tconst discriminatorColumn = resolveFieldToColumn(contract, namespaceId, modelName, discriminatorField);\n\tconst variants = /* @__PURE__ */ new Map();\n\tconst variantsByValue = /* @__PURE__ */ new Map();\n\tconst mtiVariants = [];\n\tfor (const [variantModelName, variantEntry] of Object.entries(model.variants)) {\n\t\tconst variantModel = models[variantModelName];\n\t\tif (!variantModel) throw new InternalError(`Model \"${modelName}\" declares variant \"${variantModelName}\", but that model is missing from the contract`);\n\t\tconst variantTable = variantModel.storage?.table ?? baseTable;\n\t\tconst strategy = variantTable === baseTable ? \"sti\" : \"mti\";\n\t\tconst info = {\n\t\t\tmodelName: variantModelName,\n\t\t\tvalue: variantEntry.value,\n\t\t\ttable: variantTable,\n\t\t\tstrategy\n\t\t};\n\t\tvariants.set(variantModelName, info);\n\t\tvariantsByValue.set(variantEntry.value, info);\n\t\tif (strategy === \"mti\") mtiVariants.push(info);\n\t}\n\tconst result = {\n\t\tdiscriminatorField,\n\t\tdiscriminatorColumn,\n\t\tbaseTable,\n\t\tvariants,\n\t\tvariantsByValue,\n\t\tmtiVariants\n\t};\n\tperContract.set(cacheKey, result);\n\treturn result;\n}\nfunction resolveFieldToColumn(contract, namespaceId, modelName, fieldName) {\n\treturn getFieldToColumnMap(contract, namespaceId, modelName)[fieldName] ?? fieldName;\n}\n/**\n* Map the fields that an MTI variant contributes to `{ table, column }` refs\n* qualified against the variant's own table — the table the read path joins\n* into the correlated child SELECT. STI variants contribute nothing here:\n* their columns live on the base table and resolve through the ordinary\n* base-table field map. Base fields are intentionally absent so callers can\n* gate variant qualification strictly to variant-owned fields.\n*\n* Uncached on purpose: `resolvePolymorphismInfo` already memoizes the variant\n* lookup, and the remaining work is one pass over the variant's field→column\n* map, so a second cache layer would buy nothing.\n*/\nfunction resolveVariantFieldColumns(contract, namespaceId, baseModelName, variantName) {\n\tconst variant = resolvePolymorphismInfo(contract, namespaceId, baseModelName)?.variants.get(variantName);\n\tconst result = {};\n\tif (variant && variant.strategy === \"mti\") {\n\t\tconst variantFieldToColumn = getFieldToColumnMap(contract, namespaceId, variant.modelName);\n\t\tfor (const [field, column] of Object.entries(variantFieldToColumn)) result[field] = {\n\t\t\ttable: variant.table,\n\t\t\tcolumn\n\t\t};\n\t}\n\treturn result;\n}\nfunction getFieldToColumnMap(contract, namespaceId, modelName) {\n\tlet perContract = fieldToColumnCache.get(contract);\n\tif (!perContract) {\n\t\tperContract = /* @__PURE__ */ new Map();\n\t\tfieldToColumnCache.set(contract, perContract);\n\t}\n\tconst cacheKey = metadataCacheKey(namespaceId, modelName);\n\tlet cached = perContract.get(cacheKey);\n\tif (cached) return cached;\n\tconst storageFields = modelsOf(contract, namespaceId)[modelName]?.storage?.fields ?? {};\n\tcached = {};\n\tfor (const [f, s] of Object.entries(storageFields)) if (s?.column) cached[f] = s.column;\n\tperContract.set(cacheKey, cached);\n\treturn cached;\n}\nfunction getColumnToFieldMap(contract, namespaceId, modelName) {\n\tlet perContract = columnToFieldCache.get(contract);\n\tif (!perContract) {\n\t\tperContract = /* @__PURE__ */ new Map();\n\t\tcolumnToFieldCache.set(contract, perContract);\n\t}\n\tconst cacheKey = metadataCacheKey(namespaceId, modelName);\n\tlet cached = perContract.get(cacheKey);\n\tif (cached) return cached;\n\tconst storageFields = modelsOf(contract, namespaceId)[modelName]?.storage?.fields ?? {};\n\tcached = {};\n\tfor (const [f, s] of Object.entries(storageFields)) if (s?.column) cached[s.column] = f;\n\tperContract.set(cacheKey, cached);\n\treturn cached;\n}\nconst completeColumnToFieldCache = /* @__PURE__ */ new WeakMap();\n/**\n* Like getColumnToFieldMap, but a field without a storage `column` maps under its own name.\n*/\nfunction getCompleteColumnToFieldMap(contract, namespaceId, modelName) {\n\tlet perContract = completeColumnToFieldCache.get(contract);\n\tif (!perContract) {\n\t\tperContract = /* @__PURE__ */ new Map();\n\t\tcompleteColumnToFieldCache.set(contract, perContract);\n\t}\n\tconst cacheKey = metadataCacheKey(namespaceId, modelName);\n\tlet cached = perContract.get(cacheKey);\n\tif (cached) return cached;\n\tconst storageFields = modelsOf(contract, namespaceId)[modelName]?.storage?.fields ?? {};\n\tcached = {};\n\tfor (const [f, s] of Object.entries(storageFields)) cached[s?.column ?? f] = f;\n\tperContract.set(cacheKey, cached);\n\treturn cached;\n}\nfunction resolveIncludeRelation(contract, namespaceId, baseModelName, relationName, variantName) {\n\tconst polymorphism = resolvePolymorphismInfo(contract, namespaceId, baseModelName);\n\tconst variant = variantName === void 0 ? void 0 : polymorphism?.variants.get(variantName);\n\tlet declaringModelName = baseModelName;\n\tlet localTableName = resolveModelTableName(contract, namespaceId, baseModelName);\n\tlet relation;\n\tif (variant !== void 0) {\n\t\tconst candidate = resolveModelRelations(contract, namespaceId, variant.modelName)[relationName];\n\t\tif (candidate !== void 0) {\n\t\t\trelation = candidate;\n\t\t\tdeclaringModelName = variant.modelName;\n\t\t\tlocalTableName = variant.table;\n\t\t}\n\t}\n\trelation ??= resolveModelRelations(contract, namespaceId, baseModelName)[relationName];\n\tif (!relation) throw ormError(\"ORM.RELATION_UNKNOWN\", `Relation '${relationName}' not found on model '${baseModelName}'`, { meta: {\n\t\tmodel: baseModelName,\n\t\trelation: relationName\n\t} });\n\tconst { localFields, targetFields } = relation.on;\n\tif (localFields.length === 0 || localFields.length !== targetFields.length) throw new InternalError(`Relation '${relationName}' on model '${declaringModelName}' has incomplete join metadata: ${localFields.length} local field(s), ${targetFields.length} target field(s)`);\n\tconst localColumns = localFields.map((field) => resolveFieldToColumn(contract, namespaceId, declaringModelName, field));\n\tconst targetColumns = targetFields.map((field) => resolveFieldToColumn(contract, relation.toNamespace, relation.to, field));\n\tconst relatedTableName = resolveModelTableName(contract, relation.toNamespace, relation.to);\n\tlet through;\n\tif (relation.through !== void 0) through = {\n\t\ttable: relation.through.table,\n\t\tnamespaceId: relation.through.namespaceId,\n\t\tparentColumns: relation.through.parentColumns,\n\t\tchildColumns: relation.through.childColumns,\n\t\ttargetColumns: relation.through.targetColumns,\n\t\tparentLocalColumns: localColumns\n\t};\n\treturn {\n\t\trelatedModelName: relation.to,\n\t\trelatedNamespaceId: relation.toNamespace,\n\t\trelatedTableName,\n\t\tlocalTableName,\n\t\ttargetColumns,\n\t\tlocalColumns,\n\t\tcardinality: relation.cardinality,\n\t\t...ifDefined(\"through\", through)\n\t};\n}\nfunction resolveThrough(contract, through) {\n\tif (!through) return void 0;\n\tconst { table, namespaceId, parentColumns, childColumns, targetColumns } = through;\n\tconst junctionTable = contract.storage.namespaces[namespaceId]?.entries.table?.[table];\n\tif (!junctionTable) return void 0;\n\tconst fkColumnSet = /* @__PURE__ */ new Set([...parentColumns, ...childColumns]);\n\tconst requiredPayloadColumns = [];\n\tfor (const [colName, col] of Object.entries(junctionTable.columns)) if (!fkColumnSet.has(colName) && !col.nullable && col.default === void 0 && !hasExecutionCreateDefault(contract, namespaceId, table, colName)) requiredPayloadColumns.push(colName);\n\treturn {\n\t\ttable,\n\t\tnamespaceId,\n\t\tparentColumns,\n\t\tchildColumns,\n\t\ttargetColumns,\n\t\trequiredPayloadColumns\n\t};\n}\nfunction hasExecutionCreateDefault(contract, namespace, table, column) {\n\treturn contract.execution?.mutations.defaults.some((mutationDefault) => mutationDefault.ref.namespace === namespace && mutationDefault.ref.entry === table && mutationDefault.ref.field === column && mutationDefault.onCreate !== void 0) ?? false;\n}\nconst modelRelationsCache = /* @__PURE__ */ new WeakMap();\nfunction resolveModelRelations(contract, namespaceId, modelName) {\n\tlet perContract = modelRelationsCache.get(contract);\n\tif (!perContract) {\n\t\tperContract = /* @__PURE__ */ new Map();\n\t\tmodelRelationsCache.set(contract, perContract);\n\t}\n\tconst cacheKey = metadataCacheKey(namespaceId, modelName);\n\tconst cached = perContract.get(cacheKey);\n\tif (cached) return cached;\n\tconst relationMap = modelsOf(contract, namespaceId)[modelName]?.relations ?? {};\n\tconst resolved = {};\n\tfor (const [name, value] of Object.entries(relationMap)) {\n\t\tif (!value || typeof value !== \"object\") continue;\n\t\tconst rel = blindCast(value);\n\t\tconst localFields = rel.on?.localFields;\n\t\tconst targetFields = rel.on?.targetFields;\n\t\tif (!rel.to || typeof rel.to !== \"object\" || typeof rel.to.model !== \"string\" || !Array.isArray(localFields) || !Array.isArray(targetFields)) continue;\n\t\tconst through = resolveThrough(contract, rel.through);\n\t\tresolved[name] = {\n\t\t\tto: rel.to.model,\n\t\t\ttoNamespace: rel.to.namespace,\n\t\t\tcardinality: parseRelationCardinality(rel.cardinality),\n\t\t\ton: {\n\t\t\t\tlocalFields: blindCast(localFields),\n\t\t\t\ttargetFields: blindCast(targetFields)\n\t\t\t},\n\t\t\t...through !== void 0 ? { through } : {}\n\t\t};\n\t}\n\tperContract.set(cacheKey, resolved);\n\treturn resolved;\n}\nfunction parseRelationCardinality(value) {\n\tif (value === \"1:1\" || value === \"N:1\" || value === \"1:N\" || value === \"N:M\") return value;\n}\nfunction resolveUpsertConflictColumns(contract, namespaceId, modelName, conflictOn) {\n\tif (conflictOn && typeof conflictOn === \"object\") {\n\t\tconst columns = Object.keys(conflictOn).map((fieldName) => resolveFieldToColumn(contract, namespaceId, modelName, fieldName));\n\t\tif (columns.length > 0) return columns;\n\t}\n\treturn [...storageTableForContract(contract, namespaceId, resolveModelTableName(contract, namespaceId, modelName)).primaryKey?.columns ?? []];\n}\nfunction resolveModelTableName(contract, namespaceId, modelName) {\n\tconst table = domainModelTableInNamespace(contract, namespaceId, modelName);\n\tif (table === void 0) throw new InternalError(`Model \"${modelName}\" has invalid or missing storage.table in namespace \"${namespaceId}\"`);\n\treturn table;\n}\nfunction resolvePrimaryKeyColumns(contract, namespaceId, tableName) {\n\tconst columns = resolveTableForContract(contract, namespaceId, tableName)?.table.primaryKey?.columns ?? [];\n\tif (columns.length === 0) throw new InternalError(`Table \"${tableName}\" in namespace \"${namespaceId}\" has no primary key to join its multi-table variants on`);\n\treturn columns;\n}\nfunction resolveRowIdentityColumns(contract, namespaceId, tableName) {\n\tlet table;\n\ttry {\n\t\ttable = storageTableForContract(contract, namespaceId, tableName);\n\t} catch (error) {\n\t\tif (error instanceof Error && error.message.includes(\"ambiguous\")) throw error;\n\t\treturn [];\n\t}\n\tif (table.primaryKey && table.primaryKey.columns.length > 0) return table.primaryKey.columns;\n\tfor (const unique of table.uniques) if (unique.columns.length > 0) return unique.columns;\n\treturn [];\n}\nfunction assertReturningCapability(contract, action) {\n\tif (hasContractCapability(contract, \"returning\")) return;\n\tthrow ormError(\"ORM.CAPABILITY_MISSING\", `${action} requires contract capability \"returning\"`, { meta: {\n\t\tcapability: \"returning\",\n\t\taction\n\t} });\n}\nfunction assertInsertConflictSkipCapability(contract, action, targeted) {\n\trequireCapability(contract, action, \"insertOnConflictSkip\");\n\tif (!targeted) requireCapability(contract, action, \"insertOnConflictWithoutTarget\");\n}\nfunction requireCapability(contract, action, capability) {\n\tif (hasContractCapability(contract, capability)) return;\n\tthrow ormError(\"ORM.CAPABILITY_MISSING\", `${action} requires contract capability \"${capability}\". Re-emit the contract against an adapter that reports it.`, { meta: {\n\t\tcapability,\n\t\taction\n\t} });\n}\nfunction resolveInsertConflictColumns(contract, namespaceId, modelName, conflictOn, action) {\n\tconst fieldToColumn = getFieldToColumnMap(contract, namespaceId, modelName);\n\treturn conflictOn.map((fieldName) => {\n\t\tconst column = fieldToColumn[fieldName];\n\t\tif (column === void 0) throw ormError(\"ORM.ARGUMENT_INVALID\", `${action} conflictOn field \"${fieldName}\" is not a scalar field of model \"${modelName}\"`, { meta: {\n\t\t\taction,\n\t\t\tmodel: modelName,\n\t\t\tfield: fieldName\n\t\t} });\n\t\treturn column;\n\t});\n}\nfunction assertDistinctOnCapability(contract, methodName) {\n\tif (contract.capabilities[\"postgres\"]?.[\"distinctOn\"] === true) return;\n\tthrow ormError(\"ORM.CAPABILITY_MISSING\", `${methodName}() requires capability postgres.distinctOn`, { meta: {\n\t\tcapability: \"postgres.distinctOn\",\n\t\tmethod: methodName\n\t} });\n}\nfunction assertLockCapability(contract, requirement, methodName) {\n\tconst capability = missingCapability(contract.capabilities, requirement);\n\tif (capability === void 0) return;\n\tthrow ormError(\"ORM.CAPABILITY_MISSING\", `${methodName}() requires capability ${capability}`, { meta: {\n\t\tcapability,\n\t\tmethod: methodName\n\t} });\n}\nfunction hasContractCapability(contract, capability) {\n\tconst capabilities = contract.capabilities;\n\tconst value = capabilities[capability];\n\tif (capabilityEnabled(value)) return true;\n\treturn Object.values(capabilities).some((targetCapabilities) => {\n\t\tif (typeof targetCapabilities !== \"object\" || targetCapabilities === null) return false;\n\t\treturn capabilityEnabled(targetCapabilities[capability]);\n\t});\n}\nfunction capabilityEnabled(value) {\n\tif (value === true) return true;\n\tif (typeof value !== \"object\" || value === null) return false;\n\treturn Object.values(blindCast(value)).some((flag) => flag === true);\n}\nfunction isToOneCardinality(cardinality) {\n\treturn cardinality === \"1:1\" || cardinality === \"N:1\";\n}\n//#endregion\n//#region src/aggregate-builder.ts\n/**\n* The aggregate selector methods, one per operation the registry contributes —\n* the runtime mirror of the contract's emitted aggregate map, which is what\n* types the surface as {@link AggregateBuilder}. Each method builds a selector\n* carrying the operation's name and, for a field-taking call, the field's\n* storage column; what a selector resolves to is the plan compiler's question\n* to the same registry.\n*/\nfunction createAggregateBuilder(contract, aggregates, namespaceId, modelName) {\n\tconst fieldToColumn = getFieldToColumnMap(contract, namespaceId, modelName);\n\tconst builder = {};\n\tfor (const operation of aggregateOperationNames(aggregates)) builder[operation] = (field) => {\n\t\tconst column = field === void 0 ? void 0 : fieldToColumn[field] ?? field;\n\t\treturn {\n\t\t\tkind: \"aggregate\",\n\t\t\tfn: operation,\n\t\t\t...ifDefined(\"column\", column)\n\t\t};\n\t};\n\treturn blindCast(builder);\n}\nfunction isAggregateSelector(value) {\n\tif (!value || typeof value !== \"object\") return false;\n\tconst candidate = value;\n\treturn candidate.kind === \"aggregate\" && typeof candidate.fn === \"string\";\n}\n//#endregion\n//#region src/aggregate-codecs.ts\n/**\n* What an aggregate resolves to: the codec its result carries, and the expression the target wants built for it.\n*\n* An aggregate over a column resolves against that column's own codec, so a target that widens `sum` over small integers and preserves it over decimals answers differently per column without the caller knowing either rule. Where a target also needs the result rendered a particular way — a value its driver cannot otherwise carry — the descriptor's lowering says so, and the codec it declared stays the codec regardless.\n*\n* A pair the composed stack declares no overload for is rejected before any SQL is built: an undeclared aggregate has no result identity to project or decode, and executing it anyway would hand back the driver-native value the declared-codec path exists to replace.\n*/\nfunction resolveAggregate(query) {\n\tconst input = inputCodecRef(query);\n\tconst resolved = query.aggregates.resolve(query.fn, input);\n\tif (resolved === void 0) throw unsupportedAggregate(query, input);\n\tconst nullability = resolved.nullable ? { nullable: true } : {\n\t\tnullable: false,\n\t\temptyResultJson: resolved.emptyResultJson\n\t};\n\treturn {\n\t\tcodec: resolved.output,\n\t\t...nullability,\n\t\tinput,\n\t\tlower: resolved.lower\n\t};\n}\n/**\n* The plain SQL form of an operation in the closed aggregate alphabet.\n* Registry composition guarantees every operation outside the alphabet\n* carries a lowering hook, so a resolution without one for any other name is\n* a composition bug, not a user error.\n*/\nfunction plainAggregateExpr(fn, expr) {\n\tif (!isAggregateFn(fn)) throw new InternalError(`aggregate operation '${fn}' is outside the SQL aggregate alphabet and resolved without a lowering hook`);\n\treturn new AggregateExpr(fn, expr);\n}\nfunction unsupportedAggregate(query, input) {\n\treturn ormError(\"ORM.AGGREGATE_UNSUPPORTED\", input === void 0 ? `The composed target declares no '${query.fn}' aggregate for a call without an input.` : `The composed target declares no '${query.fn}' aggregate over codec '${input.codecId}' (column '${query.column}' of table '${query.tableName}').`, {\n\t\twhy: \"An aggregate result decodes through the codec its target declares; an undeclared pair has no declared result to type or decode.\",\n\t\tfix: `Aggregate a column the target declares '${query.fn}' for, or contribute an aggregate descriptor for this pair.`,\n\t\tmeta: {\n\t\t\toperation: query.fn,\n\t\t\ttable: query.tableName,\n\t\t\t...ifDefined(\"column\", query.column),\n\t\t\t...ifDefined(\"inputCodecId\", input?.codecId)\n\t\t}\n\t});\n}\n/** The codec of the value being aggregated — the column's own, or none where the aggregate is over rows. */\nfunction inputCodecRef(query) {\n\treturn query.column === void 0 ? void 0 : codecRefForStorageColumn(query.contract.storage, query.namespaceId, query.tableName, query.column);\n}\n//#endregion\n//#region src/aggregate-empty-result.ts\n/**\n* What an aggregate reads as when there is no row to read at all.\n*\n* SQL answers an empty input set itself — a nullable-declared aggregate\n* collapses to NULL, a non-nullable one to a value SQL still produces, a\n* count's zero cardinality — so this covers only the degenerate case of a\n* result set with no row: an absent aggregate alias, or an include whose\n* envelope never arrived. The answer reads off the operation's declared row:\n* NULL where the row is nullable, else the value the row declares, decoded\n* through the codec it declared beside it — so the application sees the same\n* value shape a real row would produce, in whichever form that codec's\n* canonical JSON takes.\n*/\nfunction emptyAggregateResult(result, codec) {\n\treturn result.nullable ? null : codec.decodeJson(result.emptyResultJson);\n}\n//#endregion\n//#region src/collection-column-mapping.ts\nfunction mapFieldsToColumns(contract, namespaceId, modelName, fieldNames) {\n\tconst fieldToColumn = getFieldToColumnMap(contract, namespaceId, modelName);\n\treturn fieldNames.map((fieldName) => fieldToColumn[fieldName] ?? fieldName);\n}\nfunction mapCursorValuesToColumns(contract, namespaceId, modelName, cursorValues) {\n\tconst fieldToColumn = getFieldToColumnMap(contract, namespaceId, modelName);\n\tconst mappedCursor = {};\n\tfor (const [fieldName, value] of Object.entries(cursorValues)) {\n\t\tif (value === void 0) continue;\n\t\tconst columnName = fieldToColumn[fieldName] ?? fieldName;\n\t\tmappedCursor[columnName] = value;\n\t}\n\treturn mappedCursor;\n}\n//#endregion\n//#region src/collection-runtime.ts\nfunction stripHiddenMappedFields(contract, namespaceId, modelName, mapped, hiddenColumns) {\n\tif (hiddenColumns.length === 0) return;\n\tconst columnToField = getColumnToFieldMap(contract, namespaceId, modelName);\n\tfor (const hiddenColumn of hiddenColumns) {\n\t\tconst fieldName = columnToField[hiddenColumn] ?? hiddenColumn;\n\t\tdelete mapped[fieldName];\n\t}\n}\nfunction mapStorageRowToModelFields(contract, namespaceId, modelName, row) {\n\tconst columnToField = getColumnToFieldMap(contract, namespaceId, modelName);\n\tif (Object.keys(columnToField).length === 0) return { ...row };\n\treturn mapColumnNames(row, columnToField);\n}\nfunction createStorageRowMapper(contract, namespaceId, modelName) {\n\tconst columnToField = getColumnToFieldMap(contract, namespaceId, modelName);\n\treturn Object.keys(columnToField).length === 0 ? (row) => ({ ...row }) : (row) => mapColumnNames(row, columnToField);\n}\nfunction mapColumnNames(row, columnToField) {\n\tconst mapped = {};\n\tfor (const [columnName, value] of Object.entries(row)) mapped[columnToField[columnName] ?? columnName] = value;\n\treturn mapped;\n}\nconst mergedColumnToFieldCache = /* @__PURE__ */ new WeakMap();\nfunction getMergedColumnToFieldMap(contract, namespaceId, baseModelName, variantModelName, variantTable) {\n\tconst cacheKey = `${namespaceId}:${baseModelName}:${variantModelName}:${variantTable ?? \"\"}`;\n\tlet perContract = mergedColumnToFieldCache.get(contract);\n\tif (!perContract) {\n\t\tperContract = /* @__PURE__ */ new Map();\n\t\tmergedColumnToFieldCache.set(contract, perContract);\n\t}\n\tconst cached = perContract.get(cacheKey);\n\tif (cached) return cached;\n\tconst baseMap = getCompleteColumnToFieldMap(contract, namespaceId, baseModelName);\n\tconst variantMap = getCompleteColumnToFieldMap(contract, namespaceId, variantModelName);\n\tconst merged = { ...baseMap };\n\tfor (const [col, field] of Object.entries(variantMap)) if (variantTable) merged[`${variantTable}__${col}`] = field;\n\telse merged[col] = field;\n\tperContract.set(cacheKey, merged);\n\treturn merged;\n}\nfunction mapPolymorphicRow(contract, namespaceId, baseModelName, polyInfo, row, variantName) {\n\tconst discriminatorValue = row[polyInfo.discriminatorColumn] ?? row[\"__prisma_polymorphic_discriminator\"];\n\tconst variant = variantName ? polyInfo.variants.get(variantName) : typeof discriminatorValue === \"string\" ? polyInfo.variantsByValue.get(discriminatorValue) : void 0;\n\tif (!variant) return mapKnownColumnNames(row, getCompleteColumnToFieldMap(contract, namespaceId, baseModelName));\n\tconst mtiTable = variant.strategy === \"mti\" ? variant.table : void 0;\n\treturn mapKnownColumnNames(row, getMergedColumnToFieldMap(contract, namespaceId, baseModelName, variant.modelName, mtiTable));\n}\nfunction createPolymorphicRowMapper(contract, namespaceId, baseModelName, polyInfo, variantName) {\n\tconst baseMapper = captureColumnMapper(() => getCompleteColumnToFieldMap(contract, namespaceId, baseModelName));\n\tconst mappersByValue = /* @__PURE__ */ new Map();\n\tlet pinnedMapper = baseMapper;\n\tfor (const [name, variant] of polyInfo.variants) {\n\t\tif (variantName && name !== variantName) continue;\n\t\tconst mapper = captureColumnMapper(() => getMergedColumnToFieldMap(contract, namespaceId, baseModelName, variant.modelName, variant.strategy === \"mti\" ? variant.table : void 0));\n\t\tif (variantName) pinnedMapper = mapper;\n\t\tfor (const [value, candidate] of polyInfo.variantsByValue) if (candidate === variant) mappersByValue.set(value, mapper);\n\t}\n\tconst discriminatorColumn = polyInfo.discriminatorColumn;\n\treturn (row) => {\n\t\tconst value = row[discriminatorColumn] ?? row[\"__prisma_polymorphic_discriminator\"];\n\t\treturn (variantName ? pinnedMapper : typeof value === \"string\" ? mappersByValue.get(value) ?? baseMapper : baseMapper)(row);\n\t};\n}\nfunction captureColumnMapper(resolve) {\n\ttry {\n\t\tconst columns = resolve();\n\t\treturn (row) => mapKnownColumnNames(row, columns);\n\t} catch (error) {\n\t\treturn () => {\n\t\t\tthrow error;\n\t\t};\n\t}\n}\nfunction mapKnownColumnNames(row, columns) {\n\tconst mapped = {};\n\tfor (const [col, val] of Object.entries(row)) {\n\t\tconst field = columns[col];\n\t\tif (field !== void 0) mapped[field] = val;\n\t}\n\treturn mapped;\n}\nfunction mapModelDataToStorageRow(contract, namespaceId, modelName, row) {\n\tconst fieldToColumn = getFieldToColumnMap(contract, namespaceId, modelName);\n\tconst mapped = {};\n\tfor (const [fieldName, value] of Object.entries(row)) {\n\t\tif (value === void 0) continue;\n\t\tconst columnName = fieldToColumn[fieldName] ?? fieldName;\n\t\tmapped[columnName] = value;\n\t}\n\treturn mapped;\n}\nfunction mapResultRows(result, mapper) {\n\tconst generator = async function* () {\n\t\tfor await (const value of result) yield mapper(value);\n\t};\n\treturn new AsyncIterableResult(generator());\n}\n//#endregion\n//#region src/column-codec.ts\nfunction resolveColumn(contract, namespaceId, tableName, columnName) {\n\treturn resolveTableForContract(contract, namespaceId, tableName)?.table.columns[columnName];\n}\nfunction codecTraits(context, codecId) {\n\treturn context.codecDescriptors.descriptorFor(codecId)?.traits ?? [];\n}\nfunction hasTrait(context, codecId, trait) {\n\treturn codecTraits(context, codecId).includes(trait);\n}\n//#endregion\n//#region src/order-by-guards.ts\n/**\n* A keyset needs a cursor value for every order axis, so each active order must be a plain column without null placement.\n*/\nfunction assertCursorCompatibleOrder(orderBy) {\n\t(orderBy ?? []).forEach((item, index) => {\n\t\tconst position = index + 1;\n\t\tif (item.expr.kind !== \"column-ref\") throw ormError(\"ORM.ARGUMENT_INVALID\", `cursor() cannot key on orderBy item ${position}: it orders by an expression rather than a column, and relation orders, relation counts and operation results are not cursorable. Order by the model's own columns to paginate with a cursor.`, { meta: {\n\t\t\tmethod: \"cursor\",\n\t\t\tposition\n\t\t} });\n\t\tif (item.nulls !== void 0) throw ormError(\"ORM.ARGUMENT_INVALID\", `cursor() cannot key on orderBy item ${position}: an order with nulls placement is not cursorable. Remove the nulls option to paginate with a cursor.`, { meta: {\n\t\t\tmethod: \"cursor\",\n\t\t\tposition,\n\t\t\tnulls: item.nulls\n\t\t} });\n\t});\n}\n/**\n* Postgres requires the leading `ORDER BY` items to match the `DISTINCT ON` expressions, so the first `distinctOnCount` items must be plain columns; later items only choose which row represents each group and may be any expression.\n*/\nfunction assertDistinctOnCompatibleOrder(orderBy, distinctOnCount) {\n\t(orderBy ?? []).slice(0, distinctOnCount).forEach((item, index) => {\n\t\tconst position = index + 1;\n\t\tif (item.expr.kind !== \"column-ref\") throw ormError(\"ORM.ARGUMENT_INVALID\", `distinctOn() needs its ${distinctOnCount} column(s) as the first orderBy items, but orderBy item ${position} orders by an expression rather than a column. Put the distinctOn columns first; relation orders, relation counts and operation results may follow them.`, { meta: {\n\t\t\tmethod: \"distinctOn\",\n\t\t\tposition,\n\t\t\tdistinctOnCount\n\t\t} });\n\t});\n}\nfunction checkedOrderByItem(dir, expr, options) {\n\tconst nulls = options?.nulls;\n\tif (nulls !== void 0 && !isOrderByNulls(nulls)) throw ormError(\"ORM.ARGUMENT_INVALID\", `${dir}() nulls must be \"first\" or \"last\"`, { meta: {\n\t\tmethod: dir,\n\t\tnulls: String(nulls)\n\t} });\n\treturn new OrderByItem(expr, dir, nulls);\n}\n//#endregion\n//#region src/query-plan-meta.ts\nfunction deriveParamsFromAst(ast) {\n\treturn { params: collectOrderedParamRefs(ast).map((p) => p.kind === \"param-ref\" ? p.value : void 0) };\n}\nfunction resolveTableColumns(contract, namespaceId, tableName) {\n\ttry {\n\t\treturn Object.keys(storageTableForContract(contract, namespaceId, tableName).columns);\n\t} catch (error) {\n\t\tif (error instanceof Error && error.message.includes(\"ambiguous\")) throw error;\n\t\tthrow ormError(\"ORM.TABLE_UNKNOWN\", `Unknown table \"${tableName}\" in SQL ORM query planner`, { meta: {\n\t\t\tnamespaceId,\n\t\t\ttableName\n\t\t} });\n\t}\n}\nfunction buildOrmPlanMeta(contract, annotations) {\n\tconst annotationRecord = annotations !== void 0 && annotations.size > 0 ? Object.freeze(Object.fromEntries(annotations)) : void 0;\n\treturn {\n\t\ttarget: contract.target,\n\t\ttargetFamily: contract.targetFamily,\n\t\tstorageHash: contract.storage.storageHash,\n\t\t...ifDefined(\"profileHash\", contract.profileHash),\n\t\t...ifDefined(\"annotations\", annotationRecord),\n\t\tlane: \"orm-client\"\n\t};\n}\nfunction buildOrmQueryPlan(contract, ast, params, annotations) {\n\treturn Object.freeze({\n\t\tast,\n\t\tparams: [...params],\n\t\tmeta: buildOrmPlanMeta(contract, annotations)\n\t});\n}\n/**\n* Merges annotations into an existing `SqlQueryPlan`'s\n* `meta.annotations` and returns a new frozen plan.\n*\n* Used by the ORM dispatch path to attach terminal-call annotations to\n* plans produced by mutation compile functions (which don't take\n* annotations as parameters). Reads compile through `compileSelect`-\n* family functions that pass `state.annotations` directly to\n* `buildOrmQueryPlan`; this helper is the alternate path for write\n* terminals where annotations arrive at the call site, not via state.\n*\n* Returns the input plan unchanged when `annotations` is undefined\n* or empty. Reserved namespaces already on the input plan (`codecs`, target keys such as `pg`)\n* win over caller-supplied entries under the same key —\n* see the reserved-namespace policy on `defineAnnotation`.\n*/\nfunction mergeAnnotations(plan, annotations) {\n\tif (annotations === void 0 || annotations.size === 0) return plan;\n\tconst callerEntries = {};\n\tfor (const [namespace, value] of annotations) callerEntries[namespace] = value;\n\tconst mergedAnnotations = Object.freeze({\n\t\t...callerEntries,\n\t\t...plan.meta.annotations ?? {}\n\t});\n\treturn Object.freeze({\n\t\t...plan,\n\t\tmeta: Object.freeze({\n\t\t\t...plan.meta,\n\t\t\tannotations: mergedAnnotations\n\t\t})\n\t});\n}\n//#endregion\n//#region src/where-binding.ts\nfunction namespaceCoordinateForSource(source) {\n\treturn source.kind === \"table-source\" ? source.namespaceId : void 0;\n}\nfunction bindWhereExpr(contract, expr, namespaceId) {\n\treturn expr.accept({\n\t\tcolumnRef(expr) {\n\t\t\treturn bindExpression(contract, expr);\n\t\t},\n\t\tidentifierRef(expr) {\n\t\t\treturn expr;\n\t\t},\n\t\tsubquery(expr) {\n\t\t\treturn bindExpression(contract, expr);\n\t\t},\n\t\toperation(expr) {\n\t\t\treturn bindExpression(contract, expr);\n\t\t},\n\t\taggregate(expr) {\n\t\t\treturn bindExpression(contract, expr);\n\t\t},\n\t\twindowFunc(expr) {\n\t\t\treturn bindExpression(contract, expr);\n\t\t},\n\t\tfunctionCall(expr) {\n\t\t\treturn bindExpression(contract, expr);\n\t\t},\n\t\tcast(expr) {\n\t\t\treturn bindExpression(contract, expr);\n\t\t},\n\t\tcase(expr) {\n\t\t\treturn bindExpression(contract, expr);\n\t\t},\n\t\tjsonObject(expr) {\n\t\t\treturn bindExpression(contract, expr);\n\t\t},\n\t\tjsonArrayAgg(expr) {\n\t\t\treturn bindExpression(contract, expr);\n\t\t},\n\t\tliteral(expr) {\n\t\t\treturn expr;\n\t\t},\n\t\tparam(expr) {\n\t\t\treturn expr;\n\t\t},\n\t\tpreparedParam(expr) {\n\t\t\treturn expr;\n\t\t},\n\t\tlist(expr) {\n\t\t\treturn bindExpression(contract, expr);\n\t\t},\n\t\tbinary(expr) {\n\t\t\tconst left = bindExpression(contract, expr.left);\n\t\t\tconst bindingColumn = left.kind === \"column-ref\" ? left : void 0;\n\t\t\treturn new BinaryExpr(expr.op, left, bindComparable(contract, expr.right, bindingColumn, namespaceId));\n\t\t},\n\t\tand(expr) {\n\t\t\treturn AndExpr.of(expr.exprs.map((part) => bindWhereExpr(contract, part, namespaceId)));\n\t\t},\n\t\tor(expr) {\n\t\t\treturn OrExpr.of(expr.exprs.map((part) => bindWhereExpr(contract, part, namespaceId)));\n\t\t},\n\t\texists(expr) {\n\t\t\treturn expr.notExists ? ExistsExpr.notExists(bindSelectAst(contract, expr.subquery)) : ExistsExpr.exists(bindSelectAst(contract, expr.subquery));\n\t\t},\n\t\tnullCheck(expr) {\n\t\t\treturn expr.isNull ? NullCheckExpr.isNull(bindExpression(contract, expr.expr)) : NullCheckExpr.isNotNull(bindExpression(contract, expr.expr));\n\t\t},\n\t\tnot(expr) {\n\t\t\treturn new NotExpr(bindWhereExpr(contract, expr.expr, namespaceId));\n\t\t},\n\t\trawExpr(expr) {\n\t\t\treturn expr;\n\t\t}\n\t});\n}\nfunction bindComparable(contract, comparable, bindingColumn, namespaceId) {\n\tif (comparable.kind === \"param-ref\" || bindingColumn === void 0) return comparable.kind === \"param-ref\" ? comparable : comparable.kind === \"literal\" || comparable.kind === \"list\" ? comparable : bindExpression(contract, comparable);\n\tif (comparable.kind === \"literal\") return createParamRef(contract, bindingColumn, comparable.value, namespaceId);\n\tif (comparable.kind === \"list\") return ListExpression.of(comparable.values.map((value) => value.kind === \"literal\" ? createParamRef(contract, bindingColumn, value.value, namespaceId) : value));\n\treturn bindExpression(contract, comparable);\n}\nfunction createParamRef(contract, columnRef, value, namespaceId) {\n\tconst resolved = resolveStorageTable(contract.storage, columnRef.table, namespaceId);\n\tif (resolved === void 0 || !resolved.table.columns[columnRef.column]) throw ormError(\"ORM.COLUMN_UNKNOWN\", `Unknown column \"${columnRef.column}\" in table \"${columnRef.table}\"`, { meta: {\n\t\ttableName: columnRef.table,\n\t\tcolumn: columnRef.column\n\t} });\n\tconst codec = codecRefForStorageColumn(contract.storage, resolved.namespaceId, columnRef.table, columnRef.column);\n\treturn ParamRef.of(value, codec ? { codec } : void 0);\n}\nfunction createExpressionBinder(contract) {\n\treturn { select: (ast) => bindSelectAst(contract, ast) };\n}\nfunction bindExpression(contract, expr) {\n\treturn expr.rewrite(createExpressionBinder(contract));\n}\nfunction bindProjectionExpr(contract, expr) {\n\treturn expr.kind === \"literal\" ? expr : bindExpression(contract, expr);\n}\nfunction bindOrderByItem(contract, orderItem) {\n\treturn orderItem.withExpr(bindExpression(contract, orderItem.expr));\n}\nfunction bindJoin(contract, join) {\n\tconst namespaceId = namespaceCoordinateForSource(join.source);\n\treturn new JoinAst(join.joinType, bindFromSource(contract, join.source), join.on.kind === \"eq-col-join-on\" ? join.on : bindWhereExpr(contract, join.on, namespaceId), join.lateral);\n}\nfunction bindFromSource(contract, source) {\n\tif (source.kind === \"table-source\") return source;\n\tif (source.kind === \"derived-table-source\") return DerivedTableSource.as(source.alias, bindSelectAst(contract, source.query));\n\treturn source;\n}\nfunction bindSelectAst(contract, ast) {\n\tconst namespaceId = ast.from !== void 0 ? namespaceCoordinateForSource(ast.from) : void 0;\n\treturn new SelectAst({\n\t\t...ast.from !== void 0 ? { from: bindFromSource(contract, ast.from) } : {},\n\t\tjoins: ast.joins?.map((join) => bindJoin(contract, join)),\n\t\tprojection: ast.projection.map((projection) => new ProjectionItem(projection.alias, bindProjectionExpr(contract, projection.expr), projection.codec)),\n\t\twhere: ast.where ? bindWhereExpr(contract, ast.where, namespaceId) : void 0,\n\t\torderBy: ast.orderBy?.map((orderItem) => bindOrderByItem(contract, orderItem)),\n\t\tdistinct: ast.distinct,\n\t\tdistinctOn: ast.distinctOn?.map((expr) => bindExpression(contract, expr)),\n\t\tgroupBy: ast.groupBy?.map((expr) => bindExpression(contract, expr)),\n\t\thaving: ast.having ? bindWhereExpr(contract, ast.having, namespaceId) : void 0,\n\t\tlimit: ast.limit,\n\t\toffset: ast.offset,\n\t\tlocking: ast.locking,\n\t\tselectAllIntent: ast.selectAllIntent\n\t});\n}\n//#endregion\n//#region src/where-utils.ts\nfunction combineWhereExprs(filters) {\n\tif (filters.length === 0) return;\n\tif (filters.length === 1) return filters[0];\n\treturn AndExpr.of(filters);\n}\n//#endregion\n//#region src/query-plan-source.ts\nfunction createBoundaryExpr(tableName, entry) {\n\treturn new BinaryExpr(entry.direction === \"asc\" ? \"gt\" : \"lt\", ColumnRef.of(tableName, entry.column), LiteralExpr.of(entry.value));\n}\nfunction buildLexicographicCursorWhere(tableName, entries) {\n\tconst branches = entries.map((entry, index) => {\n\t\tconst branchExprs = [];\n\t\tfor (const prefixEntry of entries.slice(0, index)) branchExprs.push(BinaryExpr.eq(ColumnRef.of(tableName, prefixEntry.column), LiteralExpr.of(prefixEntry.value)));\n\t\tbranchExprs.push(createBoundaryExpr(tableName, entry));\n\t\tif (branchExprs.length === 1) {\n\t\t\tconst branch = branchExprs[0];\n\t\t\tassertDefined(branch, \"cursor branch contains its boundary expression\");\n\t\t\treturn branch;\n\t\t}\n\t\treturn AndExpr.of(branchExprs);\n\t});\n\tif (branches.length === 1) {\n\t\tconst branch = branches[0];\n\t\tassertDefined(branch, \"cursor expression contains its single branch\");\n\t\treturn branch;\n\t}\n\treturn OrExpr.of(branches);\n}\nfunction buildCursorWhere(tableName, orderBy, cursor) {\n\tif (!cursor || !orderBy || orderBy.length === 0) return;\n\tassertCursorCompatibleOrder(orderBy);\n\tconst entries = [];\n\tfor (const order of orderBy) {\n\t\tif (order.expr.kind !== \"column-ref\") throw new InternalError(\"assertCursorCompatibleOrder admits only column orders\");\n\t\tconst column = order.expr.column;\n\t\tconst value = cursor[column];\n\t\tif (value === void 0) throw ormError(\"ORM.CURSOR_VALUE_MISSING\", `Missing cursor value for orderBy column \"${column}\"`, { meta: { column } });\n\t\tentries.push({\n\t\t\tcolumn,\n\t\t\tdirection: order.dir,\n\t\t\tvalue\n\t\t});\n\t}\n\tconst firstEntry = entries[0];\n\tif (entries.length === 1 && firstEntry !== void 0) return createBoundaryExpr(tableName, firstEntry);\n\treturn buildLexicographicCursorWhere(tableName, entries);\n}\nfunction createTableRefRemapper$1(fromTable, toTable) {\n\treturn {\n\t\tcolumnRef: (col) => col.table === fromTable ? ColumnRef.of(toTable, col.column) : col,\n\t\ttableSource: (source) => {\n\t\t\tif (source.alias === fromTable) return TableSource.named(source.name, toTable, source.namespaceId);\n\t\t\tif (!source.alias && source.name === fromTable) return TableSource.named(source.name, toTable, source.namespaceId);\n\t\t\treturn source;\n\t\t},\n\t\teqColJoinOn: (on) => EqColJoinOn.of(on.left.table === fromTable ? ColumnRef.of(toTable, on.left.column) : on.left, on.right.table === fromTable ? ColumnRef.of(toTable, on.right.column) : on.right)\n\t};\n}\nfunction buildStateWhere(contract, tableName, state, options) {\n\tconst filterTableName = options?.filterTableName;\n\tconst cursorWhere = buildCursorWhere(filterTableName ?? tableName, state.orderBy, state.cursor);\n\tconst boundFilters = state.filters.map((filter) => bindWhereExpr(contract, filter, options?.namespaceId));\n\tconst remappedFilters = filterTableName && filterTableName !== tableName ? boundFilters.map((filter) => filter.rewrite(createTableRefRemapper$1(filterTableName, tableName))) : boundFilters;\n\tconst boundCursorWhere = cursorWhere ? bindWhereExpr(contract, cursorWhere, options?.namespaceId) : void 0;\n\tconst remappedCursorWhere = boundCursorWhere && filterTableName && filterTableName !== tableName ? boundCursorWhere.rewrite(createTableRefRemapper$1(filterTableName, tableName)) : boundCursorWhere;\n\treturn combineWhereExprs(remappedCursorWhere ? [...remappedFilters, remappedCursorWhere] : remappedFilters);\n}\n/**\n* Wrap a base SELECT in a `ROW_NUMBER() OVER (PARTITION BY … ORDER BY …) = 1`\n* filter, implementing Prisma-style `.distinct(cols)` semantics: one\n* representative row per `(distinctColumnRefs)` group is kept; the rest\n* are dropped.\n*\n* Picking which row survives in each partition is governed by\n* `rankingOrderBy`. When the caller's `orderBy` doesn't fully order rows\n* within a partition (e.g. user wrote `.distinct('title')` with no\n* `orderBy`, or ties in their ordering), the choice is\n* implementation-defined — matching Prisma's documented nested-distinct\n* behaviour. Callers that want determinism should pass an `orderBy` that\n* is total within each partition.\n*\n* The wrapper forwards every column of `base.projection` through the\n* derived alias, so the wrapper's projection is byte-identical in alias\n* names — making this transparent to any outer query (`json_agg`,\n* correlated subquery, top-level SELECT) that consumes the SELECT.\n*/\nfunction wrapWithRowNumberDedup(options) {\n\tconst { base, distinctColumnRefs, rankingOrderBy, rankedAlias } = options;\n\tconst rnAlias = \"__prisma_distinct_rn\";\n\tconst effectiveOrderBy = rankingOrderBy.length > 0 ? rankingOrderBy : distinctColumnRefs.map((expr) => OrderByItem.asc(expr));\n\tconst inner = base.withProjection([...base.projection, ProjectionItem.of(rnAlias, WindowFuncExpr.rowNumber({\n\t\tpartitionBy: distinctColumnRefs,\n\t\torderBy: effectiveOrderBy\n\t}))]);\n\treturn SelectAst.from(DerivedTableSource.as(rankedAlias, inner)).withProjection(base.projection.map((item) => ProjectionItem.of(item.alias, ColumnRef.of(rankedAlias, item.alias), item.codec))).withWhere(BinaryExpr.eq(ColumnRef.of(rankedAlias, rnAlias), LiteralExpr.of(1)));\n}\n/**\n* FROM source + WHERE for `state.distinct`: wraps in a `ROW_NUMBER`-ranked\n* derived table aliased back to `tableName`, so callers need no rewriting.\n*/\nfunction buildDedupedTableSource(contract, namespaceId, tableName, state, where, wrapProjection, joins) {\n\tif (!hasEntries(state.distinct)) return {\n\t\tsource: tableSourceForContract(contract, namespaceId, tableName),\n\t\twhere\n\t};\n\tconst distinctColumnRefs = state.distinct.map((column) => ColumnRef.of(tableName, column));\n\tconst rankingOrderBy = hasEntries(state.orderBy) ? state.orderBy : distinctColumnRefs.map((expr) => OrderByItem.asc(expr));\n\tlet inner = SelectAst.from(tableSourceForContract(contract, namespaceId, tableName)).withProjection([...wrapProjection, ProjectionItem.of(\"__prisma_distinct_rn\", WindowFuncExpr.rowNumber({\n\t\tpartitionBy: distinctColumnRefs,\n\t\torderBy: rankingOrderBy\n\t}))]);\n\tif (joins && joins.length > 0) inner = inner.withJoins(joins);\n\tif (where) inner = inner.withWhere(where);\n\treturn {\n\t\tsource: DerivedTableSource.as(tableName, inner),\n\t\twhere: BinaryExpr.eq(ColumnRef.of(tableName, \"__prisma_distinct_rn\"), LiteralExpr.of(1))\n\t};\n}\nfunction buildPrimaryKeyJoinOn(leftTable, rightTable, primaryKeyColumns) {\n\tconst [firstColumn] = primaryKeyColumns;\n\tif (primaryKeyColumns.length === 1 && firstColumn !== void 0) return EqColJoinOn.of(ColumnRef.of(leftTable, firstColumn), ColumnRef.of(rightTable, firstColumn));\n\treturn AndExpr.of(primaryKeyColumns.map((column) => BinaryExpr.eq(ColumnRef.of(leftTable, column), ColumnRef.of(rightTable, column))));\n}\nfunction buildMtiJoins(contract, namespaceId, polyInfo, variantName, selectedColumnsByTable) {\n\tconst joins = [];\n\tconst projection = [];\n\tconst variantsToJoin = variantName ? polyInfo.mtiVariants.filter((v) => v.modelName === variantName) : polyInfo.mtiVariants;\n\tif (variantsToJoin.length === 0) return {\n\t\tjoins,\n\t\tprojection\n\t};\n\tconst pkColumns = resolvePrimaryKeyColumns(contract, namespaceId, polyInfo.baseTable);\n\tfor (const variant of variantsToJoin) {\n\t\tconst joinType = variantName ? \"inner\" : \"left\";\n\t\tconst joinOn = buildPrimaryKeyJoinOn(polyInfo.baseTable, variant.table, pkColumns);\n\t\tconst join = joinType === \"inner\" ? JoinAst.inner(tableSourceForContract(contract, namespaceId, variant.table), joinOn) : JoinAst.left(tableSourceForContract(contract, namespaceId, variant.table), joinOn);\n\t\tjoins.push(join);\n\t\tconst variantColumns = resolveTableColumns(contract, namespaceId, variant.table);\n\t\tconst selectedVariantColumns = selectedColumnsByTable?.get(variant.table);\n\t\tfor (const col of variantColumns) {\n\t\t\tif (pkColumns.includes(col)) continue;\n\t\t\tif (selectedColumnsByTable !== void 0 && selectedVariantColumns?.has(col) !== true) continue;\n\t\t\tconst alias = `${variant.table}__${col}`;\n\t\t\tprojection.push(ProjectionItem.of(alias, ColumnRef.of(variant.table, col), codecRefForStorageColumn(contract.storage, namespaceId, variant.table, col)));\n\t\t}\n\t}\n\treturn {\n\t\tjoins,\n\t\tprojection\n\t};\n}\nfunction hasEntries(value) {\n\treturn value !== void 0 && value.length > 0;\n}\n/**\n* The rows an aggregate reduces over, one SELECT aliased to `tableName` — an\n* aggregate has no outer level of its own, so where/joins/distinct/orderBy/\n* limit/offset all have to live in this one wrap.\n*/\nfunction buildAggregateInput(contract, namespaceId, tableName, state, modelName, projection) {\n\tconst polyInfo = modelName ? resolvePolymorphismInfo(contract, namespaceId, modelName) : void 0;\n\tconst variantJoins = polyInfo && polyInfo.mtiVariants.length > 0 ? buildMtiJoins(contract, namespaceId, polyInfo, state.variantName, void 0).joins : [];\n\tconst where = buildStateWhere(contract, tableName, state, { namespaceId });\n\tconst hiddenOrders = hasEntries(state.distinct) ? projectExpressionOrders(tableName, state.orderBy) : void 0;\n\tconst { source, where: effectiveWhere } = buildDedupedTableSource(contract, namespaceId, tableName, state, where, [...projection, ...hiddenOrders?.projection ?? []], variantJoins);\n\tlet inner = SelectAst.from(source).withProjection(projection);\n\tif (!hasEntries(state.distinct) && variantJoins.length > 0) inner = inner.withJoins(variantJoins);\n\tif (effectiveWhere) inner = inner.withWhere(effectiveWhere);\n\tif (hasEntries(state.distinctOn)) inner = inner.withDistinctOn(state.distinctOn.map((column) => ColumnRef.of(tableName, column)));\n\tconst orderBy = hiddenOrders?.orderBy ?? state.orderBy;\n\tif (hasEntries(orderBy)) inner = inner.withOrderBy(orderBy);\n\tif (state.limit !== void 0) inner = inner.withLimit(state.limit);\n\tif (state.offset !== void 0) inner = inner.withOffset(state.offset);\n\treturn { source: DerivedTableSource.as(tableName, inner) };\n}\n/**\n* The dedup wrap exposes only its projection, so an order over an expression (a relation order, a count, an operation result) cannot be evaluated above it. Each such order is projected inside the wrap as a hidden `__order_N` column and the outer order reads that column.\n*/\nfunction projectExpressionOrders(tableName, orderBy) {\n\tconst projection = [];\n\treturn {\n\t\tprojection,\n\t\torderBy: (orderBy ?? []).map((item, index) => {\n\t\t\tif (item.expr.kind === \"column-ref\") return item;\n\t\t\tconst alias = `__order_${index}`;\n\t\t\tprojection.push(ProjectionItem.of(alias, item.expr));\n\t\t\treturn item.withExpr(ColumnRef.of(tableName, alias));\n\t\t})\n\t};\n}\n//#endregion\n//#region src/predicate-comparison.ts\nfunction predicateComparison(op, left, right) {\n\tconst nullable = (right.kind === \"list\" ? [left, ...right.values] : [left, right]).find((operand) => operand.kind === \"prepared-param-ref\" && operand.nullable);\n\tif (nullable?.kind !== \"prepared-param-ref\") return new BinaryExpr(op, left, right);\n\tif (op === \"eq\" || op === \"neq\") return new BinaryExpr(op === \"eq\" ? \"isNotDistinctFrom\" : \"isDistinctFrom\", left, right);\n\tthrow ormError(\"ORM.FILTER_UNSUPPORTED\", `Structured ORM ${op} comparisons do not support nullable prepared parameter \"${nullable.name}\"`, { meta: { parameter: nullable.name } });\n}\n//#endregion\n//#region src/predicate-expression.ts\nfunction predicateExpression(value) {\n\tif (isExpression(value)) return value.buildAst();\n}\n//#endregion\n//#region src/types.ts\nfunction emptyState() {\n\treturn {\n\t\tfilters: [],\n\t\tincludes: [],\n\t\torderBy: void 0,\n\t\tcursor: void 0,\n\t\tdistinct: void 0,\n\t\tdistinctOn: void 0,\n\t\tselectedFields: void 0,\n\t\tlimit: void 0,\n\t\toffset: void 0,\n\t\tvariantName: void 0,\n\t\tlocking: void 0,\n\t\tannotations: /* @__PURE__ */ new Map()\n\t};\n}\nfunction emptyGroupPagingState() {\n\treturn {\n\t\torderBy: [],\n\t\tlimit: void 0,\n\t\toffset: void 0\n\t};\n}\nfunction param(codec, value) {\n\tconst expression = predicateExpression(value);\n\tif (expression !== void 0) return expression;\n\tif (codec === void 0) return ParamRef.of(value);\n\treturn ParamRef.of(value, { codec });\n}\nfunction paramList(codec, values) {\n\treturn ListExpression.of(values.map((value) => param(codec, value)));\n}\nfunction scalarComparisonMethod(op) {\n\treturn ((left, codec) => (value) => {\n\t\tif (value === null && (op === \"eq\" || op === \"neq\")) return op === \"eq\" ? NullCheckExpr.isNull(left) : NullCheckExpr.isNotNull(left);\n\t\treturn predicateComparison(op, left, param(codec, value));\n\t});\n}\nfunction listComparisonMethod(op) {\n\treturn ((left, codec) => (values) => predicateComparison(op, left, paramList(codec, values)));\n}\n/**\n* Declares trait requirements and runtime factory for each comparison method.\n*\n* - `traits: []` means \"no trait required\" — always available\n* - Multi-trait: `traits: ['equality', 'order']` means BOTH traits are required\n*/\nconst COMPARISON_METHODS_META = {\n\teq: {\n\t\ttraits: [\"equality\"],\n\t\tcreate: scalarComparisonMethod(\"eq\")\n\t},\n\tneq: {\n\t\ttraits: [\"equality\"],\n\t\tcreate: scalarComparisonMethod(\"neq\")\n\t},\n\tin: {\n\t\ttraits: [\"equality\"],\n\t\tcreate: listComparisonMethod(\"in\")\n\t},\n\tnotIn: {\n\t\ttraits: [\"equality\"],\n\t\tcreate: listComparisonMethod(\"notIn\")\n\t},\n\tgt: {\n\t\ttraits: [\"order\"],\n\t\tcreate: scalarComparisonMethod(\"gt\")\n\t},\n\tlt: {\n\t\ttraits: [\"order\"],\n\t\tcreate: scalarComparisonMethod(\"lt\")\n\t},\n\tgte: {\n\t\ttraits: [\"order\"],\n\t\tcreate: scalarComparisonMethod(\"gte\")\n\t},\n\tlte: {\n\t\ttraits: [\"order\"],\n\t\tcreate: scalarComparisonMethod(\"lte\")\n\t},\n\tlike: {\n\t\ttraits: [\"textual\"],\n\t\tcreate: scalarComparisonMethod(\"like\")\n\t},\n\tasc: {\n\t\ttraits: [\"order\"],\n\t\tcreate: (left) => (options) => checkedOrderByItem(\"asc\", left, options)\n\t},\n\tdesc: {\n\t\ttraits: [\"order\"],\n\t\tcreate: (left) => (options) => checkedOrderByItem(\"desc\", left, options)\n\t},\n\tisNull: {\n\t\ttraits: [],\n\t\tcreate: (left) => () => NullCheckExpr.isNull(left)\n\t},\n\tisNotNull: {\n\t\ttraits: [],\n\t\tcreate: (left) => () => NullCheckExpr.isNotNull(left)\n\t}\n};\n//#endregion\n//#region src/query-plan-aggregate.ts\nfunction toAggregateProjection(contract, aggregates, namespaceId, tableName, selector) {\n\tconst { codec, input: inputCodec, lower } = resolveAggregate({\n\t\taggregates,\n\t\tcontract,\n\t\tnamespaceId,\n\t\ttableName,\n\t\tfn: selector.fn,\n\t\tcolumn: selector.column\n\t});\n\tconst inputExpr = selector.column === void 0 ? void 0 : ColumnRef.of(tableName, selector.column);\n\treturn {\n\t\texpr: lower !== void 0 ? lower({\n\t\t\texpr: inputExpr,\n\t\t\tinputCodec\n\t\t}) : plainAggregateExpr(selector.fn, inputExpr),\n\t\tcodec\n\t};\n}\nfunction validateGroupedComparable(value) {\n\tswitch (value.kind) {\n\t\tcase \"param-ref\": throw ormError(\"ORM.HAVING_EXPRESSION_UNSUPPORTED\", \"ParamRef is not supported in grouped having expressions\", { meta: { kind: value.kind } });\n\t\tcase \"prepared-param-ref\":\n\t\tcase \"literal\":\n\t\tcase \"column-ref\":\n\t\tcase \"identifier-ref\":\n\t\tcase \"aggregate\":\n\t\tcase \"operation\": return value;\n\t\tcase \"function-call\":\n\t\tcase \"cast\":\n\t\tcase \"case\": throw ormError(\"ORM.HAVING_EXPRESSION_UNSUPPORTED\", `Unsupported comparable kind in grouped having: \"${value.kind}\"`, { meta: { kind: value.kind } });\n\t\tcase \"list\":\n\t\t\tif (value.values.some((entry) => entry.kind === \"param-ref\")) throw ormError(\"ORM.HAVING_EXPRESSION_UNSUPPORTED\", \"ParamRef is not supported in grouped having expressions\", { meta: { kind: \"list\" } });\n\t\t\treturn value;\n\t\tdefault: throw ormError(\"ORM.HAVING_EXPRESSION_UNSUPPORTED\", `Unsupported comparable kind in grouped having: \"${value.kind}\"`, { meta: { kind: value.kind } });\n\t}\n}\nfunction validateGroupedMetricExpr(expr) {\n\tif (expr.kind !== \"aggregate\") throw ormError(\"ORM.HAVING_EXPRESSION_UNSUPPORTED\", \"groupBy().having() only supports aggregate metric expressions\", { meta: { kind: expr.kind } });\n\treturn expr;\n}\nfunction rejectHavingExpr(expr) {\n\tthrow ormError(\"ORM.HAVING_EXPRESSION_UNSUPPORTED\", `Unsupported grouped having expression kind \"${expr.kind}\"`, { meta: { kind: expr.kind } });\n}\nfunction validateGroupedHavingExpr(expr) {\n\treturn expr.accept({\n\t\tcolumnRef: rejectHavingExpr,\n\t\tidentifierRef: rejectHavingExpr,\n\t\tsubquery: rejectHavingExpr,\n\t\toperation: rejectHavingExpr,\n\t\taggregate: rejectHavingExpr,\n\t\twindowFunc: rejectHavingExpr,\n\t\tfunctionCall: rejectHavingExpr,\n\t\tcast: rejectHavingExpr,\n\t\tcase: rejectHavingExpr,\n\t\tjsonObject: rejectHavingExpr,\n\t\tjsonArrayAgg: rejectHavingExpr,\n\t\tliteral: rejectHavingExpr,\n\t\tparam() {\n\t\t\tthrow ormError(\"ORM.HAVING_EXPRESSION_UNSUPPORTED\", \"ParamRef is not supported in grouped having expressions\", { meta: { kind: \"param-ref\" } });\n\t\t},\n\t\tpreparedParam() {\n\t\t\tthrow ormError(\"ORM.HAVING_EXPRESSION_UNSUPPORTED\", \"PreparedParamRef is not supported in grouped having expressions\", { meta: { kind: \"prepared-param-ref\" } });\n\t\t},\n\t\tlist: rejectHavingExpr,\n\t\tand(expr) {\n\t\t\treturn AndExpr.of(expr.exprs.map((child) => validateGroupedHavingExpr(child)));\n\t\t},\n\t\tor(expr) {\n\t\t\treturn OrExpr.of(expr.exprs.map((child) => validateGroupedHavingExpr(child)));\n\t\t},\n\t\texists: rejectHavingExpr,\n\t\tnullCheck(expr) {\n\t\t\treturn new NullCheckExpr(validateGroupedMetricExpr(expr.expr), expr.isNull);\n\t\t},\n\t\tnot(expr) {\n\t\t\treturn new NotExpr(validateGroupedHavingExpr(expr.expr));\n\t\t},\n\t\tbinary(expr) {\n\t\t\treturn new BinaryExpr(expr.op, validateGroupedMetricExpr(expr.left), validateGroupedComparable(expr.right));\n\t\t},\n\t\trawExpr: rejectHavingExpr\n\t});\n}\nfunction aggregateInputColumns(tableName, entries, orderBy, groupByColumns = []) {\n\tconst columns = new Set(groupByColumns);\n\tfor (const [, selector] of entries) if (selector.column !== void 0) columns.add(selector.column);\n\tfor (const item of orderBy ?? []) if (item.expr.kind === \"column-ref\") columns.add(item.expr.column);\n\tif (columns.size === 0) return [ProjectionItem.of(\"__row\", LiteralExpr.of(1))];\n\treturn Array.from(columns, (column) => ProjectionItem.of(column, ColumnRef.of(tableName, column)));\n}\nfunction compileAggregate(contract, aggregates, namespaceId, tableName, state, aggregateSpec, modelName) {\n\tconst entries = Object.entries(aggregateSpec);\n\tif (entries.length === 0) throw ormError(\"ORM.AGGREGATE_SELECTOR_MISSING\", \"aggregate() requires at least one aggregation selector\", { meta: {\n\t\tmethod: \"aggregate\",\n\t\tnamespaceId,\n\t\ttableName\n\t} });\n\tif (state.distinctOn !== void 0 && state.distinctOn.length > 0) {\n\t\tassertDistinctOnCapability(contract, \"distinctOn\");\n\t\tassertDistinctOnCompatibleOrder(state.orderBy, state.distinctOn.length);\n\t}\n\tconst hasPagination = state.limit !== void 0 || state.offset !== void 0;\n\tconst hasDistinct = state.distinct !== void 0 && state.distinct.length > 0 || state.distinctOn !== void 0 && state.distinctOn.length > 0;\n\tif (hasPagination || hasDistinct) {\n\t\tconst { source } = buildAggregateInput(contract, namespaceId, tableName, state, modelName, aggregateInputColumns(tableName, entries, state.orderBy));\n\t\tconst projection = entries.map(([alias, selector]) => {\n\t\t\tconst { expr, codec } = toAggregateProjection(contract, aggregates, namespaceId, tableName, selector);\n\t\t\treturn ProjectionItem.of(alias, expr, codec);\n\t\t});\n\t\tconst ast = SelectAst.from(source).withProjection(projection);\n\t\tconst { params } = deriveParamsFromAst(ast);\n\t\treturn buildOrmQueryPlan(contract, ast, params);\n\t}\n\tconst polyInfo = modelName ? resolvePolymorphismInfo(contract, namespaceId, modelName) : void 0;\n\tconst variantJoins = polyInfo && polyInfo.mtiVariants.length > 0 ? buildMtiJoins(contract, namespaceId, polyInfo, state.variantName, void 0).joins : [];\n\tconst where = buildStateWhere(contract, tableName, state, { namespaceId });\n\tconst projection = entries.map(([alias, selector]) => {\n\t\tconst { expr, codec } = toAggregateProjection(contract, aggregates, namespaceId, tableName, selector);\n\t\treturn ProjectionItem.of(alias, expr, codec);\n\t});\n\tlet ast = SelectAst.from(tableSourceForContract(contract, namespaceId, tableName)).withProjection(projection);\n\tif (variantJoins.length > 0) ast = ast.withJoins(variantJoins);\n\tif (where) ast = ast.withWhere(where);\n\tconst { params } = deriveParamsFromAst(ast);\n\treturn buildOrmQueryPlan(contract, ast, params);\n}\nfunction compileGroupedAggregate(contract, aggregates, namespaceId, tableName, preGroupState, groupByColumns, aggregateSpec, havingExpr, modelName, postGroup = emptyGroupPagingState()) {\n\tif (groupByColumns.length === 0) throw ormError(\"ORM.GROUP_BY_FIELD_MISSING\", \"groupBy() requires at least one field\", { meta: {\n\t\tnamespaceId,\n\t\ttableName\n\t} });\n\tconst entries = Object.entries(aggregateSpec);\n\tif (entries.length === 0) throw ormError(\"ORM.AGGREGATE_SELECTOR_MISSING\", \"groupBy().aggregate() requires at least one aggregation selector\", { meta: {\n\t\tmethod: \"groupBy.aggregate\",\n\t\tnamespaceId,\n\t\ttableName\n\t} });\n\tif (preGroupState.distinctOn !== void 0 && preGroupState.distinctOn.length > 0) {\n\t\tassertDistinctOnCapability(contract, \"distinctOn\");\n\t\tassertDistinctOnCompatibleOrder(preGroupState.orderBy, preGroupState.distinctOn.length);\n\t}\n\tconst projection = [...groupByColumns.map((column) => ProjectionItem.of(column, ColumnRef.of(tableName, column), codecRefForStorageColumn(contract.storage, namespaceId, tableName, column))), ...entries.map(([alias, selector]) => {\n\t\tconst { expr, codec } = toAggregateProjection(contract, aggregates, namespaceId, tableName, selector);\n\t\treturn ProjectionItem.of(alias, expr, codec);\n\t})];\n\tconst hasPagination = preGroupState.limit !== void 0 || preGroupState.offset !== void 0;\n\tconst hasDistinct = preGroupState.distinct !== void 0 && preGroupState.distinct.length > 0 || preGroupState.distinctOn !== void 0 && preGroupState.distinctOn.length > 0;\n\tconst needsInputSelect = hasPagination || hasDistinct;\n\tlet ast;\n\tif (needsInputSelect) {\n\t\tconst { source } = buildAggregateInput(contract, namespaceId, tableName, preGroupState, modelName, aggregateInputColumns(tableName, entries, preGroupState.orderBy, groupByColumns));\n\t\tast = SelectAst.from(source).withProjection(projection).withGroupBy(groupByColumns.map((column) => ColumnRef.of(tableName, column)));\n\t} else {\n\t\tconst polyInfo = modelName ? resolvePolymorphismInfo(contract, namespaceId, modelName) : void 0;\n\t\tconst variantJoins = polyInfo && polyInfo.mtiVariants.length > 0 ? buildMtiJoins(contract, namespaceId, polyInfo, preGroupState.variantName, void 0).joins : [];\n\t\tast = SelectAst.from(tableSourceForContract(contract, namespaceId, tableName)).withProjection(projection).withGroupBy(groupByColumns.map((column) => ColumnRef.of(tableName, column)));\n\t\tif (variantJoins.length > 0) ast = ast.withJoins(variantJoins);\n\t\tconst where = buildStateWhere(contract, tableName, preGroupState, { namespaceId });\n\t\tif (where) ast = ast.withWhere(where);\n\t}\n\tif (havingExpr) ast = ast.withHaving(validateGroupedHavingExpr(havingExpr));\n\tif (postGroup.orderBy.length > 0) ast = ast.withOrderBy(postGroup.orderBy);\n\tif (postGroup.limit !== void 0) ast = ast.withLimit(postGroup.limit);\n\tif (postGroup.offset !== void 0) ast = ast.withOffset(postGroup.offset);\n\tconst { params } = deriveParamsFromAst(ast);\n\treturn buildOrmQueryPlan(contract, ast, params);\n}\n//#endregion\n//#region src/query-plan-mutations.ts\nfunction buildReturningColumns(contract, namespaceId, tableName, returningColumns) {\n\treturn (returningColumns && returningColumns.length > 0 ? [...returningColumns] : resolveTableColumns(contract, namespaceId, tableName)).map((column) => ProjectionItem.of(column, ColumnRef.of(tableName, column), codecRefForStorageColumn(contract.storage, namespaceId, tableName, column)));\n}\nfunction toParamAssignments(contract, namespaceId, tableName, values) {\n\tconst assignments = {};\n\tconst table = storageTableForContract(contract, namespaceId, tableName);\n\tfor (const [column, value] of Object.entries(values)) {\n\t\tif (!table.columns[column]) throw ormError(\"ORM.COLUMN_UNKNOWN\", `Unknown column \"${column}\" in table \"${tableName}\"`, { meta: {\n\t\t\tnamespaceId,\n\t\t\ttableName,\n\t\t\tcolumn\n\t\t} });\n\t\tconst codec = codecRefForStorageColumn(contract.storage, namespaceId, tableName, column);\n\t\tassignments[column] = ParamRef.of(value, {\n\t\t\tname: column,\n\t\t\t...ifDefined(\"codec\", codec)\n\t\t});\n\t}\n\treturn { assignments };\n}\nfunction normalizeInsertRows(contract, namespaceId, tableName, rows) {\n\tif (rows.length === 0) throw new InternalError(\"normalizeInsertRows requires at least one row\");\n\tconst orderedColumns = [];\n\tconst seenColumns = /* @__PURE__ */ new Set();\n\tfor (const row of rows) for (const column of Object.keys(row)) {\n\t\tif (seenColumns.has(column)) continue;\n\t\tseenColumns.add(column);\n\t\torderedColumns.push(column);\n\t}\n\tconst table = storageTableForContract(contract, namespaceId, tableName);\n\treturn { rows: rows.map((row) => {\n\t\tif (orderedColumns.length === 0) return {};\n\t\tconst normalizedRow = {};\n\t\tfor (const column of orderedColumns) {\n\t\t\tif (Object.hasOwn(row, column)) {\n\t\t\t\tif (!table.columns[column]) throw ormError(\"ORM.COLUMN_UNKNOWN\", `Unknown column \"${column}\" in table \"${tableName}\"`, { meta: {\n\t\t\t\t\tnamespaceId,\n\t\t\t\t\ttableName,\n\t\t\t\t\tcolumn\n\t\t\t\t} });\n\t\t\t\tconst codec = codecRefForStorageColumn(contract.storage, namespaceId, tableName, column);\n\t\t\t\tnormalizedRow[column] = ParamRef.of(row[column], {\n\t\t\t\t\tname: column,\n\t\t\t\t\t...ifDefined(\"codec\", codec)\n\t\t\t\t});\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tnormalizedRow[column] = new DefaultValueExpr();\n\t\t}\n\t\treturn normalizedRow;\n\t}) };\n}\nfunction conflictSkipClause(tableName, conflictSkip) {\n\tif (!conflictSkip) return void 0;\n\tif (conflictSkip.columns.length === 0) return InsertOnConflict.doNothing();\n\treturn InsertOnConflict.on(conflictSkip.columns.map((column) => ColumnRef.of(tableName, column))).doNothing();\n}\nfunction compileInsertReturning(contract, namespaceId, tableName, rows, returningColumns, conflictSkip) {\n\tconst { rows: normalizedRows } = normalizeInsertRows(contract, namespaceId, tableName, rows);\n\tconst ast = InsertAst.into(tableSourceForContract(contract, namespaceId, tableName)).withRows(normalizedRows).withOnConflict(conflictSkipClause(tableName, conflictSkip)).withReturning(buildReturningColumns(contract, namespaceId, tableName, returningColumns));\n\tconst { params } = deriveParamsFromAst(ast);\n\treturn buildOrmQueryPlan(contract, ast, params);\n}\nfunction compileInsertCount(contract, namespaceId, tableName, rows, conflictSkip) {\n\tconst { rows: normalizedRows } = normalizeInsertRows(contract, namespaceId, tableName, rows);\n\tconst ast = InsertAst.into(tableSourceForContract(contract, namespaceId, tableName)).withRows(normalizedRows).withOnConflict(conflictSkipClause(tableName, conflictSkip));\n\tconst { params } = deriveParamsFromAst(ast);\n\treturn buildOrmQueryPlan(contract, ast, params);\n}\nfunction stripUndefinedValues(row) {\n\tconst result = {};\n\tfor (const [key, value] of Object.entries(row)) if (value !== void 0) result[key] = value;\n\treturn result;\n}\nfunction createTableRefRemapper(fromTable, toTable) {\n\treturn {\n\t\tcolumnRef: (col) => col.table === fromTable ? ColumnRef.of(toTable, col.column) : col,\n\t\ttableSource: (source) => {\n\t\t\tif (source.alias === fromTable) return TableSource.named(source.name, toTable, source.namespaceId);\n\t\t\tif (!source.alias && source.name === fromTable) return TableSource.named(source.name, toTable, source.namespaceId);\n\t\t\treturn source;\n\t\t},\n\t\teqColJoinOn: (on) => EqColJoinOn.of(on.left.table === fromTable ? ColumnRef.of(toTable, on.left.column) : on.left, on.right.table === fromTable ? ColumnRef.of(toTable, on.right.column) : on.right)\n\t};\n}\nfunction buildCountMutationWhere(contract, namespaceId, tableName, filters, variantName, modelName) {\n\tif (!variantName || !modelName) return combineWhereExprs(filters);\n\tconst polyInfo = resolvePolymorphismInfo(contract, namespaceId, modelName);\n\tconst variant = polyInfo?.variants.get(variantName);\n\tif (!polyInfo || !variant || variant.strategy !== \"mti\") return combineWhereExprs(filters);\n\tconst pkColumns = resolvePrimaryKeyColumns(contract, namespaceId, tableName);\n\tconst baseTableRef = `${tableName}__write_filter`;\n\tconst remapper = createTableRefRemapper(tableName, baseTableRef);\n\tconst innerFilters = filters.map((filter) => filter.rewrite(remapper));\n\tconst where = combineWhereExprs([...pkColumns.map((column) => BinaryExpr.eq(ColumnRef.of(baseTableRef, column), ColumnRef.of(tableName, column))), ...innerFilters]);\n\tconst joinOn = buildPrimaryKeyJoinOn(baseTableRef, variant.table, pkColumns);\n\tlet subquery = SelectAst.from(TableSource.named(tableName, baseTableRef, namespaceId)).withProjection(pkColumns.map((column) => ProjectionItem.of(column, ColumnRef.of(baseTableRef, column)))).withJoins([JoinAst.inner(tableSourceForContract(contract, namespaceId, variant.table), joinOn)]);\n\tif (where) subquery = subquery.withWhere(where);\n\treturn ExistsExpr.exists(subquery);\n}\nfunction groupRowsByColumnSignature(rows) {\n\tconst groups = [];\n\tlet currentKey = \"\";\n\tlet currentGroup = [];\n\tfor (const rawRow of rows) {\n\t\tconst row = stripUndefinedValues(rawRow);\n\t\tconst key = Object.keys(row).sort().join(\",\");\n\t\tif (key !== currentKey || currentGroup.length === 0) {\n\t\t\tif (currentGroup.length > 0) groups.push(currentGroup);\n\t\t\tcurrentKey = key;\n\t\t\tcurrentGroup = [row];\n\t\t} else currentGroup.push(row);\n\t}\n\tif (currentGroup.length > 0) groups.push(currentGroup);\n\treturn groups;\n}\nfunction compileInsertReturningSplit(contract, namespaceId, tableName, rows, returningColumns, conflictSkip) {\n\tif (rows.length === 0) throw ormError(\"ORM.MUTATION_DATA_MISSING\", \"create() requires at least one row\", { meta: {\n\t\tmethod: \"create\",\n\t\tnamespaceId,\n\t\ttableName\n\t} });\n\treturn groupRowsByColumnSignature(rows).map((group) => compileInsertReturning(contract, namespaceId, tableName, group, returningColumns, conflictSkip));\n}\nfunction compileInsertCountSplit(contract, namespaceId, tableName, rows, conflictSkip) {\n\tif (rows.length === 0) throw ormError(\"ORM.MUTATION_DATA_MISSING\", \"createAndCount() requires at least one row\", { meta: {\n\t\tmethod: \"createAndCount\",\n\t\tnamespaceId,\n\t\ttableName\n\t} });\n\treturn groupRowsByColumnSignature(rows).map((group) => compileInsertCount(contract, namespaceId, tableName, group, conflictSkip));\n}\nfunction compileUpsertReturning(contract, namespaceId, tableName, createValues, updateValues, conflictColumns, returningColumns) {\n\tconst createAssignments = toParamAssignments(contract, namespaceId, tableName, createValues);\n\tconst updateAssignments = Object.keys(updateValues).length > 0 ? toParamAssignments(contract, namespaceId, tableName, updateValues) : void 0;\n\tconst onConflict = updateAssignments ? InsertOnConflict.on(conflictColumns.map((column) => ColumnRef.of(tableName, column))).doUpdateSet(updateAssignments.assignments) : InsertOnConflict.on(conflictColumns.map((column) => ColumnRef.of(tableName, column))).doNothing();\n\tconst ast = InsertAst.into(tableSourceForContract(contract, namespaceId, tableName)).withRows([createAssignments.assignments]).withOnConflict(onConflict).withReturning(buildReturningColumns(contract, namespaceId, tableName, returningColumns));\n\tconst { params } = deriveParamsFromAst(ast);\n\treturn buildOrmQueryPlan(contract, ast, params);\n}\nfunction compileUpdateReturning(contract, namespaceId, tableName, setValues, filters, returningColumns) {\n\tconst where = combineWhereExprs(filters);\n\tconst { assignments } = toParamAssignments(contract, namespaceId, tableName, setValues);\n\tlet ast = UpdateAst.table(tableSourceForContract(contract, namespaceId, tableName)).withSet(assignments).withReturning(buildReturningColumns(contract, namespaceId, tableName, returningColumns));\n\tif (where) ast = ast.withWhere(where);\n\tconst { params } = deriveParamsFromAst(ast);\n\treturn buildOrmQueryPlan(contract, ast, params);\n}\nfunction compileUpdateCount(contract, namespaceId, tableName, setValues, filters, variantName, modelName) {\n\tconst where = buildCountMutationWhere(contract, namespaceId, tableName, filters, variantName, modelName);\n\tconst { assignments } = toParamAssignments(contract, namespaceId, tableName, setValues);\n\tlet ast = UpdateAst.table(tableSourceForContract(contract, namespaceId, tableName)).withSet(assignments);\n\tif (where) ast = ast.withWhere(where);\n\tconst { params } = deriveParamsFromAst(ast);\n\treturn buildOrmQueryPlan(contract, ast, params);\n}\nfunction compileDeleteReturning(contract, namespaceId, tableName, filters, returningColumns) {\n\tconst where = combineWhereExprs(filters);\n\tlet ast = DeleteAst.from(tableSourceForContract(contract, namespaceId, tableName)).withReturning(buildReturningColumns(contract, namespaceId, tableName, returningColumns));\n\tif (where) ast = ast.withWhere(where);\n\tconst { params } = deriveParamsFromAst(ast);\n\treturn buildOrmQueryPlan(contract, ast, params);\n}\nfunction compileDeleteCount(contract, namespaceId, tableName, filters, variantName, modelName) {\n\tconst where = buildCountMutationWhere(contract, namespaceId, tableName, filters, variantName, modelName);\n\tlet ast = DeleteAst.from(tableSourceForContract(contract, namespaceId, tableName));\n\tif (where) ast = ast.withWhere(where);\n\tconst { params } = deriveParamsFromAst(ast);\n\treturn buildOrmQueryPlan(contract, ast, params);\n}\n//#endregion\n//#region src/lock-guards.ts\nfunction includeCarriesLock(include) {\n\treturn [\n\t\tinclude.nested,\n\t\t...include.scalar === void 0 ? [] : [include.scalar.state],\n\t\t...Object.values(include.combine ?? {}).map((branch) => branch.kind === \"rows\" ? branch.state : branch.selector.state)\n\t].some(stateCarriesLock);\n}\nfunction stateCarriesLock(state) {\n\treturn state.locking !== void 0 || state.includes.some(includeCarriesLock);\n}\nfunction conflictOf(state, call) {\n\tif (state.includes.some(includeCarriesLock)) return \"includeRefinement\";\n\tif (state.locking === void 0) return void 0;\n\tif (call !== void 0) return call;\n\tif (state.includes.length > 0) return \"include\";\n\tif (state.distinct !== void 0 && state.distinct.length > 0) return \"distinct\";\n\tif (state.distinctOn !== void 0 && state.distinctOn.length > 0) return \"distinctOn\";\n}\n/** Refuses a row lock the ORM cannot render: inside an include, with include, distinct or distinctOn in the state, or before a call that drops it. */\nfunction assertLockCompatible(state, call) {\n\tconst conflict = conflictOf(state, call);\n\tif (conflict !== void 0) throw lockIncompatible(conflict, `A locking clause cannot be combined with ${conflict}`);\n}\n//#endregion\n//#region src/selection-shaping.ts\nfunction augmentSelectionForJoinColumns(selectedFields, requiredColumns) {\n\tif (!selectedFields) return {\n\t\tselectedForQuery: selectedFields,\n\t\thiddenColumns: []\n\t};\n\tconst hiddenColumns = requiredColumns.filter((column) => !selectedFields.includes(column));\n\tif (hiddenColumns.length === 0) return {\n\t\tselectedForQuery: selectedFields,\n\t\thiddenColumns: []\n\t};\n\treturn {\n\t\tselectedForQuery: [...selectedFields, ...hiddenColumns],\n\t\thiddenColumns\n\t};\n}\n//#endregion\n//#region src/query-plan-select.ts\n/**\n* The rule for which JSON projection variant an include entry carries. Every\n* site that puts a value into a `json_build_object` or a `json_agg` goes\n* through here, and the renderers read the variant to decide how the value\n* reaches JSON.\n*\n* - `codec`: the value is a column whose storage codec is known, so the\n* renderer can ask that codec's descriptor for the projection producing its\n* canonical JSON. The `CodecRef` is resolved at planning time by\n* `codecRefForStorageColumn` and carried on the `ProjectionItem` through\n* every wrap between the column and here.\n* - `document`: the value is already a JSON document — a nested include's\n* correlated subquery, a combine branch, or the object a child row set is\n* aggregated from. Its parts were made canonical at the level that produced\n* them; this level only nests it.\n* - `native`: the value has no codec identity. The case that reaches it is an\n* aggregate the target declares no overload for — SQLite computes `sum` over\n* a text column from whatever leading numbers the rows held, and declines to\n* type the result. Native is what a value with no codec identity means, which\n* is a different thing from defaulting a codec to identity — that, the\n* project forbids. An aggregate the target does declare carries the codec the\n* registry resolved for it, like any other value.\n*\n* A document never carries a codec and a codec-bearing column is never a\n* document, so the first two cases cannot both apply.\n*/\nfunction jsonEntryProjection(value, identity) {\n\tif (identity.codec !== void 0) return new CodecJsonValueProjection(value, identity.codec);\n\tif (identity.document === true) return new JsonDocumentProjection(value);\n\treturn new NativeJsonValueProjection(value);\n}\nfunction buildProjection(contract, namespaceId, tableName, selectedFields, tableRef = tableName) {\n\treturn (selectedFields !== void 0 ? [...selectedFields] : resolveTableColumns(contract, namespaceId, tableName)).map((column) => ProjectionItem.of(column, ColumnRef.of(tableRef, column), codecRefForStorageColumn(contract.storage, namespaceId, tableName, column)));\n}\nfunction appendUnique(values, value) {\n\tif (!values.includes(value)) values.push(value);\n}\nfunction resolvePolymorphicProjectionSelection(contract, namespaceId, modelName, polyInfo, state) {\n\tif (state.selectedFields === void 0) return {\n\t\tbaseSelectedFields: void 0,\n\t\tselectedMtiColumnsByTable: void 0,\n\t\tneedsHiddenDiscriminator: false\n\t};\n\tconst baseTableColumns = new Set(resolveTableColumns(contract, namespaceId, polyInfo.baseTable));\n\tconst baseFieldToColumn = getFieldToColumnMap(contract, namespaceId, modelName);\n\tconst variantFieldMaps = Array.from(polyInfo.variants.values(), (variant) => ({\n\t\tvariant,\n\t\tcolumnToField: getCompleteColumnToFieldMap(contract, namespaceId, variant.modelName)\n\t}));\n\tconst baseSelectedFields = [];\n\tconst selectedMtiColumnsByTable = /* @__PURE__ */ new Map();\n\tlet hasVariantOwnedSelection = false;\n\tfor (const selectedField of state.selectedFields) {\n\t\tconst baseColumn = baseFieldToColumn[selectedField] ?? (baseTableColumns.has(selectedField) ? selectedField : void 0);\n\t\tif (baseColumn !== void 0) appendUnique(baseSelectedFields, baseColumn);\n\t\tlet matchedVariantField = false;\n\t\tfor (const { variant, columnToField } of variantFieldMaps) for (const [column, field] of Object.entries(columnToField)) {\n\t\t\tif (selectedField !== field && selectedField !== column) continue;\n\t\t\tmatchedVariantField = true;\n\t\t\thasVariantOwnedSelection = true;\n\t\t\tif (variant.strategy === \"sti\") {\n\t\t\t\tappendUnique(baseSelectedFields, column);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tlet selectedColumns = selectedMtiColumnsByTable.get(variant.table);\n\t\t\tif (selectedColumns === void 0) {\n\t\t\t\tselectedColumns = /* @__PURE__ */ new Set();\n\t\t\t\tselectedMtiColumnsByTable.set(variant.table, selectedColumns);\n\t\t\t}\n\t\t\tselectedColumns.add(column);\n\t\t}\n\t\tif (baseColumn === void 0 && !matchedVariantField) appendUnique(baseSelectedFields, selectedField);\n\t}\n\treturn {\n\t\tbaseSelectedFields,\n\t\tselectedMtiColumnsByTable,\n\t\tneedsHiddenDiscriminator: state.variantName === void 0 && hasVariantOwnedSelection && !baseSelectedFields.includes(polyInfo.discriminatorColumn)\n\t};\n}\nfunction buildHiddenDiscriminatorProjection(contract, namespaceId, polyInfo, tableRef, needed) {\n\tif (!needed) return [];\n\treturn [ProjectionItem.of(POLYMORPHIC_DISCRIMINATOR_ALIAS, ColumnRef.of(tableRef, polyInfo.discriminatorColumn), codecRefForStorageColumn(contract.storage, namespaceId, polyInfo.baseTable, polyInfo.discriminatorColumn))];\n}\nfunction buildIncludeOrderArtifacts(relationName, rowAlias, childOrderBy) {\n\tif (!childOrderBy || childOrderBy.length === 0) return {\n\t\tchildOrderBy: void 0,\n\t\thiddenOrderProjection: [],\n\t\taggregateOrderBy: void 0\n\t};\n\tconst hiddenOrderProjection = childOrderBy.map((orderItem, index) => ProjectionItem.of(`${relationName}__order_${index}`, orderItem.expr));\n\treturn {\n\t\tchildOrderBy,\n\t\thiddenOrderProjection,\n\t\taggregateOrderBy: hiddenOrderProjection.map((projection, index) => {\n\t\t\tconst orderItem = childOrderBy[index];\n\t\t\tif (!orderItem) throw new InternalError(`Missing include order metadata at index ${index}`);\n\t\t\treturn orderItem.withExpr(ColumnRef.of(rowAlias, projection.alias));\n\t\t})\n\t};\n}\nfunction localColumnsForRowInclude(include) {\n\treturn include.through?.parentLocalColumns ?? include.localColumns;\n}\nfunction buildIncludeJoinExpr(include, childTableRef, parentLocalRefs) {\n\tinvariant(parentLocalRefs.length === include.targetColumns.length, `Include '${include.relationName}' has mismatched join column counts: ${parentLocalRefs.length} local, ${include.targetColumns.length} target`);\n\tconst joinExprs = include.targetColumns.map((targetColumn, i) => {\n\t\tconst parentLocalRef = parentLocalRefs[i];\n\t\tassertDefined(parentLocalRef, `Include '${include.relationName}': no local column at ${i}`);\n\t\treturn BinaryExpr.eq(ColumnRef.of(childTableRef, targetColumn), parentLocalRef);\n\t});\n\tconst [firstExpr] = joinExprs;\n\tassertDefined(firstExpr, `Include '${include.relationName}' has no join columns`);\n\treturn joinExprs.length === 1 ? firstExpr : AndExpr.of(joinExprs);\n}\nfunction resolveParentLocalRefs(parentSource, include, localColumns) {\n\treturn localColumns.map((column) => {\n\t\tif (include.localTableName === parentSource.baseTableName) return ColumnRef.of(parentSource.tableRef, column);\n\t\tif (parentSource.variantColumnsProjected) return ColumnRef.of(parentSource.tableRef, `${include.localTableName}__${column}`);\n\t\treturn ColumnRef.of(include.localTableName, column);\n\t});\n}\nfunction resolveChildTableSource(include, parentLocalRefs) {\n\tconst alias = parentLocalRefs.some((ref) => ref.table === include.relatedTableName) ? `${include.relationName}__child` : void 0;\n\treturn {\n\t\talias,\n\t\ttableRef: alias ?? include.relatedTableName\n\t};\n}\n/**\n* Recursively build the correlated-subquery projections for the nested\n* includes attached to a child SELECT. Used by `buildIncludeChildRowsSelect`\n* to wire depth-2+ aggregates into the inner SELECT at each level.\n*\n* Each nested include contributes a single projection item whose\n* expression is a correlated subquery.\n*/\nfunction buildNestedIncludeProjections(contract, aggregates, parentSource, includes) {\n\treturn includes.map((nested) => buildCorrelatedIncludeProjection(contract, aggregates, parentSource, nested).projection);\n}\n/**\n* The aliases a level's nested includes contribute. Each such subquery\n* projects a JSON document — an object for a scalar include, an array of\n* objects for a row include — which is what tells the enclosing level to nest\n* the value rather than convert it.\n*/\nfunction documentAliasesOf(nestedProjections) {\n\treturn new Set(nestedProjections.map((item) => item.alias));\n}\n/**\n* Resolve the MTI variant joins + `variant_table__column` projection for an\n* include whose target model is polymorphic, mirroring the parent path in\n* `compileSelectWithIncludes`. The discriminator column and any STI\n* variant-specific columns live on the base table and reach the row through\n* the ordinary base-column projection (`buildProjection`); only the MTI\n* variant tables need a join.\n*\n* When the child base table is aliased (self-relations), `buildMtiJoins`\n* emits a join `ON` against the unaliased base table name, which would fall\n* out of scope. Remap it to the child alias — the same remap the row builder\n* already applies to `orderBy`/`where`.\n*/\nfunction buildChildPolymorphismJoinsAndProjection(contract, include, childTableAlias, childTableRef) {\n\tconst polyInfo = resolvePolymorphismInfo(contract, include.relatedNamespaceId, include.relatedModelName);\n\tif (!polyInfo) return {\n\t\tjoins: [],\n\t\tprojection: [],\n\t\thiddenProjection: [],\n\t\tbaseSelectedFields: include.nested.selectedFields\n\t};\n\tconst selection = resolvePolymorphicProjectionSelection(contract, include.relatedNamespaceId, include.relatedModelName, polyInfo, include.nested);\n\tconst { joins, projection } = buildMtiJoins(contract, include.relatedNamespaceId, polyInfo, include.nested.variantName, selection.selectedMtiColumnsByTable);\n\tconst hiddenProjection = buildHiddenDiscriminatorProjection(contract, include.relatedNamespaceId, polyInfo, childTableRef, selection.needsHiddenDiscriminator);\n\tif (!childTableAlias) return {\n\t\tjoins,\n\t\tprojection,\n\t\thiddenProjection,\n\t\tbaseSelectedFields: selection.baseSelectedFields\n\t};\n\tconst remapper = createTableRefRemapper$1(polyInfo.baseTable, childTableRef);\n\treturn {\n\t\tjoins: joins.map((join) => join.rewrite(remapper)),\n\t\tprojection,\n\t\thiddenProjection,\n\t\tbaseSelectedFields: selection.baseSelectedFields\n\t};\n}\nfunction buildRequiredMtiJoinKeyProjection(contract, include) {\n\tconst polyInfo = resolvePolymorphismInfo(contract, include.relatedNamespaceId, include.relatedModelName);\n\tif (!polyInfo) return [];\n\tconst mtiTables = new Set(polyInfo.mtiVariants.map((variant) => variant.table));\n\tconst aliases = /* @__PURE__ */ new Set();\n\tconst projection = [];\n\tfor (const nested of include.nested.includes) {\n\t\tif (!mtiTables.has(nested.localTableName)) continue;\n\t\tfor (const column of localColumnsForRowInclude(nested)) {\n\t\t\tconst alias = `${nested.localTableName}__${column}`;\n\t\t\tif (aliases.has(alias)) continue;\n\t\t\taliases.add(alias);\n\t\t\tprojection.push(ProjectionItem.of(alias, ColumnRef.of(nested.localTableName, column), codecRefForStorageColumn(contract.storage, include.relatedNamespaceId, nested.localTableName, column)));\n\t\t}\n\t}\n\treturn projection;\n}\nfunction mergeProjectionByAlias(projection, additional) {\n\tconst aliases = new Set(projection.map((item) => item.alias));\n\tconst merged = [...projection];\n\tfor (const item of additional) if (!aliases.has(item.alias)) {\n\t\taliases.add(item.alias);\n\t\tmerged.push(item);\n\t}\n\treturn merged;\n}\n/**\n* Build the correlated WHERE and junction JOIN artifacts for a many-to-many\n* include. The resulting WHERE correlates the junction to the parent rows\n* (AND-ed across all column pairs for composite keys). The junction JOIN\n* connects child rows to the junction via the child columns.\n*/\nfunction buildManyToManyJunctionArtifacts(parentLocalRefs, childTableRef, through) {\n\tconst { table: junctionTable, parentColumns, childColumns, targetColumns, namespaceId } = through;\n\tinvariant(childColumns.length === targetColumns.length, `M:N junction '${junctionTable}': childColumns (${childColumns.length}) and targetColumns (${targetColumns.length}) must have equal length`);\n\tinvariant(parentColumns.length === parentLocalRefs.length, `M:N junction '${junctionTable}': parentColumns (${parentColumns.length}) and parentLocalColumns (${parentLocalRefs.length}) must have equal length`);\n\tconst joinOnPairs = childColumns.map((junctionCol, i) => {\n\t\tconst targetCol = targetColumns[i];\n\t\tassertDefined(targetCol, `M:N junction '${junctionTable}': missing target column at index ${i}`);\n\t\treturn BinaryExpr.eq(ColumnRef.of(junctionTable, junctionCol), ColumnRef.of(childTableRef, targetCol));\n\t});\n\tconst firstJoinPair = joinOnPairs[0];\n\tconst joinOn = joinOnPairs.length === 1 && firstJoinPair ? firstJoinPair : AndExpr.of(joinOnPairs);\n\tconst correlationPairs = parentColumns.map((junctionCol, i) => {\n\t\tconst parentLocalRef = parentLocalRefs[i];\n\t\tassertDefined(parentLocalRef, `M:N junction '${junctionTable}': missing parent-local column ref at index ${i}`);\n\t\treturn BinaryExpr.eq(ColumnRef.of(junctionTable, junctionCol), parentLocalRef);\n\t});\n\tconst firstCorrelationPair = correlationPairs[0];\n\treturn {\n\t\twhereExpr: correlationPairs.length === 1 && firstCorrelationPair ? firstCorrelationPair : AndExpr.of(correlationPairs),\n\t\tjunctionJoin: JoinAst.inner(TableSource.named(junctionTable, void 0, namespaceId), joinOn, false)\n\t};\n}\nfunction buildIncludeChildRowsSelect(contract, aggregates, parentSource, include) {\n\tconst childState = include.nested;\n\tif (childState.distinctOn !== void 0 && childState.distinctOn.length > 0) {\n\t\tassertDistinctOnCapability(contract, \"distinctOn\");\n\t\tassertDistinctOnCompatibleOrder(childState.orderBy, childState.distinctOn.length);\n\t}\n\tconst parentLocalRefs = resolveParentLocalRefs(parentSource, include, localColumnsForRowInclude(include));\n\tconst childSource = resolveChildTableSource(include, parentLocalRefs);\n\tconst childTableAlias = childSource.alias;\n\tconst childTableRef = childSource.tableRef;\n\tconst rowsAlias = `${include.relationName}__rows`;\n\tconst remappedChildOrderBy = childTableAlias && childState.orderBy ? childState.orderBy.map((item) => item.rewrite(createTableRefRemapper$1(include.relatedTableName, childTableRef))) : childState.orderBy;\n\tconst { childOrderBy, hiddenOrderProjection, aggregateOrderBy } = buildIncludeOrderArtifacts(include.relationName, rowsAlias, remappedChildOrderBy);\n\tconst childWhere = buildStateWhere(contract, childTableRef, childState, {\n\t\tfilterTableName: include.relatedTableName,\n\t\tnamespaceId: include.relatedNamespaceId\n\t});\n\tlet whereExpr;\n\tlet junctionJoins = [];\n\tif (include.through !== void 0) {\n\t\tconst artifacts = buildManyToManyJunctionArtifacts(parentLocalRefs, childTableRef, include.through);\n\t\twhereExpr = childWhere ? AndExpr.of([artifacts.whereExpr, childWhere]) : artifacts.whereExpr;\n\t\tjunctionJoins = [artifacts.junctionJoin];\n\t} else {\n\t\tconst joinExpr = buildIncludeJoinExpr(include, childTableRef, parentLocalRefs);\n\t\twhereExpr = childWhere ? AndExpr.of([joinExpr, childWhere]) : joinExpr;\n\t}\n\tif (childState.distinct !== void 0 && childState.distinct.length > 0 && childState.includes.length > 0) return buildDistinctNonLeafChildRowsSelect({\n\t\tcontract,\n\t\taggregates,\n\t\tinclude,\n\t\tchildTableAlias,\n\t\tchildTableRef,\n\t\trowsAlias,\n\t\tchildOrderBy,\n\t\thiddenOrderProjection,\n\t\taggregateOrderBy,\n\t\twhereExpr,\n\t\tjunctionJoins\n\t});\n\tconst polyJoinsAndProjection = buildChildPolymorphismJoinsAndProjection(contract, include, childTableAlias, childTableRef);\n\tconst scalarProjection = buildProjection(contract, include.relatedNamespaceId, include.relatedTableName, polyJoinsAndProjection.baseSelectedFields, childTableRef);\n\tconst nestedProjections = buildNestedIncludeProjections(contract, aggregates, {\n\t\tbaseTableName: include.relatedTableName,\n\t\ttableRef: childTableRef,\n\t\tvariantColumnsProjected: false\n\t}, childState.includes);\n\tconst childProjection = [\n\t\t...scalarProjection,\n\t\t...polyJoinsAndProjection.projection,\n\t\t...polyJoinsAndProjection.hiddenProjection,\n\t\t...nestedProjections\n\t];\n\tlet childRows = SelectAst.from(tableSourceForContract(contract, include.relatedNamespaceId, include.relatedTableName, childTableAlias)).withProjection([...childProjection, ...hiddenOrderProjection]).withWhere(whereExpr);\n\tif (polyJoinsAndProjection.joins.length > 0) childRows = childRows.withJoins([...polyJoinsAndProjection.joins]);\n\tif (junctionJoins.length > 0) childRows = childRows.withJoins(junctionJoins);\n\tif (childState.distinctOn && childState.distinctOn.length > 0) {\n\t\tchildRows = childRows.withDistinctOn(childState.distinctOn.map((column) => ColumnRef.of(childTableRef, column)));\n\t\tif (childOrderBy) childRows = childRows.withOrderBy(childOrderBy);\n\t} else if (childState.distinct && childState.distinct.length > 0) {\n\t\tconst rankedAlias = `${include.relationName}__distinct`;\n\t\tchildRows = wrapWithRowNumberDedup({\n\t\t\tbase: childRows,\n\t\t\tdistinctColumnRefs: childState.distinct.map((column) => ColumnRef.of(childTableRef, column)),\n\t\t\trankingOrderBy: childOrderBy ?? [],\n\t\t\trankedAlias\n\t\t});\n\t\tif (childOrderBy) childRows = childRows.withOrderBy(childOrderBy.map((item, index) => item.withExpr(ColumnRef.of(rankedAlias, `${include.relationName}__order_${index}`))));\n\t} else if (childOrderBy) childRows = childRows.withOrderBy(childOrderBy);\n\tif (childState.limit !== void 0) childRows = childRows.withLimit(childState.limit);\n\tif (childState.offset !== void 0) childRows = childRows.withOffset(childState.offset);\n\treturn {\n\t\tchildRows,\n\t\tchildProjection,\n\t\tdocumentAliases: documentAliasesOf(nestedProjections),\n\t\trowsAlias,\n\t\taggregateOrderBy\n\t};\n}\nfunction buildDistinctNonLeafChildRowsSelect(options) {\n\tconst { contract, aggregates, include, childTableAlias, childTableRef, rowsAlias, childOrderBy, hiddenOrderProjection, aggregateOrderBy, whereExpr, junctionJoins } = options;\n\tconst childState = include.nested;\n\tconst grandchildJoinColumns = Array.from(new Set(childState.includes.flatMap((nested) => nested.localTableName === include.relatedTableName ? localColumnsForRowInclude(nested) : [])));\n\tconst { selectedForQuery } = augmentSelectionForJoinColumns(childState.selectedFields, grandchildJoinColumns);\n\tconst visiblePolyProjection = buildChildPolymorphismJoinsAndProjection(contract, include, childTableAlias, childTableRef);\n\tconst queryPolyProjection = buildChildPolymorphismJoinsAndProjection(contract, {\n\t\t...include,\n\t\tnested: {\n\t\t\t...childState,\n\t\t\tselectedFields: selectedForQuery\n\t\t}\n\t}, childTableAlias, childTableRef);\n\tconst innerScalarProjection = buildProjection(contract, include.relatedNamespaceId, include.relatedTableName, queryPolyProjection.baseSelectedFields, childTableRef);\n\tconst innerMtiProjection = mergeProjectionByAlias(queryPolyProjection.projection, buildRequiredMtiJoinKeyProjection(contract, include));\n\tlet baseInner = SelectAst.from(tableSourceForContract(contract, include.relatedNamespaceId, include.relatedTableName, childTableAlias)).withProjection([\n\t\t...innerScalarProjection,\n\t\t...innerMtiProjection,\n\t\t...queryPolyProjection.hiddenProjection,\n\t\t...hiddenOrderProjection\n\t]).withWhere(whereExpr);\n\tconst distinctExtraJoins = [...queryPolyProjection.joins, ...junctionJoins];\n\tif (distinctExtraJoins.length > 0) baseInner = baseInner.withJoins(distinctExtraJoins);\n\tconst distinctColumns = childState.distinct;\n\tif (distinctColumns === void 0 || distinctColumns.length === 0) throw new InternalError(\"buildDistinctNonLeafChildRowsSelect requires a non-empty `distinct` selection\");\n\tconst rankedAlias = `${include.relationName}__ranked`;\n\tlet innerSelect = wrapWithRowNumberDedup({\n\t\tbase: baseInner,\n\t\tdistinctColumnRefs: distinctColumns.map((column) => ColumnRef.of(childTableRef, column)),\n\t\trankingOrderBy: childOrderBy ?? [],\n\t\trankedAlias\n\t});\n\tif (childOrderBy) innerSelect = innerSelect.withOrderBy(childOrderBy.map((item, index) => item.withExpr(ColumnRef.of(rankedAlias, `${include.relationName}__order_${index}`))));\n\tif (childState.limit !== void 0) innerSelect = innerSelect.withLimit(childState.limit);\n\tif (childState.offset !== void 0) innerSelect = innerSelect.withOffset(childState.offset);\n\tconst distinctAlias = `${include.relationName}__distinct`;\n\tconst outerScalarProjection = buildProjection(contract, include.relatedNamespaceId, include.relatedTableName, visiblePolyProjection.baseSelectedFields, distinctAlias);\n\tconst outerNestedProjections = buildNestedIncludeProjections(contract, aggregates, {\n\t\tbaseTableName: include.relatedTableName,\n\t\ttableRef: distinctAlias,\n\t\tvariantColumnsProjected: true\n\t}, childState.includes);\n\tconst outerPolyProjection = visiblePolyProjection.projection.map((proj) => ProjectionItem.of(proj.alias, ColumnRef.of(distinctAlias, proj.alias), proj.codec));\n\tconst outerHiddenProjection = visiblePolyProjection.hiddenProjection.map((proj) => ProjectionItem.of(proj.alias, ColumnRef.of(distinctAlias, proj.alias), proj.codec));\n\tconst outerHiddenOrderProjection = hiddenOrderProjection.map((proj) => ProjectionItem.of(proj.alias, ColumnRef.of(distinctAlias, proj.alias), proj.codec));\n\tconst childProjection = [\n\t\t...outerScalarProjection,\n\t\t...outerPolyProjection,\n\t\t...outerHiddenProjection,\n\t\t...outerNestedProjections\n\t];\n\treturn {\n\t\tchildRows: SelectAst.from(DerivedTableSource.as(distinctAlias, innerSelect)).withProjection([...childProjection, ...outerHiddenOrderProjection]),\n\t\tchildProjection,\n\t\tdocumentAliases: documentAliasesOf(outerNestedProjections),\n\t\trowsAlias,\n\t\taggregateOrderBy\n\t};\n}\n/**\n* Build the inner SELECT for a scalar include reducer (any operation the aggregate registry\n* contributes).\n*\n* Emits one row containing `json_build_object('value', AGG(...))`\n* over the child relation correlated to the parent via the FK. The\n* JSON wrap lets the value flow through the existing include-payload\n* decoder unchanged (it JSON.parses the column and the scalar branch\n* pulls `.value` out).\n*\n* The refine state's pipeline composes through to the aggregate's\n* input set: `where` / `orderBy` / `limit` / `offset` / `distinct` shape\n* the rows the aggregate sees, matching the natural compositional\n* semantic of\n*\n* `db.User.include('posts', p => p.where(W).limit(N).count()) // ≤ N`\n*\n* When `limit` / `offset` / `distinct` is set, the aggregate's input\n* cannot just be the bare correlated table — a top-level `LIMIT` on\n* the aggregating SELECT only trims the (already one-row) output, not\n* the rows being aggregated. We therefore wrap the source in a\n* derived SELECT that materialises the shaped row set, then\n* aggregate over that. `orderBy` alone (no `limit` / `offset` /\n* `distinct`) is dropped at the SQL level since reordering does not\n* change which rows are aggregated.\n*/\nfunction buildIncludeChildScalarSelect(contract, aggregates, parentSource, include, scalar) {\n\tconst { codec: resultCodec, input: inputCodec, lower: resultLowering } = resolveAggregate({\n\t\taggregates,\n\t\tcontract,\n\t\tnamespaceId: include.relatedNamespaceId,\n\t\ttableName: include.relatedTableName,\n\t\tfn: scalar.fn,\n\t\tcolumn: scalar.column\n\t});\n\tconst parentLocalRefs = resolveParentLocalRefs(parentSource, include, localColumnsForRowInclude(include));\n\tconst childSource = resolveChildTableSource(include, parentLocalRefs);\n\tconst childTableAlias = childSource.alias;\n\tconst childTableRef = childSource.tableRef;\n\tconst state = scalar.state;\n\tif (state.distinctOn !== void 0 && state.distinctOn.length > 0) {\n\t\tassertDistinctOnCapability(contract, \"distinctOn\");\n\t\tassertDistinctOnCompatibleOrder(state.orderBy, state.distinctOn.length);\n\t}\n\tconst childWhere = buildStateWhere(contract, childTableRef, state, {\n\t\tfilterTableName: include.relatedTableName,\n\t\tnamespaceId: include.relatedNamespaceId\n\t});\n\tlet whereExpr;\n\tlet junctionJoins = [];\n\tif (include.through !== void 0) {\n\t\tconst artifacts = buildManyToManyJunctionArtifacts(parentLocalRefs, childTableRef, include.through);\n\t\twhereExpr = childWhere ? AndExpr.of([artifacts.whereExpr, childWhere]) : artifacts.whereExpr;\n\t\tjunctionJoins = [artifacts.junctionJoin];\n\t} else {\n\t\tconst joinExpr = buildIncludeJoinExpr(include, childTableRef, parentLocalRefs);\n\t\twhereExpr = childWhere ? AndExpr.of([joinExpr, childWhere]) : joinExpr;\n\t}\n\tconst remappedOrderBy = childTableAlias && state.orderBy ? state.orderBy.map((item) => item.rewrite(createTableRefRemapper$1(include.relatedTableName, childTableRef))) : state.orderBy;\n\tconst hasPagination = state.limit !== void 0 || state.offset !== void 0;\n\tconst hasDistinct = state.distinct !== void 0 && state.distinct.length > 0 || state.distinctOn !== void 0 && state.distinctOn.length > 0;\n\tif (!(hasPagination || hasDistinct)) {\n\t\tconst aggregateExpr = buildIncludeAggregateExpr(scalar, childTableRef, resultLowering, inputCodec);\n\t\tconst jsonObjectExpr = JsonObjectExpr.fromEntries([JsonObjectExpr.entry(\"value\", jsonEntryProjection(aggregateExpr, { codec: resultCodec }))]);\n\t\tlet select = SelectAst.from(tableSourceForContract(contract, include.relatedNamespaceId, include.relatedTableName, childTableAlias)).withProjection([ProjectionItem.of(include.relationName, jsonObjectExpr)]).withWhere(whereExpr);\n\t\tif (junctionJoins.length > 0) select = select.withJoins(junctionJoins);\n\t\treturn select;\n\t}\n\tconst innerAlias = `${include.relationName}__scalar`;\n\tconst hiddenOrderProjection = state.distinct !== void 0 && state.distinct.length > 0 && remappedOrderBy !== void 0 && remappedOrderBy.length > 0 ? remappedOrderBy.map((item, index) => ProjectionItem.of(`${include.relationName}__order_${index}`, item.expr)) : [];\n\tconst innerProjection = [...scalar.column !== void 0 ? [ProjectionItem.of(scalar.column, ColumnRef.of(childTableRef, scalar.column))] : [ProjectionItem.of(\"__row\", LiteralExpr.of(1))], ...hiddenOrderProjection];\n\tlet inner = SelectAst.from(tableSourceForContract(contract, include.relatedNamespaceId, include.relatedTableName, childTableAlias)).withProjection(innerProjection).withWhere(whereExpr);\n\tif (junctionJoins.length > 0) inner = inner.withJoins(junctionJoins);\n\tif (state.distinctOn !== void 0 && state.distinctOn.length > 0) {\n\t\tinner = inner.withDistinctOn(state.distinctOn.map((column) => ColumnRef.of(childTableRef, column)));\n\t\tif (remappedOrderBy !== void 0 && remappedOrderBy.length > 0) inner = inner.withOrderBy(remappedOrderBy);\n\t} else if (state.distinct !== void 0 && state.distinct.length > 0) {\n\t\tconst rankedAlias = `${include.relationName}__scalar_distinct`;\n\t\tinner = wrapWithRowNumberDedup({\n\t\t\tbase: inner,\n\t\t\tdistinctColumnRefs: state.distinct.map((column) => ColumnRef.of(childTableRef, column)),\n\t\t\trankingOrderBy: remappedOrderBy ?? [],\n\t\t\trankedAlias\n\t\t});\n\t\tif (remappedOrderBy !== void 0 && remappedOrderBy.length > 0) inner = inner.withOrderBy(remappedOrderBy.map((item, index) => item.withExpr(ColumnRef.of(rankedAlias, `${include.relationName}__order_${index}`))));\n\t} else if (remappedOrderBy !== void 0 && remappedOrderBy.length > 0) inner = inner.withOrderBy(remappedOrderBy);\n\tif (state.limit !== void 0) inner = inner.withLimit(state.limit);\n\tif (state.offset !== void 0) inner = inner.withOffset(state.offset);\n\tconst outerAggregateExpr = buildIncludeAggregateExpr(scalar, innerAlias, resultLowering, inputCodec);\n\tconst outerJsonObjectExpr = JsonObjectExpr.fromEntries([JsonObjectExpr.entry(\"value\", jsonEntryProjection(outerAggregateExpr, { codec: resultCodec }))]);\n\treturn SelectAst.from(DerivedTableSource.as(innerAlias, inner)).withProjection([ProjectionItem.of(include.relationName, outerJsonObjectExpr)]);\n}\nfunction buildIncludeAggregateExpr(scalar, childTableRef, lower, inputCodec) {\n\tconst expr = scalar.column === void 0 ? void 0 : ColumnRef.of(childTableRef, scalar.column);\n\tif (lower !== void 0) return lower({\n\t\texpr,\n\t\tinputCodec\n\t});\n\treturn plainAggregateExpr(scalar.fn, expr);\n}\n/**\n* Build the inner SELECT for a `combine({ a, b, ... })` include.\n*\n* Each branch produces a self-contained SELECT projecting one row\n* with one column aliased to the relation name. The branches are\n* stitched together as cross-joined derived tables (FROM <first>\n* INNER JOIN <second> ON TRUE ...), and the outer projection packs\n* them into a single `json_build_object` keyed by branch name. The\n* resulting subquery emits exactly one row per parent row containing\n* the combined JSON — embedded as a correlated subquery in the outer\n* projection.\n*\n* Row branches reuse the standalone row-include builder; scalar\n* branches reuse `buildIncludeChildScalarSelect` — the `{value: ...}`\n* envelope survives into the combined JSON and the decoder unwraps\n* it per scalar branch. Distinct/limit/offset semantics inside a row\n* branch fan out naturally because the row builder is invoked with\n* a synthetic IncludeExpr whose `nested` is the branch's state.\n*/\nfunction buildIncludeChildCombineSelect(contract, aggregates, parentSource, include, branches) {\n\tconst branchEntries = Object.entries(branches);\n\tif (branchEntries.length === 0) throw ormError(\"ORM.INCLUDE_INVALID\", `combine() include \"${include.relationName}\" has no branches`, { meta: { relation: include.relationName } });\n\tconst compiledBranches = branchEntries.map(([name, branch]) => ({\n\t\tname,\n\t\talias: `${include.relationName}__combine__${name}`,\n\t\tselect: buildIncludeChildCombineBranchSelect(contract, aggregates, parentSource, include, branch)\n\t}));\n\tconst jsonObjectExpr = JsonObjectExpr.fromEntries(compiledBranches.map((branch) => JsonObjectExpr.entry(branch.name, jsonEntryProjection(ColumnRef.of(branch.alias, include.relationName), { document: true }))));\n\tconst [firstBranch, ...restBranches] = compiledBranches;\n\tif (!firstBranch) throw new InternalError(`combine() include \"${include.relationName}\" has no branches`);\n\tconst joins = restBranches.map((branch) => JoinAst.inner(DerivedTableSource.as(branch.alias, branch.select), AndExpr.true(), false));\n\treturn SelectAst.from(DerivedTableSource.as(firstBranch.alias, firstBranch.select)).withProjection([ProjectionItem.of(include.relationName, jsonObjectExpr)]).withJoins(joins);\n}\n/**\n* Compile one branch of a `combine({ ... })` into a SelectAst that\n* projects exactly one row with one column aliased to the parent\n* relation name. Dispatches to the standalone scalar / row builders\n* with the branch's state spliced into a synthetic IncludeExpr.\n*/\nfunction buildIncludeChildCombineBranchSelect(contract, aggregates, parentSource, include, branch) {\n\tif (branch.kind === \"scalar\") return buildIncludeChildScalarSelect(contract, aggregates, parentSource, include, branch.selector);\n\treturn buildIncludeChildRowsAggregateSelect(contract, aggregates, parentSource, {\n\t\t...include,\n\t\tnested: branch.state,\n\t\tscalar: void 0,\n\t\tcombine: void 0\n\t});\n}\n/**\n* Internal helper: build the inner aggregate SELECT that `json_agg`s\n* child rows into a single JSON-array column aliased to the relation\n* name. Used by both the standalone row correlated-subquery path and\n* by combine's row branches.\n*/\nfunction buildIncludeChildRowsAggregateSelect(contract, aggregates, parentSource, include) {\n\tconst { childRows, childProjection, documentAliases, rowsAlias, aggregateOrderBy } = buildIncludeChildRowsSelect(contract, aggregates, parentSource, include);\n\tconst jsonObjectExpr = JsonObjectExpr.fromEntries(childProjection.map((item) => JsonObjectExpr.entry(item.alias, jsonEntryProjection(ColumnRef.of(rowsAlias, item.alias), {\n\t\tcodec: item.codec,\n\t\tdocument: documentAliases.has(item.alias)\n\t}))));\n\treturn SelectAst.from(DerivedTableSource.as(rowsAlias, childRows)).withProjection([ProjectionItem.of(include.relationName, JsonArrayAggExpr.of(jsonEntryProjection(jsonObjectExpr, { document: true }), \"emptyArray\", aggregateOrderBy))]);\n}\nfunction buildCorrelatedIncludeProjection(contract, aggregates, parentSource, include) {\n\tif (include.scalar) {\n\t\tconst scalarSelect = buildIncludeChildScalarSelect(contract, aggregates, parentSource, include, include.scalar);\n\t\treturn { projection: ProjectionItem.of(include.relationName, SubqueryExpr.of(scalarSelect)) };\n\t}\n\tif (include.combine) {\n\t\tconst combineSelect = buildIncludeChildCombineSelect(contract, aggregates, parentSource, include, include.combine);\n\t\treturn { projection: ProjectionItem.of(include.relationName, SubqueryExpr.of(combineSelect)) };\n\t}\n\tconst aggregateQuery = buildIncludeChildRowsAggregateSelect(contract, aggregates, parentSource, include);\n\treturn { projection: ProjectionItem.of(include.relationName, SubqueryExpr.of(aggregateQuery)) };\n}\nfunction buildSelectAst(contract, tableName, state, options) {\n\tconst namespaceId = options.namespaceId;\n\tif (state.distinctOn !== void 0 && state.distinctOn.length > 0) {\n\t\tassertDistinctOnCapability(contract, \"distinctOn\");\n\t\tassertDistinctOnCompatibleOrder(state.orderBy, state.distinctOn.length);\n\t}\n\tconst projection = [...buildProjection(contract, namespaceId, tableName, state.selectedFields, tableName), ...options.includeProjection ?? []];\n\tconst { source: fromSource, where: effectiveWhere } = buildDedupedTableSource(contract, namespaceId, tableName, state, options.where ?? buildStateWhere(contract, tableName, state, { namespaceId }), resolveTableColumns(contract, namespaceId, tableName).map((column) => ProjectionItem.of(column, ColumnRef.of(tableName, column))));\n\tlet ast = SelectAst.from(fromSource).withProjection(projection);\n\tif (effectiveWhere) ast = ast.withWhere(effectiveWhere);\n\tif (state.orderBy) ast = ast.withOrderBy(state.orderBy);\n\tif (state.selectedFields === void 0) ast = ast.withSelectAllIntent({ table: tableName });\n\tif (state.distinctOn && state.distinctOn.length > 0) ast = ast.withDistinctOn(state.distinctOn.map((column) => ColumnRef.of(tableName, column)));\n\tif (state.limit !== void 0) ast = ast.withLimit(state.limit);\n\tif (state.offset !== void 0) ast = ast.withOffset(state.offset);\n\tif (options.joins && options.joins.length > 0) ast = ast.withJoins(options.joins);\n\tif (state.locking !== void 0) ast = ast.withLocking(state.locking);\n\treturn ast;\n}\nfunction compileSelect(contract, namespaceId, tableName, state, modelName) {\n\tassertLockCompatible(state);\n\tif (state.distinctOn !== void 0 && state.distinctOn.length > 0) assertDistinctOnCapability(contract, \"distinctOn\");\n\tconst polyInfo = modelName ? resolvePolymorphismInfo(contract, namespaceId, modelName) : void 0;\n\tconst selection = polyInfo && modelName ? resolvePolymorphicProjectionSelection(contract, namespaceId, modelName, polyInfo, state) : void 0;\n\tconst projectionState = selection ? {\n\t\t...state,\n\t\tselectedFields: selection.baseSelectedFields\n\t} : state;\n\tconst mtiArtifacts = polyInfo && polyInfo.mtiVariants.length > 0 ? buildMtiJoins(contract, namespaceId, polyInfo, state.variantName, selection?.selectedMtiColumnsByTable) : void 0;\n\tconst hiddenProjection = polyInfo && selection ? buildHiddenDiscriminatorProjection(contract, namespaceId, polyInfo, tableName, selection.needsHiddenDiscriminator) : [];\n\tconst ast = buildSelectAst(contract, tableName, {\n\t\t...projectionState,\n\t\tincludes: []\n\t}, {\n\t\tjoins: mtiArtifacts?.joins ?? [],\n\t\tincludeProjection: [...mtiArtifacts?.projection ?? [], ...hiddenProjection],\n\t\tnamespaceId\n\t});\n\tconst { params } = deriveParamsFromAst(ast);\n\treturn buildOrmQueryPlan(contract, ast, params, state.annotations);\n}\nfunction compileSelectWithIncludes(contract, aggregates, namespaceId, tableName, state, modelName) {\n\tassertLockCompatible(state);\n\tconst includeJoins = [];\n\tconst includeProjection = [];\n\tconst topLevelWhere = buildStateWhere(contract, tableName, state, { namespaceId });\n\tconst polyInfo = modelName ? resolvePolymorphismInfo(contract, namespaceId, modelName) : void 0;\n\tconst selection = polyInfo && modelName ? resolvePolymorphicProjectionSelection(contract, namespaceId, modelName, polyInfo, state) : void 0;\n\tconst projectionState = selection ? {\n\t\t...state,\n\t\tselectedFields: selection.baseSelectedFields\n\t} : state;\n\tif (polyInfo && selection) {\n\t\tif (polyInfo.mtiVariants.length > 0) {\n\t\t\tconst mtiArtifacts = buildMtiJoins(contract, namespaceId, polyInfo, state.variantName, selection.selectedMtiColumnsByTable);\n\t\t\tincludeJoins.push(...mtiArtifacts.joins);\n\t\t\tincludeProjection.push(...mtiArtifacts.projection);\n\t\t}\n\t\tincludeProjection.push(...buildHiddenDiscriminatorProjection(contract, namespaceId, polyInfo, tableName, selection.needsHiddenDiscriminator));\n\t}\n\tconst parentSource = {\n\t\tbaseTableName: tableName,\n\t\ttableRef: tableName,\n\t\tvariantColumnsProjected: false\n\t};\n\tfor (const include of state.includes) {\n\t\tconst artifact = buildCorrelatedIncludeProjection(contract, aggregates, parentSource, include);\n\t\tincludeProjection.push(artifact.projection);\n\t}\n\tconst ast = buildSelectAst(contract, tableName, {\n\t\t...projectionState,\n\t\tincludes: []\n\t}, {\n\t\tjoins: includeJoins,\n\t\tincludeProjection,\n\t\tnamespaceId,\n\t\t...ifDefined(\"where\", topLevelWhere)\n\t});\n\tconst { params } = deriveParamsFromAst(ast);\n\treturn buildOrmQueryPlan(contract, ast, params, state.annotations);\n}\n//#endregion\n//#region src/query-plan-rows.ts\nfunction queryPlanRows(scope, plan) {\n\treturn scope.query(plan);\n}\n//#endregion\n//#region src/collection-dispatch.ts\nfunction describeCollectionRows(options) {\n\treturn {\n\t\t...describeExecutionRows(options),\n\t\tconsume: createPreparedRowsConsumer(options)\n\t};\n}\nfunction describeExecutionRows(options) {\n\tconst { context, state, tableName, modelName, namespaceId } = options;\n\tconst { contract } = context;\n\tconst polyInfo = resolvePolymorphismInfo(contract, namespaceId, modelName);\n\tif (state.includes.length === 0) {\n\t\tconst compiled = compileSelect(contract, namespaceId, tableName, state, modelName);\n\t\tconst mapper = polyInfo ? (rawRow) => blindCast(mapPolymorphicRow(contract, namespaceId, modelName, polyInfo, rawRow, state.variantName)) : (rawRow) => blindCast(mapStorageRowToModelFields(contract, namespaceId, modelName, rawRow));\n\t\treturn {\n\t\t\tplan: compiled,\n\t\t\tconsume: (rows) => mapResultRows(rows, mapper)\n\t\t};\n\t}\n\treturn {\n\t\tplan: compileSelectWithIncludes(contract, context.aggregateDescriptors, namespaceId, tableName, state, modelName),\n\t\tconsume: (rows) => consumeIncludeRows(context, state, namespaceId, modelName, rows)\n\t};\n}\nfunction deferResolution(resolve) {\n\ttry {\n\t\tconst value = resolve();\n\t\treturn () => value;\n\t} catch (error) {\n\t\treturn () => {\n\t\t\tthrow error;\n\t\t};\n\t}\n}\nfunction createPreparedMapper(contract, namespaceId, modelName, variantName) {\n\tconst resolved = deferResolution(() => {\n\t\tconst polyInfo = resolvePolymorphismInfo(contract, namespaceId, modelName);\n\t\treturn polyInfo ? createPolymorphicRowMapper(contract, namespaceId, modelName, polyInfo, variantName) : createStorageRowMapper(contract, namespaceId, modelName);\n\t});\n\treturn (row) => resolved()(row);\n}\nfunction createPreparedRowsConsumer(options) {\n\tconst { context, state, namespaceId, modelName } = options;\n\tconst mapRow = createPreparedMapper(context.contract, namespaceId, modelName, state.variantName);\n\tconst includes = state.includes.map((include) => createPreparedIncludeConsumer(context, include));\n\tconst castRow = (row) => blindCast(row);\n\tif (includes.length === 0) return (rows) => mapResultRows(rows, (row) => castRow(mapRow(row)));\n\treturn (rows) => new AsyncIterableResult((async function* () {\n\t\tconst parents = (await rows.toArray()).map((raw) => ({\n\t\t\traw,\n\t\t\tmapped: mapRow(raw)\n\t\t}));\n\t\tfor (const parent of parents) for (const include of includes) parent.mapped[include.alias] = include.consume(parent.raw[include.alias]);\n\t\tfor (const parent of parents) yield castRow(parent.mapped);\n\t})());\n}\nfunction createPreparedIncludeConsumer(context, include) {\n\tconst { contract } = context;\n\tconst alias = include.relationName;\n\tif (include.scalar) return {\n\t\talias,\n\t\tconsume: createPreparedScalarConsumer(context, include, include.scalar)\n\t};\n\tif (include.combine) {\n\t\tconst branches = Object.entries(include.combine).map(([name, branch]) => ({\n\t\t\tname,\n\t\t\tconsume: branch.kind === \"rows\" ? createPreparedIncludeConsumer(context, {\n\t\t\t\t...include,\n\t\t\t\tnested: branch.state,\n\t\t\t\tscalar: void 0,\n\t\t\t\tcombine: void 0\n\t\t\t}).consume : createPreparedScalarConsumer(context, include, branch.selector)\n\t\t}));\n\t\treturn {\n\t\t\talias,\n\t\t\tconsume: (raw) => {\n\t\t\t\tconst parsed = parseCombineEnvelope(include, raw);\n\t\t\t\tconst result = {};\n\t\t\t\tfor (const branch of branches) result[branch.name] = branch.consume(parsed[branch.name]);\n\t\t\t\treturn result;\n\t\t\t}\n\t\t};\n\t}\n\tconst mapRow = createPreparedMapper(contract, include.relatedNamespaceId, include.relatedModelName, include.nested.variantName);\n\tconst bindings = deferResolution(() => {\n\t\tconst tables = contract.storage.namespaces[include.relatedNamespaceId]?.entries.table;\n\t\tconst keys = new Set(Object.keys(tables?.[include.relatedTableName]?.columns ?? {}));\n\t\tconst polyInfo = resolvePolymorphismInfo(contract, include.relatedNamespaceId, include.relatedModelName);\n\t\tfor (const variant of polyInfo?.mtiVariants ?? []) for (const column of Object.keys(tables?.[variant.table]?.columns ?? {})) keys.add(`${variant.table}__${column}`);\n\t\treturn new Map([...keys].map((key) => [key, deferResolution(() => resolveIncludedColumnBinding(contract, context, include, key))]));\n\t});\n\tconst bindingFor = (key) => bindings().get(key)?.() ?? null;\n\tconst nested = include.nested.includes.map((child) => createPreparedIncludeConsumer(context, child));\n\tconst toOne = isToOneCardinality(include.cardinality);\n\tconst fused = deferResolution(() => createPreparedIncludedRowDecoder(contract, include, bindingFor));\n\treturn {\n\t\talias,\n\t\tconsume: (raw) => {\n\t\t\tconst rows = parseIncludedRows(include, raw);\n\t\t\tif (rows.length === 0) return toOne ? null : [];\n\t\t\tconst decoder = fused();\n\t\t\tif (!decoder || !rows.every(decoder.matches)) return consumeRowInclude(rows, mapRow, bindingFor, nested, toOne);\n\t\t\tconst mapped = rows.map((row) => {\n\t\t\t\tconst result = decoder.decode(row);\n\t\t\t\tfor (const child of nested) result[child.alias] = child.consume(row[child.alias]);\n\t\t\t\treturn result;\n\t\t\t});\n\t\t\treturn toOne ? mapped[0] ?? null : mapped;\n\t\t}\n\t};\n}\nfunction createPreparedIncludedRowDecoder(contract, include, bindingFor) {\n\tconst namespace = include.relatedNamespaceId;\n\tconst model = include.relatedModelName;\n\tif (resolvePolymorphismInfo(contract, namespace, model)) return void 0;\n\tconst fieldToColumn = getFieldToColumnMap(contract, namespace, model);\n\tconst columnToField = getColumnToFieldMap(contract, namespace, model);\n\tconst columns = (include.nested.selectedFields ?? Object.keys(fieldToColumn)).map((field) => Object.hasOwn(fieldToColumn, field) ? fieldToColumn[field] ?? field : field);\n\tconst aliases = include.nested.includes.map((child) => child.relationName);\n\tconst table = contract.storage.namespaces[namespace]?.entries.table?.[include.relatedTableName];\n\tif (aliases.some((alias) => table?.columns[alias] !== void 0)) return void 0;\n\tconst keys = [...columns, ...aliases];\n\tif (keys.includes(\"__proto__\") || new Set(keys).size !== keys.length) return void 0;\n\tconst operations = keys.map((key) => {\n\t\tconst binding = deferResolution(() => bindingFor(key));\n\t\treturn {\n\t\t\tkey,\n\t\t\tfield: Object.hasOwn(columnToField, key) ? columnToField[key] ?? key : key,\n\t\t\tdecode(value) {\n\t\t\t\tif (value === null || value === void 0) return value;\n\t\t\t\tconst resolved = binding();\n\t\t\t\treturn resolved ? decodeIncludedColumnValue(resolved.ref, resolved.codecId, resolved.codec, value) : value;\n\t\t\t}\n\t\t};\n\t});\n\treturn {\n\t\tmatches(row) {\n\t\t\tconst actual = Object.keys(row);\n\t\t\treturn actual.length === keys.length && actual.every((key, index) => key === keys[index]);\n\t\t},\n\t\tdecode(row) {\n\t\t\tconst result = {};\n\t\t\tfor (const operation of operations) result[operation.field] = operation.decode(row[operation.key]);\n\t\t\treturn result;\n\t\t}\n\t};\n}\nfunction createPreparedScalarConsumer(context, include, scalar) {\n\tconst metadata = deferResolution(() => resolveScalarIncludeMetadata(context.contract, context, include, scalar));\n\treturn (raw) => {\n\t\tconst { resolved, codec } = metadata();\n\t\treturn consumeScalarInclude(include, resolved, codec, raw);\n\t};\n}\nasync function consumeFirstRow(rows) {\n\treturn (await rows.toArray())[0] ?? null;\n}\nfunction describeCollectionFirst(options) {\n\tconst rows = describeCollectionRows(options);\n\treturn {\n\t\t...rows,\n\t\tconsume: (source) => consumeFirstRow(rows.consume(source))\n\t};\n}\nfunction describeCollectionFirstOrThrow(options) {\n\tconst rows = describeCollectionRows(options);\n\treturn {\n\t\t...rows,\n\t\tconsume: (source) => rows.consume(source).firstOrThrow()\n\t};\n}\nfunction dispatchCollectionRows(options) {\n\tconst { context, runtime, state, tableName, modelName, namespaceId } = options;\n\tconst descriptionOptions = {\n\t\tcontext,\n\t\tstate,\n\t\ttableName,\n\t\tmodelName,\n\t\tnamespaceId\n\t};\n\tif (state.includes.length === 0) {\n\t\tconst query = describeExecutionRows(descriptionOptions);\n\t\treturn query.consume(queryPlanRows(runtime, query.plan));\n\t}\n\tresolvePolymorphismInfo(context.contract, namespaceId, modelName);\n\tconst generator = async function* () {\n\t\tconst query = describeExecutionRows(descriptionOptions);\n\t\tyield* query.consume(queryPlanRows(runtime, query.plan));\n\t};\n\treturn new AsyncIterableResult(generator());\n}\nfunction consumeIncludeRows(context, state, namespaceId, modelName, rows) {\n\tconst { contract } = context;\n\tconst generator = async function* () {\n\t\tconst parentRowsRaw = await rows.toArray();\n\t\tif (parentRowsRaw.length === 0) return;\n\t\tconst polyInfo = resolvePolymorphismInfo(contract, namespaceId, modelName);\n\t\tconst parentRows = parentRowsRaw.map((row) => {\n\t\t\treturn {\n\t\t\t\traw: row,\n\t\t\t\tmapped: polyInfo ? mapPolymorphicRow(contract, namespaceId, modelName, polyInfo, row, state.variantName) : mapStorageRowToModelFields(contract, namespaceId, modelName, row)\n\t\t\t};\n\t\t});\n\t\tconst bindings = /* @__PURE__ */ new WeakMap();\n\t\tfor (const parent of parentRows) for (const include of state.includes) parent.mapped[include.relationName] = decodeIncludePayload(contract, context, include, parent.raw[include.relationName], bindings);\n\t\tfor (const row of parentRows) yield blindCast(row.mapped);\n\t};\n\treturn new AsyncIterableResult(generator());\n}\n/**\n* Reload the rows a mutation just wrote (create / createAll / update /\n* updateAll / upsert) through the read-path dispatch, so `.include()`\n* relations resolve via the exact same correlated-subquery builder,\n* decoding, and polymorphism mapping a read query uses — there is no\n* parallel mutation read-back implementation.\n*\n* The mutation returns only its identity columns (PK / unique); this\n* re-selects those rows with the caller's projection + includes, keyed\n* by `identity IN (...)`. One round-trip regardless of row count or\n* include depth. The read-back observes the just-written rows because\n* it runs on the same runtime — and therefore the same transaction —\n* the mutation ran on.\n*\n* Delete read-back does NOT come through here: a parent-anchored\n* include query can't observe an already-deleted row, so delete reads\n* its snapshot before issuing the DELETE (see `collection.ts`).\n*/\nfunction reloadMutationRowsByIdentities(options) {\n\tconst { context, runtime, tableName, modelName, namespaceId, identityRows, selectedFields, includes } = options;\n\tconst { contract } = context;\n\tif (identityRows.length === 0) return emptyResult();\n\tconst identityColumns = resolveRowIdentityColumns(contract, namespaceId, tableName);\n\tif (identityColumns.length === 0) throw ormError(\"ORM.ROW_IDENTITY_MISSING\", `Cannot load includes for the mutation result on model \"${modelName}\": table \"${tableName}\" has no primary key or unique constraint to key the include read-back on.`, { meta: {\n\t\tmodel: modelName,\n\t\ttable: tableName\n\t} });\n\tconst identityFilter = buildIdentityInFilter(contract, namespaceId, tableName, identityColumns, identityRows);\n\tif (!identityFilter) return emptyResult();\n\treturn dispatchCollectionRows({\n\t\tcontext,\n\t\truntime,\n\t\tstate: {\n\t\t\t...emptyState(),\n\t\t\tfilters: [identityFilter],\n\t\t\tselectedFields,\n\t\t\tincludes\n\t\t},\n\t\ttableName,\n\t\tmodelName,\n\t\tnamespaceId\n\t});\n}\nfunction emptyResult() {\n\treturn new AsyncIterableResult((async function* () {})());\n}\nfunction buildIdentityInFilter(contract, namespaceId, tableName, identityColumns, identityRows) {\n\tconst [singleColumn, ...rest] = identityColumns;\n\tif (singleColumn !== void 0 && rest.length === 0) {\n\t\tconst values = identityRows.map((row) => row[singleColumn]).filter((value) => value !== void 0);\n\t\tif (values.length === 0) return;\n\t\treturn bindWhereExpr(contract, BinaryExpr.in(ColumnRef.of(tableName, singleColumn), ListExpression.fromValues(values)), namespaceId);\n\t}\n\tif (identityRows.length === 0) return;\n\tconst tuples = identityRows.map((row) => AndExpr.of(identityColumns.map((column) => BinaryExpr.eq(ColumnRef.of(tableName, column), LiteralExpr.of(row[column])))));\n\treturn bindWhereExpr(contract, OrExpr.of(tuples), namespaceId);\n}\n/**\n* Decode a single-query include payload from a parent row's raw cell\n* into the model-shaped value that downstream consumers see. Recurses\n* through `include.nested.includes` so depth-2+ trees — emitted by the\n* recursive correlated-subquery builder — are decoded symmetrically.\n*\n* The shape produced by the SQL side is one JSON column per top-level\n* include; values nested inside that JSON are already-parsed JS values\n* after the outer `JSON.parse`, so `parseIncludedRows` recognises both\n* the string (top-level) and array (nested) forms.\n*\n* Scalar leaves arrive wrapped in a `{ value: <primitive> }` JSON\n* envelope (see `buildIncludeChildScalarSelect`); the branch below\n* unwraps that envelope and passes the value straight through. The empty-relation value reads off\n* the operation's declared row via `emptyAggregateResult`: `null` where the row is nullable,\n* otherwise the row's declared empty value (so `count()` is `0`).\n*\n* Combine descriptors arrive as a JSON object keyed by branch name;\n* each branch is dispatched to the row or scalar decoder per its\n* declared shape (see `decodeCombineIncludePayload`).\n*/\nfunction decodeIncludePayload(contract, context, include, raw, bindings) {\n\tif (include.scalar) return decodeScalarIncludePayload(contract, context, include, include.scalar, raw);\n\tif (include.combine) return decodeCombineIncludePayload(contract, context, include, include.combine, raw, bindings);\n\tconst rawChildren = parseIncludedRows(include, raw);\n\tconst polyInfo = resolvePolymorphismInfo(contract, include.relatedNamespaceId, include.relatedModelName);\n\tconst mapChildRow = polyInfo ? (childRow) => mapPolymorphicRow(contract, include.relatedNamespaceId, include.relatedModelName, polyInfo, childRow, include.nested.variantName) : createStorageRowMapper(contract, include.relatedNamespaceId, include.relatedModelName);\n\tlet columns = bindings.get(include);\n\tif (!columns) {\n\t\tcolumns = /* @__PURE__ */ new Map();\n\t\tbindings.set(include, columns);\n\t}\n\tconst columnBindings = columns;\n\treturn consumeRowInclude(rawChildren, mapChildRow, (key) => {\n\t\tlet binding = columnBindings.get(key);\n\t\tif (binding === void 0) {\n\t\t\tbinding = resolveIncludedColumnBinding(contract, context, include, key);\n\t\t\tcolumnBindings.set(key, binding);\n\t\t}\n\t\treturn binding;\n\t}, include.nested.includes.map((nested) => ({\n\t\talias: nested.relationName,\n\t\tconsume: (value) => decodeIncludePayload(contract, context, nested, value, bindings)\n\t})), isToOneCardinality(include.cardinality));\n}\nfunction consumeRowInclude(rawChildren, mapChildRow, bindingFor, nested, toOne) {\n\tconst mappedChildren = [];\n\tfor (const childRow of rawChildren) {\n\t\tconst decodedChildRow = decodeIncludedStorageRow(childRow, bindingFor);\n\t\tconst mapped = mapChildRow(decodedChildRow);\n\t\tfor (const child of nested) mapped[child.alias] = child.consume(decodedChildRow[child.alias]);\n\t\tmappedChildren.push(mapped);\n\t}\n\treturn toOne ? mappedChildren[0] ?? null : mappedChildren;\n}\nfunction decodeIncludedStorageRow(row, bindingFor) {\n\tconst decoded = {};\n\tfor (const [key, value] of Object.entries(row)) {\n\t\tif (value === null || value === void 0) {\n\t\t\tdecoded[key] = value;\n\t\t\tcontinue;\n\t\t}\n\t\tconst binding = bindingFor(key);\n\t\tdecoded[key] = binding ? decodeIncludedColumnValue(binding.ref, binding.codecId, binding.codec, value) : value;\n\t}\n\treturn decoded;\n}\nfunction resolveIncludedColumnBinding(contract, context, include, key) {\n\tconst ref = resolveIncludedColumnRef(contract, include, key);\n\tif (!ref) return null;\n\tconst codec = context.contractCodecs.forColumn(include.relatedNamespaceId, ref.table, ref.column);\n\tif (!codec) return null;\n\treturn {\n\t\tref,\n\t\tcodec,\n\t\tcodecId: context.codecDescriptors.codecRefForColumn(include.relatedNamespaceId, ref.table, ref.column)?.codecId ?? ref.storageColumn.codecId\n\t};\n}\nfunction resolveIncludedColumnRef(contract, include, key) {\n\tconst baseColumn = resolveColumn(contract, include.relatedNamespaceId, include.relatedTableName, key);\n\tif (baseColumn) return {\n\t\ttable: include.relatedTableName,\n\t\tcolumn: key,\n\t\tstorageColumn: baseColumn\n\t};\n\tconst polyInfo = resolvePolymorphismInfo(contract, include.relatedNamespaceId, include.relatedModelName);\n\tif (!polyInfo) return;\n\tfor (const variant of polyInfo.mtiVariants) {\n\t\tconst prefix = `${variant.table}__`;\n\t\tif (!key.startsWith(prefix)) continue;\n\t\tconst column = key.slice(prefix.length);\n\t\tconst variantColumn = resolveColumn(contract, include.relatedNamespaceId, variant.table, column);\n\t\tif (variantColumn) return {\n\t\t\ttable: variant.table,\n\t\t\tcolumn,\n\t\t\tstorageColumn: variantColumn\n\t\t};\n\t}\n}\nfunction decodeIncludedColumnValue(ref, codecId, codec, value) {\n\tif (ref.storageColumn.many !== false) {\n\t\tif (!Array.isArray(value)) wrapIncludedDecodeFailure(/* @__PURE__ */ new TypeError(`expected an array from the driver for many-typed column, got ${typeof value}`), ref, codecId);\n\t\tconst decoded = [];\n\t\tfor (const element of value) {\n\t\t\tif (element === null || element === void 0) {\n\t\t\t\tdecoded.push(null);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdecoded.push(decodeIncludedJsonValue(ref, codecId, codec, element));\n\t\t}\n\t\treturn decoded;\n\t}\n\treturn decodeIncludedJsonValue(ref, codecId, codec, value);\n}\n/** `ref` names the value for a decode failure; an aggregate names its relation where a column would name itself. */\nfunction decodeIncludedJsonValue(ref, codecId, codec, value) {\n\ttry {\n\t\treturn codec.decodeJson(blindCast(value));\n\t} catch (error) {\n\t\tif (isRuntimeError(error)) throw error;\n\t\twrapIncludedDecodeFailure(error, ref, codecId);\n\t}\n}\nfunction wrapIncludedDecodeFailure(error, ref, codecId) {\n\tif (isInternalError(error)) throw error;\n\tconst message = error instanceof Error ? error.message : String(error);\n\tconst wrapped = runtimeError(\"RUNTIME.DECODE_FAILED\", `Failed to decode column ${ref.table}.${ref.column} with codec '${codecId}': ${message}`, {\n\t\ttable: ref.table,\n\t\tcolumn: ref.column,\n\t\tcodec: codecId\n\t});\n\twrapped.cause = error;\n\tthrow wrapped;\n}\n/**\n* Decode the combine payload produced by `buildIncludeChildCombineSelect`.\n*\n* The raw value is a JSON object (already parsed by the SQL layer when\n* top-level, or already a JS object when nested) whose keys are branch\n* names. Each branch value is decoded per its declared kind:\n* - row branch -> recurse via `decodeIncludePayload` with a synthetic\n* IncludeExpr carrying the branch's state in `nested`. This walks\n* nested row-level includes the same way a plain row include would.\n* - scalar branch -> unwrap the `{value: ...}` envelope via the\n* standalone scalar decoder.\n*\n* On a parent with zero matching child rows the correlated subquery\n* still produces one row (aggregates collapse the empty input to a\n* single row), so the combine envelope here is always present in the\n* read path. Mutation read-back goes through the same read dispatch,\n* so a missing or non-object envelope here is always a planner/decoder\n* bug — `parseCombineEnvelope` throws loudly rather than papering over\n* it with an empty shape.\n*/\nfunction decodeCombineIncludePayload(contract, context, include, branches, raw, bindings) {\n\tconst parsed = parseCombineEnvelope(include, raw);\n\tconst result = {};\n\tfor (const [branchName, branch] of Object.entries(branches)) {\n\t\tconst branchRaw = parsed[branchName];\n\t\tif (branch.kind === \"rows\") result[branchName] = decodeIncludePayload(contract, context, {\n\t\t\t...include,\n\t\t\tnested: branch.state,\n\t\t\tscalar: void 0,\n\t\t\tcombine: void 0\n\t\t}, branchRaw, bindings);\n\t\telse result[branchName] = decodeScalarIncludePayload(contract, context, include, branch.selector, branchRaw);\n\t}\n\treturn result;\n}\nfunction parseCombineEnvelope(include, raw) {\n\tif (raw === null || raw === void 0) throw new InternalError(`combine() envelope for include \"${include.relationName}\" is missing (got ${raw === null ? \"null\" : \"undefined\"}); the correlated subquery should always produce a JSON object — this indicates a planner or decoder bug.`);\n\tconst parsed = parseIncludePayload(raw);\n\tif (!isPlainObjectEnvelope(parsed)) throw new InternalError(`combine() envelope for include \"${include.relationName}\" has unexpected shape (expected object, got ${describeEnvelopeShape(parsed)}); this indicates a planner or decoder bug.`);\n\treturn parsed;\n}\nfunction isPlainObjectEnvelope(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\nfunction describeEnvelopeShape(value) {\n\tif (value === null) return \"null\";\n\tif (Array.isArray(value)) return \"array\";\n\treturn typeof value;\n}\n/**\n* Pull the primitive scalar value out of the JSON envelope emitted by\n* the correlated scalar builder.\n*\n* Contract: the envelope is always either\n* - a `{ value: <primitive> }` JSON object (the SQL path), or\n* - `null` / `undefined` (no row reached the decoder), answered with `emptyAggregateResult`.\n*\n* Any other shape — array, primitive, string that JSON-parses to\n* non-object — indicates a planner / decoder bug, so we throw\n* loudly naming the include relation rather than soft-handling.\n* Mirrors `parseCombineEnvelope`'s strict shape gate.\n*\n* The value passes through its own codec — the one the planner projected it\n* under — because it arrived inside a JSON document, where a count past 2^53\n* would otherwise have been read as a rounded number. Resolution mirrors\n* planning — the same registry, operation, and column — so the empty-relation\n* answer derives from the operation's declared row: NULL where the row is\n* nullable, else the value that row declares. The outer `raw === null` fallback is\n* defensive cover for an empty parent set; in single-query dispatch the\n* correlated subquery always produces a row, so the inner envelope's `value`\n* is always set by SQL.\n*/\nfunction decodeScalarIncludePayload(contract, context, include, scalar, raw) {\n\tconst { resolved, codec } = resolveScalarIncludeMetadata(contract, context, include, scalar);\n\treturn consumeScalarInclude(include, resolved, codec, raw);\n}\nfunction resolveScalarIncludeMetadata(contract, context, include, scalar) {\n\tconst resolved = resolveAggregate({\n\t\taggregates: context.aggregateDescriptors,\n\t\tcontract,\n\t\tnamespaceId: include.relatedNamespaceId,\n\t\ttableName: include.relatedTableName,\n\t\tfn: scalar.fn,\n\t\tcolumn: scalar.column\n\t});\n\treturn {\n\t\tresolved,\n\t\tcodec: context.contractCodecs.forCodecRef(resolved.codec)\n\t};\n}\nfunction consumeScalarInclude(include, resolved, codec, raw) {\n\tif (raw === null || raw === void 0) return emptyAggregateResult(resolved, codec);\n\tconst parsed = parseIncludePayload(raw);\n\tif (!isPlainObjectEnvelope(parsed)) throw new InternalError(`scalar() envelope for include \"${include.relationName}\" has unexpected shape (expected object, got ${describeEnvelopeShape(parsed)}); this indicates a planner or decoder bug.`);\n\tconst value = parsed[\"value\"];\n\tif (value === null || value === void 0) return emptyAggregateResult(resolved, codec);\n\treturn decodeIncludedJsonValue({\n\t\ttable: include.relatedTableName,\n\t\tcolumn: include.relationName\n\t}, resolved.codec.codecId, codec, value);\n}\nfunction parseIncludedRows(include, value) {\n\tif (value === null || value === void 0) return [];\n\tconst parsed = parseIncludePayload(value);\n\tif (!Array.isArray(parsed)) return [];\n\tconst rows = [];\n\tfor (const item of parsed) {\n\t\tif (!isPlainObjectEnvelope(item)) throw new InternalError(`Include row envelope for relation \"${include.relationName}\" has unexpected shape (expected object, got ${describeEnvelopeShape(item)}); this indicates a planner or decoder bug.`);\n\t\trows.push({ ...item });\n\t}\n\treturn rows;\n}\nfunction parseIncludePayload(value) {\n\tif (typeof value !== \"string\") return value;\n\ttry {\n\t\treturn JSON.parse(value);\n\t} catch {\n\t\treturn [];\n\t}\n}\n//#endregion\n//#region src/collection-mutation-dispatch.ts\nfunction createMutationRowMapper(contract, namespaceId, modelName, variantName) {\n\tconst polyInfo = resolvePolymorphismInfo(contract, namespaceId, modelName);\n\treturn polyInfo ? (row) => mapPolymorphicRow(contract, namespaceId, modelName, polyInfo, row, variantName) : (row) => mapStorageRowToModelFields(contract, namespaceId, modelName, row);\n}\nfunction dispatchMutationRows(options) {\n\tconst { context, runtime, compiled, tableName, modelName, namespaceId, variantName, includes, selectedFields, hiddenColumns, mapRow } = options;\n\tconst { contract } = context;\n\tconst mapStorageRow = createMutationRowMapper(contract, namespaceId, modelName, variantName);\n\tif (includes.length === 0) return mapResultRows(queryPlanRows(runtime, compiled), (rawRow) => {\n\t\tconst mapped = mapStorageRow(rawRow);\n\t\tif (hiddenColumns.length > 0) stripHiddenMappedFields(contract, namespaceId, modelName, mapped, hiddenColumns);\n\t\treturn mapRow(mapped);\n\t});\n\tconst generator = async function* () {\n\t\tconst identityRows = await queryPlanRows(runtime, compiled).toArray();\n\t\tyield* reloadMutationRowsByIdentities({\n\t\t\tcontext,\n\t\t\truntime,\n\t\t\ttableName,\n\t\t\tmodelName,\n\t\t\tnamespaceId,\n\t\t\tidentityRows,\n\t\t\tselectedFields,\n\t\t\tincludes\n\t\t});\n\t};\n\treturn new AsyncIterableResult(generator());\n}\nfunction dispatchSplitMutationRows(options) {\n\tconst { context, runtime, plans, tableName, modelName, namespaceId, variantName, includes, selectedFields, hiddenColumns, mapRow } = options;\n\tconst { contract } = context;\n\tconst mapStorageRow = createMutationRowMapper(contract, namespaceId, modelName, variantName);\n\tconst generator = async function* () {\n\t\tif (includes.length > 0) {\n\t\t\tconst identityRows = [];\n\t\t\tfor (const plan of plans) identityRows.push(...await queryPlanRows(runtime, plan).toArray());\n\t\t\tyield* reloadMutationRowsByIdentities({\n\t\t\t\tcontext,\n\t\t\t\truntime,\n\t\t\t\ttableName,\n\t\t\t\tmodelName,\n\t\t\t\tnamespaceId,\n\t\t\t\tidentityRows,\n\t\t\t\tselectedFields,\n\t\t\t\tincludes\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tfor (const plan of plans) for await (const rawRow of queryPlanRows(runtime, plan)) {\n\t\t\tconst mapped = mapStorageRow(rawRow);\n\t\t\tif (hiddenColumns.length > 0) stripHiddenMappedFields(contract, namespaceId, modelName, mapped, hiddenColumns);\n\t\t\tyield mapRow(mapped);\n\t\t}\n\t};\n\treturn new AsyncIterableResult(generator());\n}\nasync function executeMutationReturningSingleRow(options) {\n\tconst { context, runtime, compiled, tableName, modelName, namespaceId, variantName, includes, selectedFields, hiddenColumns, mapRow, operation, onMissingRowMessage } = options;\n\tconst { contract } = context;\n\tconst mapStorageRow = createMutationRowMapper(contract, namespaceId, modelName, variantName);\n\tif (includes.length === 0) {\n\t\tconst first = (await queryPlanRows(runtime, compiled).toArray())[0];\n\t\tif (!first) return null;\n\t\tconst mapped = mapStorageRow(first);\n\t\tif (hiddenColumns.length > 0) stripHiddenMappedFields(contract, namespaceId, modelName, mapped, hiddenColumns);\n\t\treturn mapRow(mapped);\n\t}\n\tconst identityRows = await queryPlanRows(runtime, compiled).toArray();\n\tif (identityRows.length === 0) return null;\n\tfor await (const row of reloadMutationRowsByIdentities({\n\t\tcontext,\n\t\truntime,\n\t\ttableName,\n\t\tmodelName,\n\t\tnamespaceId,\n\t\tidentityRows,\n\t\tselectedFields,\n\t\tincludes\n\t})) return row;\n\tthrow ormError(\"ORM.MUTATION_ROW_MISSING\", onMissingRowMessage, { meta: {\n\t\toperation,\n\t\tmodel: modelName,\n\t\ttableName\n\t} });\n}\n//#endregion\n//#region src/filters.ts\nfunction and(...exprs) {\n\treturn AndExpr.of(exprs);\n}\nfunction or(...exprs) {\n\treturn OrExpr.of(exprs);\n}\nfunction not(expr) {\n\treturn expr.not();\n}\nfunction all() {\n\treturn AndExpr.true();\n}\nfunction shorthandToWhereExpr(context, namespaceId, modelName, filters) {\n\tconst contract = context.contract;\n\tconst tableName = resolveModelTableName(contract, namespaceId, modelName);\n\tconst fieldToColumn = getFieldToColumnMap(contract, namespaceId, modelName);\n\tconst exprs = [];\n\tfor (const [fieldName, value] of Object.entries(filters)) {\n\t\tif (value === void 0) continue;\n\t\tconst columnName = fieldToColumn[fieldName] ?? fieldName;\n\t\tconst left = ColumnRef.of(tableName, columnName);\n\t\tif (value === null) {\n\t\t\texprs.push(NullCheckExpr.isNull(left));\n\t\t\tcontinue;\n\t\t}\n\t\tassertFieldHasEqualityTrait(context, namespaceId, modelName, fieldName);\n\t\texprs.push(predicateComparison(\"eq\", left, predicateExpression(value) ?? LiteralExpr.of(value)));\n\t}\n\tif (exprs.length === 0) return;\n\treturn exprs.length === 1 ? exprs[0] : and(...exprs);\n}\nfunction assertFieldHasEqualityTrait(context, namespaceId, modelName, fieldName) {\n\tconst fieldType = modelOf(context.contract, namespaceId, modelName)?.fields?.[fieldName]?.type;\n\tconst codecId = fieldType?.kind === \"scalar\" ? fieldType.codecId : void 0;\n\tif (codecId === void 0 || !hasTrait(context, codecId, \"equality\")) throw ormError(\"ORM.FILTER_UNSUPPORTED\", `Shorthand filter on \"${modelName}.${fieldName}\": field does not support equality comparisons`, { meta: {\n\t\tmodel: modelName,\n\t\tfield: fieldName,\n\t\ttrait: \"equality\"\n\t} });\n}\n//#endregion\n//#region src/fragments.ts\nfunction nullability(nullable) {\n\treturn nullable ? \"may be null\" : \"is never null\";\n}\nfunction isFieldBuilder(value) {\n\treturn \"build\" in value && typeof value.build === \"function\";\n}\nfunction isListMultiplicity(value) {\n\treturn typeof value === \"object\" && value !== null && \"elementNullable\" in value && typeof value.elementNullable === \"boolean\";\n}\nfunction isMultiplicity(value) {\n\treturn value === void 0 || value === false || isListMultiplicity(value);\n}\nfunction isFieldSpec(value) {\n\treturn \"codecId\" in value && typeof value.codecId === \"string\" && \"nullable\" in value && typeof value.nullable === \"boolean\" && (!(\"many\" in value) || isMultiplicity(value.many));\n}\nfunction multiplicity(many) {\n\treturn isListMultiplicity(many) ? { elementNullable: many.elementNullable } : false;\n}\nconst FIELD_DECLARATION_FIX = \"Declare each field with a field builder, such as field.temporal.timestamptz().optional(), or with { codecId, nullable }. Declare a list with .many() or many: { elementNullable: false }, or, when its elements may be null, with .many({ elementsNullable: true }) or many: { elementNullable: true }.\";\nfunction declaredFieldSpec(name, declaration) {\n\tif (typeof declaration === \"object\" && declaration !== null && isFieldBuilder(declaration)) {\n\t\tconst built = declaration.build();\n\t\tconst descriptor = typeof built === \"object\" && built !== null && \"descriptor\" in built ? built.descriptor : void 0;\n\t\tconst nullable = typeof built === \"object\" && built !== null && \"nullable\" in built ? built.nullable : void 0;\n\t\tif (typeof descriptor !== \"object\" || descriptor === null || !(\"codecId\" in descriptor) || typeof descriptor.codecId !== \"string\" || typeof nullable !== \"boolean\") throw ormError(\"ORM.ARGUMENT_INVALID\", `Cannot define the fragment: the field builder for ${name} names no column type`, {\n\t\t\twhy: \"A fragment for any model matches each declared field by its codec and nullability, and this builder refers to a named type instead of a column type.\",\n\t\t\tfix: \"Declare the field with a builder that has a column type, such as field.text() or field.column(textColumn), or with { codecId, nullable }.\",\n\t\t\tmeta: { field: name }\n\t\t});\n\t\tconst many = typeof built === \"object\" && built !== null && \"many\" in built && built.many;\n\t\tif (!isMultiplicity(many)) throw ormError(\"ORM.ARGUMENT_INVALID\", `Cannot define the fragment: the field builder for ${name} builds a many that is not false or { elementNullable }`, {\n\t\t\twhy: `A field builder's build() returns many as false or undefined for one value, or as { elementNullable } with a boolean elementNullable for a list; received ${describeReceived(many)} for ${name}.`,\n\t\t\tfix: FIELD_DECLARATION_FIX,\n\t\t\tmeta: { field: name }\n\t\t});\n\t\treturn {\n\t\t\tcodecId: descriptor.codecId,\n\t\t\tnullable,\n\t\t\tmany: multiplicity(many)\n\t\t};\n\t}\n\tif (typeof declaration === \"object\" && declaration !== null && isFieldSpec(declaration)) return {\n\t\tcodecId: declaration.codecId,\n\t\tnullable: declaration.nullable,\n\t\tmany: multiplicity(declaration.many)\n\t};\n\tthrow ormError(\"ORM.ARGUMENT_INVALID\", `Cannot define the fragment: the declaration of field ${name} is not a field builder or { codecId, nullable }`, {\n\t\twhy: `Each field of a fragment is declared with a field builder or with an object that has a string codecId, a boolean nullable and, for a list, many: { elementNullable } with a boolean elementNullable; received ${describeReceived(declaration)} for ${name}.`,\n\t\tfix: FIELD_DECLARATION_FIX,\n\t\tmeta: { field: name }\n\t});\n}\nfunction declaredFieldSpecs(declarations) {\n\tif (typeof declarations !== \"object\" || declarations === null || Array.isArray(declarations)) throw ormError(\"ORM.ARGUMENT_INVALID\", \"Cannot define the fragment: the fields are not an object\", {\n\t\twhy: `The first argument of fragment maps the name of each field the fragment needs to its declaration; received ${describeReceived(declarations)}.`,\n\t\tfix: FIELD_DECLARATION_FIX,\n\t\tmeta: { argument: \"fields\" }\n\t});\n\treturn Object.entries(declarations).map(([name, declaration]) => [name, declaredFieldSpec(name, declaration)]);\n}\n/** Throws `ORM.ARGUMENT_INVALID` unless `body`, the body of a fragment, is a function. */\nfunction assertFragmentBody(body) {\n\tif (typeof body !== \"function\") throw ormError(\"ORM.ARGUMENT_INVALID\", \"Cannot define the fragment: the body is not a function\", {\n\t\twhy: `The body of a fragment is a function that receives a collection and returns one; received ${describeReceived(body)}.`,\n\t\tfix: \"Pass a function, such as (rows) => rows.where(...).\",\n\t\tmeta: { argument: \"body\" }\n\t});\n}\nfunction hasContract(ctx) {\n\treturn \"context\" in ctx && typeof ctx.context === \"object\" && ctx.context !== null && \"contract\" in ctx.context && typeof ctx.context.contract === \"object\" && ctx.context.contract !== null;\n}\nfunction isModelCollection(value) {\n\treturn typeof value === \"object\" && value !== null && \"ctx\" in value && typeof value.ctx === \"object\" && value.ctx !== null && hasContract(value.ctx) && \"modelName\" in value && typeof value.modelName === \"string\" && \"namespaceId\" in value && typeof value.namespaceId === \"string\";\n}\n/** Throws `ORM.ARGUMENT_INVALID` unless `value`, what a fragment is applied to, is a collection. */\nfunction assertFragmentReceiver(value) {\n\tif (!isModelCollection(value)) throw ormError(\"ORM.ARGUMENT_INVALID\", \"Cannot apply the fragment: it was not given a collection\", {\n\t\twhy: `A fragment is applied to a collection, such as db.orm.public.Post; received ${describeReceived(value)}.`,\n\t\tfix: \"Pass the fragment to with on a collection: collection.with(fragment).\",\n\t\tmeta: { argument: \"collection\" }\n\t});\n}\n/** Throws `ORM.ARGUMENT_INVALID` unless `value` is a collection of the model and namespace a fragment for one model was made from. */\nfunction assertModelFragmentReceiver(source, value) {\n\tassertFragmentReceiver(value);\n\tif (value.modelName !== source.modelName || value.namespaceId !== source.namespaceId) {\n\t\tconst made = `${source.namespaceId}.${source.modelName}`;\n\t\tconst given = `${value.namespaceId}.${value.modelName}`;\n\t\tthrow ormError(\"ORM.ARGUMENT_INVALID\", `Cannot apply a fragment for ${made} to a collection of ${given}`, {\n\t\t\twhy: `The fragment was made with ${made}.fragment(...), and its body was written for that model.`,\n\t\t\tfix: `Apply the fragment to a collection of ${made}, or make a fragment from ${given}.`,\n\t\t\tmeta: {\n\t\t\t\tmodel: source.modelName,\n\t\t\t\tnamespace: source.namespaceId,\n\t\t\t\treceivedModel: value.modelName,\n\t\t\t\treceivedNamespace: value.namespaceId\n\t\t\t}\n\t\t});\n\t}\n}\n/** The model as error messages name it: with its namespace when the contract has more than one. */\nfunction modelLabel(collection) {\n\treturn Object.keys(collection.ctx.context.contract.domain.namespaces).length > 1 ? `${collection.namespaceId}.${collection.modelName}` : collection.modelName;\n}\n/** Throws `ORM.ARGUMENT_INVALID` unless `result`, what a fragment's body returned, is a collection of the receiver's model, namespace and class. */\nfunction assertFragmentResult(receiver, result) {\n\tif (!(isModelCollection(result) && result.modelName === receiver.modelName && result.namespaceId === receiver.namespaceId && result instanceof receiver.constructor)) {\n\t\tconst label = modelLabel(receiver);\n\t\tthrow ormError(\"ORM.ARGUMENT_INVALID\", `Cannot apply the fragment to ${label}: its body did not return a collection of ${label}`, {\n\t\t\twhy: `The body of a fragment for any model returns the collection it received, after where, orderBy, limit or offset; it returned ${isModelCollection(result) ? `a collection of ${modelLabel(result)}` : describeReceived(result)}.`,\n\t\t\tfix: \"Return the collection the body receives, or one made from it by calling its methods.\",\n\t\t\tmeta: {\n\t\t\t\tmodel: receiver.modelName,\n\t\t\t\tnamespace: receiver.namespaceId,\n\t\t\t\treturned: isModelCollection(result) ? result.modelName : describeReceived(result)\n\t\t\t}\n\t\t});\n\t}\n}\nfunction elementNullability(elementNullable) {\n\treturn elementNullable ? \"may be null\" : \"are never null\";\n}\nfunction sameMultiplicity(a, b) {\n\treturn a === false || b === false ? a === b : a.elementNullable === b.elementNullable;\n}\nfunction fieldShape(many) {\n\treturn many === false ? \"holds one value\" : `is a list whose elements ${elementNullability(many.elementNullable)}`;\n}\nfunction declarationFor(many) {\n\tif (many === false) return \"as one value, without .many() or many\";\n\treturn many.elementNullable ? \"as a list whose elements may be null, with .many({ elementsNullable: true }) or many: { elementNullable: true }\" : \"as a list whose elements are never null, with .many() or many: { elementNullable: false }\";\n}\nfunction describeField(field) {\n\tconst value = `with codec ${field.codecId} that ${nullability(field.nullable)}`;\n\treturn field.many === false ? value : `${value} and whose elements ${elementNullability(field.many.elementNullable)}`;\n}\nfunction assertFragmentFields(collection, fields) {\n\tconst { contract } = collection.ctx.context;\n\tconst { modelName, namespaceId } = collection;\n\tconst label = modelLabel(collection);\n\tconst model = modelOf(contract, namespaceId, modelName);\n\tfor (const [name, spec] of fields) {\n\t\tconst declared = `The fragment was declared for models that have a ${spec.many === false ? \"field\" : \"list field\"} ${name} ${describeField(spec)}.`;\n\t\tconst meta = {\n\t\t\tmodel: modelName,\n\t\t\tnamespace: namespaceId,\n\t\t\tfield: name,\n\t\t\tcodecId: spec.codecId,\n\t\t\tnullable: spec.nullable,\n\t\t\tmany: spec.many\n\t\t};\n\t\tconst modelFields = model?.fields ?? {};\n\t\tif (!Object.hasOwn(modelFields, name)) throw ormError(\"ORM.FIELD_UNKNOWN\", `Cannot apply a fragment to ${label}: it has no field ${name}`, {\n\t\t\twhy: declared,\n\t\t\tfix: `Apply the fragment to a model that has a field ${name}, or remove ${name} from the declaration in the fragment.`,\n\t\t\tmeta\n\t\t});\n\t\tconst fieldMany = multiplicity(modelFields[name]?.many);\n\t\tconst column = resolveColumn(contract, namespaceId, collection.tableName, resolveFieldToColumn(contract, namespaceId, modelName, name));\n\t\tconst actual = column === void 0 ? `${label}.${name} has no column.` : fieldMany === false ? `${label}.${name} has codec ${column.codecId} and ${nullability(column.nullable)}.` : `${label}.${name} is a list ${describeField({\n\t\t\tcodecId: column.codecId,\n\t\t\tnullable: column.nullable,\n\t\t\tmany: fieldMany\n\t\t})}.`;\n\t\tconst sameCodecAndNullability = column?.codecId === spec.codecId && column.nullable === spec.nullable;\n\t\tif (!sameCodecAndNullability || !sameMultiplicity(fieldMany, spec.many)) throw ormError(\"ORM.FIELD_UNKNOWN\", `Cannot apply a fragment to ${label}: its field ${name} does not match the declaration`, {\n\t\t\twhy: `${declared} ${actual}`,\n\t\t\tfix: sameCodecAndNullability ? `Apply the fragment to a model whose ${name} field ${fieldShape(spec.many)}, or declare ${name} ${declarationFor(fieldMany)}.` : `Apply the fragment to a model whose ${name} field has that codec and nullability, or change the declaration in the fragment.`,\n\t\t\tmeta\n\t\t});\n\t}\n}\n/**\n* Define a fragment for any model that has the declared fields. Reached as the `fragment` method of the client `orm()` returns.\n*/\nfunction defineFieldFragment(declarations, body) {\n\tconst fields = declaredFieldSpecs(declarations);\n\tassertFragmentBody(body);\n\treturn blindCast((collection) => {\n\t\tconst receiver = collection;\n\t\tassertFragmentReceiver(receiver);\n\t\tassertFragmentFields(receiver, fields);\n\t\tconst result = body(blindCast(collection));\n\t\tassertFragmentResult(receiver, result);\n\t\treturn result;\n\t});\n}\nconst SHOWN_LENGTH = 64;\nfunction shown(value) {\n\tconst characters = Array.from(value);\n\tconst cut = characters.length > SHOWN_LENGTH;\n\treturn {\n\t\ttext: JSON.stringify(cut ? `${characters.slice(0, SHOWN_LENGTH).join(\"\")}…` : value),\n\t\tcut\n\t};\n}\nfunction describeReceived(value) {\n\tif (value === void 0 || value === null) return String(value);\n\tif (Array.isArray(value)) return \"an array\";\n\tconst kind = typeof value;\n\treturn kind === \"object\" ? \"an object\" : `a ${kind}`;\n}\nfunction cutNote(subject, value) {\n\treturn value.cut ? ` The ${subject} above is cut to its first ${SHOWN_LENGTH} characters.` : \"\";\n}\nfunction fieldCodecId(collection, field) {\n\tconst { contract } = collection.ctx.context;\n\tconst column = resolveFieldToColumn(contract, collection.namespaceId, collection.modelName, field);\n\treturn resolveColumn(contract, collection.namespaceId, collection.tableName, column)?.codecId;\n}\nfunction canOrder(collection, field) {\n\tconst codecId = fieldCodecId(collection, field);\n\treturn codecId !== void 0 && hasTrait(collection.ctx.context, codecId, \"order\");\n}\nfunction orderableFieldNames(collection) {\n\tconst model = modelOf(collection.ctx.context.contract, collection.namespaceId, collection.modelName);\n\treturn Object.keys(model?.fields ?? {}).filter((field) => canOrder(collection, field));\n}\nfunction whyNotOrderable(collection, name) {\n\tconst { modelName } = collection;\n\tconst model = modelOf(collection.ctx.context.contract, collection.namespaceId, modelName);\n\tconst quoted = shown(name).text;\n\tif (Object.hasOwn(model?.relations ?? {}, name)) return `${quoted} is a relation of ${modelName}, not a field.`;\n\tif (!Object.hasOwn(model?.fields ?? {}, name)) return `${modelName} has no field ${quoted}.`;\n\treturn canOrder(collection, name) ? `${quoted} is not one of the fields allowed for ordering.` : `The codec ${fieldCodecId(collection, name)} of ${modelName}.${name} cannot be ordered.`;\n}\n/**\n* An `orderBy` selector for a field named by a string, such as an order parameter of a request. `allowed` lists the fields a request may order by. A name that is not in `allowed` or not an orderable field of the collection's model, and a direction other than `asc` or `desc`, throw `ORM.ARGUMENT_INVALID`. An undefined direction is `asc`.\n*\n* ```ts\n* db.Post.orderBy(orderByField(db.Post, input.orderBy, input.direction, ['title', 'createdAt']));\n* ```\n*/\nfunction orderByField(collection, name, direction, allowed) {\n\tconst receiver = collection;\n\tif (!isModelCollection(receiver)) throw ormError(\"ORM.ARGUMENT_INVALID\", \"Cannot order: orderByField was not given a collection\", {\n\t\twhy: `orderByField takes the collection it orders, such as db.orm.public.Post; received ${describeReceived(receiver)}.`,\n\t\tfix: \"Pass the collection the selector is for as the first argument.\",\n\t\tmeta: { argument: \"collection\" }\n\t});\n\tconst { modelName } = collection;\n\tconst requestedName = name;\n\tconst requestedDirection = direction === void 0 ? \"asc\" : direction;\n\tconst allowedList = allowed;\n\tif (!Array.isArray(allowedList) || allowedList.some((field) => typeof field !== \"string\")) throw ormError(\"ORM.ARGUMENT_INVALID\", `Cannot order ${modelName}: the allowed fields are not a list of names`, {\n\t\twhy: `orderByField takes the list of fields a request may order by; received ${describeReceived(allowedList)}.`,\n\t\tfix: `Pass an array of field names of ${modelName}, such as ['title', 'createdAt'].`,\n\t\tmeta: {\n\t\t\tmodel: modelName,\n\t\t\targument: \"allowed\"\n\t\t}\n\t});\n\tif (typeof requestedDirection !== \"string\") throw ormError(\"ORM.ARGUMENT_INVALID\", `Cannot order ${modelName}: the direction is not a string`, {\n\t\twhy: `An order direction is \"asc\" or \"desc\"; received ${describeReceived(requestedDirection)}.`,\n\t\tfix: \"Pass \\\"asc\\\" or \\\"desc\\\".\",\n\t\tmeta: {\n\t\t\tmodel: modelName,\n\t\t\tdirection: requestedDirection\n\t\t}\n\t});\n\tif (!isOrderByDirection(requestedDirection)) {\n\t\tconst shownDirection = shown(requestedDirection);\n\t\tthrow ormError(\"ORM.ARGUMENT_INVALID\", `Cannot order ${modelName} in direction ${shownDirection.text}`, {\n\t\t\twhy: \"An order direction is \\\"asc\\\" or \\\"desc\\\".\",\n\t\t\tfix: `Pass \"asc\" or \"desc\".${cutNote(\"direction\", shownDirection)}`,\n\t\t\tmeta: {\n\t\t\t\tmodel: modelName,\n\t\t\t\tdirection: requestedDirection\n\t\t\t}\n\t\t});\n\t}\n\tconst orderable = orderableFieldNames(collection);\n\tconst names = allowedList.filter((field) => orderable.includes(field));\n\tconst orderByOneOf = names.length === 0 ? `Pass an allowed list that names at least one field of ${modelName} that can be ordered.` : `Order by one of: ${names.join(\", \")}.`;\n\tif (typeof requestedName !== \"string\") throw ormError(\"ORM.ARGUMENT_INVALID\", `Cannot order ${modelName}: the field name is not a string`, {\n\t\twhy: `An order field name is a string; received ${describeReceived(requestedName)}.`,\n\t\tfix: orderByOneOf,\n\t\tmeta: {\n\t\t\tmodel: modelName,\n\t\t\tfield: requestedName\n\t\t}\n\t});\n\tif (!names.includes(requestedName)) {\n\t\tconst shownName = shown(requestedName);\n\t\tthrow ormError(\"ORM.ARGUMENT_INVALID\", `Cannot order ${modelName} by ${shownName.text}`, {\n\t\t\twhy: whyNotOrderable(collection, requestedName),\n\t\t\tfix: `${orderByOneOf}${cutNote(\"name\", shownName)}`,\n\t\t\tmeta: {\n\t\t\t\tmodel: modelName,\n\t\t\t\tfield: requestedName\n\t\t\t}\n\t\t});\n\t}\n\tconst field = blindCast(requestedName);\n\tconst order = requestedDirection;\n\treturn (row) => row[field][order]();\n}\n//#endregion\n//#region src/model-accessor.ts\nfunction hasThrough$1(relation) {\n\treturn relation.through !== void 0;\n}\nvar SqlTableBinding = class SqlTableBinding {\n\t#storage;\n\t#reference;\n\tconstructor(storage, reference) {\n\t\tthis.#storage = Object.freeze({ ...storage });\n\t\tthis.#reference = reference;\n\t\tObject.freeze(this);\n\t}\n\tstatic unaliased(storage) {\n\t\treturn new SqlTableBinding(storage, storage.tableName);\n\t}\n\tstatic aliased(storage, alias) {\n\t\treturn new SqlTableBinding(storage, alias);\n\t}\n\tcolumn(columnName) {\n\t\treturn ColumnRef.of(this.#reference, columnName);\n\t}\n\ttableSource(contract) {\n\t\treturn tableSourceForContract(contract, this.#storage.namespaceId, this.#storage.tableName, this.#reference);\n\t}\n\tisReferencedAs(candidate) {\n\t\treturn this.#reference === candidate;\n\t}\n\tisStoredAt(namespaceId, tableName) {\n\t\treturn this.#storage.namespaceId === namespaceId && this.#storage.tableName === tableName;\n\t}\n};\nvar ModelAccessorScope = class ModelAccessorScope {\n\tcurrent;\n\t#visibleBindings;\n\t#aliasCounter;\n\tconstructor(current, visibleBindings, aliasCounter) {\n\t\tthis.current = current;\n\t\tthis.#visibleBindings = Object.freeze([...visibleBindings]);\n\t\tthis.#aliasCounter = aliasCounter;\n\t\tObject.freeze(this);\n\t}\n\tstatic root(namespaceId, tableName) {\n\t\tconst binding = SqlTableBinding.unaliased({\n\t\t\tnamespaceId,\n\t\t\ttableName\n\t\t});\n\t\treturn new ModelAccessorScope(binding, [binding], { nextId: 1 });\n\t}\n\tforRelation(namespaceId, tableName) {\n\t\tconst binding = this.#allocateBinding(namespaceId, tableName, \"rel\");\n\t\treturn new ModelAccessorScope(binding, [...this.#visibleBindings, binding], this.#aliasCounter);\n\t}\n\tforManyToManyRelation(childNamespaceId, childTableName, junctionNamespaceId, junctionTableName) {\n\t\tconst initialChildScope = this.forRelation(childNamespaceId, childTableName);\n\t\tconst junctionBinding = initialChildScope.#allocateBinding(junctionNamespaceId, junctionTableName, \"junction\");\n\t\treturn {\n\t\t\tchildScope: new ModelAccessorScope(initialChildScope.current, [...initialChildScope.#visibleBindings, junctionBinding], this.#aliasCounter),\n\t\t\tjunctionBinding\n\t\t};\n\t}\n\tforJoinedSource(namespaceId, tableName) {\n\t\tif (this.current.isStoredAt(namespaceId, tableName)) return this;\n\t\tconst binding = SqlTableBinding.unaliased({\n\t\t\tnamespaceId,\n\t\t\ttableName\n\t\t});\n\t\treturn new ModelAccessorScope(binding, [...this.#visibleBindings, binding], this.#aliasCounter);\n\t}\n\t#allocateBinding(namespaceId, tableName, aliasKind) {\n\t\tconst storage = {\n\t\t\tnamespaceId,\n\t\t\ttableName\n\t\t};\n\t\tif (!this.#visibleBindings.some((binding) => binding.isReferencedAs(tableName))) return SqlTableBinding.unaliased(storage);\n\t\treturn SqlTableBinding.aliased(storage, this.#allocateAlias(aliasKind));\n\t}\n\t#allocateAlias(kind) {\n\t\twhile (true) {\n\t\t\tconst alias = `__orm_${kind}_${this.#aliasCounter.nextId}`;\n\t\t\tthis.#aliasCounter.nextId += 1;\n\t\t\tif (!this.#visibleBindings.some((binding) => binding.isReferencedAs(alias))) return alias;\n\t\t}\n\t}\n};\nfunction createModelAccessor(context, namespaceId, modelName, variantName) {\n\tconst tableName = resolveModelTableName(context.contract, namespaceId, modelName);\n\treturn createModelAccessorInScope(context, namespaceId, modelName, variantName, ModelAccessorScope.root(namespaceId, tableName));\n}\nfunction createModelAccessorInScope(context, namespaceId, modelName, variantName, scope) {\n\tconst contract = context.contract;\n\tconst fieldToColumn = getFieldToColumnMap(contract, namespaceId, modelName);\n\tconst tableName = resolveModelTableName(contract, namespaceId, modelName);\n\tconst modelRelations = resolveModelRelations(contract, namespaceId, modelName);\n\tconst variantFieldColumns = variantName ? resolveVariantFieldColumns(contract, namespaceId, modelName, variantName) : {};\n\tconst variantCoordinates = variantName ? {\n\t\tname: variantName,\n\t\trelations: resolveModelRelations(contract, namespaceId, variantName),\n\t\ttableName: resolvePolymorphismInfo(contract, namespaceId, modelName)?.variants.get(variantName)?.table ?? tableName\n\t} : void 0;\n\tconst opsByCodecId = /* @__PURE__ */ new Map();\n\tfunction registerOp(codecId, op) {\n\t\tlet existing = opsByCodecId.get(codecId);\n\t\tif (!existing) {\n\t\t\texisting = [];\n\t\t\topsByCodecId.set(codecId, existing);\n\t\t}\n\t\texisting.push(op);\n\t}\n\tfor (const [name, entry] of Object.entries(context.queryOperations.entries())) {\n\t\tconst op = [name, entry];\n\t\tconst self = entry.self;\n\t\tif (!self) continue;\n\t\tif (self.codecId !== void 0) registerOp(self.codecId, op);\n\t\telse if (self.traits !== void 0) for (const descriptor of context.codecDescriptors.values()) {\n\t\t\tconst descriptorTraits = descriptor.traits;\n\t\t\tif (self.traits.every((t) => descriptorTraits.includes(t))) registerOp(descriptor.codecId, op);\n\t\t}\n\t}\n\treturn blindCast(new Proxy({}, { get(_target, prop) {\n\t\tif (typeof prop !== \"string\") return;\n\t\tif (variantCoordinates) {\n\t\t\tconst variantRelation = variantCoordinates.relations[prop];\n\t\t\tif (variantRelation) return createRelationFilterAccessor(context, namespaceId, variantCoordinates.name, scope.forJoinedSource(namespaceId, variantCoordinates.tableName), variantRelation);\n\t\t}\n\t\tconst relation = modelRelations[prop];\n\t\tif (relation) return createRelationFilterAccessor(context, namespaceId, modelName, scope, relation);\n\t\tconst variantField = variantFieldColumns[prop];\n\t\tconst resolvedTable = variantField?.table ?? tableName;\n\t\tconst fieldBinding = scope.forJoinedSource(namespaceId, resolvedTable).current;\n\t\tconst columnName = variantField?.column ?? fieldToColumn[prop] ?? prop;\n\t\tconst column = resolveColumn(contract, namespaceId, resolvedTable, columnName);\n\t\tif (!column) return;\n\t\tconst traits = codecTraits(context, column.codecId);\n\t\tconst operations = opsByCodecId.get(column.codecId) ?? [];\n\t\tconst codec = codecRefForStorageColumn(contract.storage, namespaceId, resolvedTable, columnName);\n\t\treturn createScalarFieldAccessor(fieldBinding, columnName, column.codecId, column.nullable, codec, traits, operations, context);\n\t} }));\n}\nfunction createScalarFieldAccessor(tableBinding, columnName, codecId, nullable, codec, traits, operations, context) {\n\tconst column = tableBinding.column(columnName);\n\tconst comparisonEntries = [];\n\tfor (const [name, meta] of Object.entries(COMPARISON_METHODS_META)) {\n\t\tif (meta.traits.some((t) => !traits.includes(t))) continue;\n\t\tcomparisonEntries.push([name, meta.create(column, codec)]);\n\t}\n\tconst accessor = blindCast({\n\t\treturnType: {\n\t\t\tcodecId,\n\t\t\tnullable,\n\t\t\tcodec\n\t\t},\n\t\tbuildAst: () => column,\n\t\t...Object.fromEntries(comparisonEntries)\n\t});\n\tfor (const [name, entry] of operations) accessor[name] = createExtensionMethodFactory(accessor, entry, context);\n\treturn blindCast(accessor);\n}\nfunction createExtensionMethodFactory(selfExpr, entry, context) {\n\treturn (...args) => {\n\t\tconst result = blindCast(entry.impl)(selfExpr, ...args);\n\t\tconst returnCodecId = result.returnType.codecId;\n\t\tconst returnTraits = codecTraits(context, returnCodecId);\n\t\tif (returnTraits.includes(\"boolean\")) return result.buildAst();\n\t\tconst resultAst = result.buildAst();\n\t\tconst returnCodec = { codecId: returnCodecId };\n\t\tconst methods = {};\n\t\tfor (const [resultMethodName, meta] of Object.entries(COMPARISON_METHODS_META)) {\n\t\t\tif (meta.traits.some((t) => !returnTraits.includes(t))) continue;\n\t\t\tmethods[resultMethodName] = meta.create(resultAst, returnCodec);\n\t\t}\n\t\treturn methods;\n\t};\n}\nconst RELATION_ACCESSOR_METHOD_NAMES = /* @__PURE__ */ new Set([\n\t\"some\",\n\t\"every\",\n\t\"none\",\n\t\"count\"\n]);\nfunction createRelationFilterAccessor(context, parentNamespaceId, parentModelName, parentScope, relation) {\n\tconst relatedTableName = resolveModelTableName(context.contract, relation.toNamespace, relation.to);\n\tconst correlate = () => correlateRelatedRows(context, parentNamespaceId, parentModelName, parentScope, relatedTableName, relation);\n\tconst filters = {\n\t\tsome: (predicate) => buildExistsExpr(context, relation, correlate(), \"some\", predicate),\n\t\tevery: (predicate) => buildExistsExpr(context, relation, correlate(), \"every\", predicate),\n\t\tnone: (predicate) => buildExistsExpr(context, relation, correlate(), \"none\", predicate)\n\t};\n\tif (isToOneCardinality(relation.cardinality)) return new Proxy(filters, { get(target, prop) {\n\t\tif (typeof prop !== \"string\") return void 0;\n\t\tif (Object.hasOwn(target, prop)) return Reflect.get(target, prop);\n\t\tif (RELATION_ACCESSOR_METHOD_NAMES.has(prop)) return void 0;\n\t\treturn relatedOrderableField(context, relation, relatedTableName, correlate, prop);\n\t} });\n\treturn {\n\t\t...filters,\n\t\tcount: (predicate) => createOrderable(() => buildRelationCountExpr(context, relation, correlate(), predicate))\n\t};\n}\nfunction createOrderable(buildExpr) {\n\treturn {\n\t\tasc: (options) => checkedOrderByItem(\"asc\", buildExpr(), options),\n\t\tdesc: (options) => checkedOrderByItem(\"desc\", buildExpr(), options)\n\t};\n}\nfunction relatedOrderableField(context, relation, relatedTableName, correlate, fieldName) {\n\tconst fieldToColumn = getFieldToColumnMap(context.contract, relation.toNamespace, relation.to);\n\tif (!Object.hasOwn(fieldToColumn, fieldName)) return void 0;\n\tconst columnName = fieldToColumn[fieldName];\n\tif (columnName === void 0) return void 0;\n\tconst column = resolveColumn(context.contract, relation.toNamespace, relatedTableName, columnName);\n\tif (!column || !hasTrait(context, column.codecId, \"order\")) return void 0;\n\treturn createOrderable(() => {\n\t\tconst rows = correlate();\n\t\treturn SubqueryExpr.of(rows.source.withProjection([ProjectionItem.of(columnName, rows.childScope.current.column(columnName))]).withWhere(rows.correlation));\n\t});\n}\nfunction buildRelationCountExpr(context, relation, rows, predicate) {\n\tconst childWhere = toRelationWhereExpr(context, relation.toNamespace, relation.to, predicate, rows.childScope);\n\treturn SubqueryExpr.of(rows.source.withProjection([ProjectionItem.of(\"count\", plainAggregateExpr(\"count\", void 0))]).withWhere(childWhere ? and(rows.correlation, childWhere) : rows.correlation));\n}\nfunction correlateRelatedRows(context, parentNamespaceId, parentModelName, parentScope, relatedTableName, relation) {\n\tif (hasThrough$1(relation)) {\n\t\tconst { through } = relation;\n\t\tconst { childScope, junctionBinding } = parentScope.forManyToManyRelation(relation.toNamespace, relatedTableName, through.namespaceId, through.table);\n\t\tconst junctionJoinOn = buildPairedColumnExprs(junctionBinding, through.childColumns, childScope.current, through.targetColumns);\n\t\tconst parentLocalColumns = relation.on.localFields.map((field) => resolveFieldToColumn(context.contract, parentNamespaceId, parentModelName, field));\n\t\treturn {\n\t\t\tchildScope,\n\t\t\tsource: SelectAst.from(childScope.current.tableSource(context.contract)).withJoins([JoinAst.inner(junctionBinding.tableSource(context.contract), junctionJoinOn)]),\n\t\t\tcorrelation: buildPairedColumnExprs(junctionBinding, through.parentColumns, parentScope.current, parentLocalColumns),\n\t\t\tkeyColumn: firstJoinColumn(through.targetColumns, \"targetColumns\")\n\t\t};\n\t}\n\tconst childScope = parentScope.forRelation(relation.toNamespace, relatedTableName);\n\treturn {\n\t\tchildScope,\n\t\tsource: SelectAst.from(childScope.current.tableSource(context.contract)),\n\t\tcorrelation: buildJoinWhere(context.contract, parentNamespaceId, parentModelName, parentScope.current, childScope.current, relation),\n\t\tkeyColumn: firstTargetColumn(context.contract, relation) ?? \"id\"\n\t};\n}\nfunction buildExistsExpr(context, relation, rows, mode, predicate) {\n\tconst childWhere = toRelationWhereExpr(context, relation.toNamespace, relation.to, predicate, rows.childScope);\n\tconst filterPlan = planRelationFilterMode(rows.correlation, childWhere, mode);\n\tif (filterPlan.kind === \"constantTrue\") return AndExpr.true();\n\tconst subquery = rows.source.withProjection([ProjectionItem.of(\"_exists\", rows.childScope.current.column(rows.keyColumn))]).withWhere(filterPlan.where);\n\treturn filterPlan.notExists ? ExistsExpr.notExists(subquery) : ExistsExpr.exists(subquery);\n}\nfunction planRelationFilterMode(joinWhere, childWhere, mode) {\n\tif (mode === \"every\") {\n\t\tif (!childWhere) return { kind: \"constantTrue\" };\n\t\treturn {\n\t\t\tkind: \"exists\",\n\t\t\tnotExists: true,\n\t\t\twhere: and(joinWhere, not(childWhere))\n\t\t};\n\t}\n\tif (mode === \"none\") return {\n\t\tkind: \"exists\",\n\t\tnotExists: true,\n\t\twhere: childWhere ? and(joinWhere, childWhere) : joinWhere\n\t};\n\treturn {\n\t\tkind: \"exists\",\n\t\tnotExists: false,\n\t\twhere: childWhere ? and(joinWhere, childWhere) : joinWhere\n\t};\n}\nfunction firstJoinColumn(columns, label) {\n\tconst first = columns[0];\n\tif (!first) throw new InternalError(`Relation metadata is missing ${label}`);\n\treturn first;\n}\nfunction buildPairedColumnExprs(leftTable, leftColumns, rightTable, rightColumns) {\n\tif (leftColumns.length !== rightColumns.length) throw new InternalError(`Relation metadata has mismatched join column counts: ${leftColumns.length} left column(s), ${rightColumns.length} right column(s)`);\n\tif (leftColumns.length === 0) throw new InternalError(\"Relation metadata is missing join columns\");\n\tconst exprs = [];\n\tfor (let i = 0; i < leftColumns.length; i++) {\n\t\tconst left = leftColumns[i];\n\t\tconst right = rightColumns[i];\n\t\tif (!left || !right) throw new InternalError(`Relation metadata is missing a join column pair at index ${i}`);\n\t\texprs.push(BinaryExpr.eq(leftTable.column(left), rightTable.column(right)));\n\t}\n\tif (exprs.length === 1 && exprs[0]) return exprs[0];\n\treturn and(...exprs);\n}\nfunction toRelationWhereExpr(context, relatedNamespaceId, relatedModelName, predicate, scope) {\n\tif (!predicate) return;\n\tconst accessor = createModelAccessorInScope(context, relatedNamespaceId, relatedModelName, void 0, scope);\n\tif (typeof predicate === \"function\") return predicate(accessor);\n\tconst exprs = [];\n\tfor (const [fieldName, value] of Object.entries(predicate)) {\n\t\tif (value === void 0) continue;\n\t\tconst fieldAccessor = blindCast(accessor)[fieldName];\n\t\tif (!fieldAccessor) throw ormError(\"ORM.FIELD_UNKNOWN\", `Shorthand filter on \"${relatedModelName}.${fieldName}\": field is not defined on the model`, { meta: {\n\t\t\tmodel: relatedModelName,\n\t\t\tfield: fieldName\n\t\t} });\n\t\tif (value === null) {\n\t\t\tif (!fieldAccessor.isNull) throw new InternalError(`Shorthand filter on \"${relatedModelName}.${fieldName}\": isNull is unexpectedly missing — this is a bug in trait gating`);\n\t\t\texprs.push(fieldAccessor.isNull());\n\t\t\tcontinue;\n\t\t}\n\t\tif (!fieldAccessor.eq) throw ormError(\"ORM.FILTER_UNSUPPORTED\", `Shorthand filter on \"${relatedModelName}.${fieldName}\": field does not support equality comparisons`, { meta: {\n\t\t\tmodel: relatedModelName,\n\t\t\tfield: fieldName,\n\t\t\ttrait: \"equality\"\n\t\t} });\n\t\texprs.push(fieldAccessor.eq(value));\n\t}\n\tif (exprs.length === 0) return;\n\treturn exprs.length === 1 ? exprs[0] : and(...exprs);\n}\nfunction buildJoinWhere(contract, parentNamespaceId, parentModelName, parentTable, relatedTable, relation) {\n\tconst localFields = relation.on?.localFields ?? [];\n\tconst targetFields = relation.on?.targetFields ?? [];\n\tconst joinExprs = [];\n\tconst count = Math.min(localFields.length, targetFields.length);\n\tfor (let i = 0; i < count; i++) {\n\t\tconst localField = localFields[i];\n\t\tconst targetField = targetFields[i];\n\t\tif (!localField || !targetField) continue;\n\t\tconst localColumn = resolveFieldToColumn(contract, parentNamespaceId, parentModelName, localField);\n\t\tconst targetColumn = resolveFieldToColumn(contract, relation.toNamespace, relation.to, targetField);\n\t\tjoinExprs.push(BinaryExpr.eq(relatedTable.column(targetColumn), parentTable.column(localColumn)));\n\t}\n\tif (joinExprs.length === 0) throw new InternalError(\"Relation metadata is missing join columns\");\n\tconst firstExpr = joinExprs[0];\n\tif (joinExprs.length === 1 && firstExpr !== void 0) return firstExpr;\n\treturn and(...joinExprs);\n}\nfunction firstTargetColumn(contract, relation) {\n\tconst firstField = (relation.on?.targetFields)?.[0];\n\tif (!firstField) return;\n\treturn resolveFieldToColumn(contract, relation.toNamespace, relation.to, firstField);\n}\n//#endregion\n//#region src/grouped-collection.ts\nvar GroupedCollection = class GroupedCollection {\n\tctx;\n\tcontract;\n\tmodelName;\n\ttableName;\n\tnamespaceId;\n\tpreGroupState;\n\tgroupByFields;\n\tgroupByColumns;\n\thavingFilters;\n\tpostGroup;\n\tconstructor(ctx, modelName, options) {\n\t\tthis.ctx = ctx;\n\t\tthis.contract = ctx.context.contract;\n\t\tthis.modelName = modelName;\n\t\tthis.tableName = options.tableName;\n\t\tthis.namespaceId = blindCast(options.namespaceId);\n\t\tthis.preGroupState = options.preGroupState;\n\t\tthis.groupByFields = options.groupByFields;\n\t\tthis.groupByColumns = options.groupByColumns;\n\t\tthis.havingFilters = options.havingFilters;\n\t\tthis.postGroup = options.postGroup;\n\t}\n\t#clone(overrides) {\n\t\treturn blindCast(new GroupedCollection(this.ctx, this.modelName, {\n\t\t\ttableName: this.tableName,\n\t\t\tnamespaceId: this.namespaceId,\n\t\t\tpreGroupState: this.preGroupState,\n\t\t\tgroupByFields: this.groupByFields,\n\t\t\tgroupByColumns: this.groupByColumns,\n\t\t\thavingFilters: this.havingFilters,\n\t\t\tpostGroup: this.postGroup,\n\t\t\t...overrides\n\t\t}));\n\t}\n\thaving(predicate) {\n\t\tconst havingExpr = predicate(createHavingBuilder(this.contract, this.ctx.context.aggregateDescriptors, this.namespaceId, this.modelName, this.tableName));\n\t\treturn this.#clone({ havingFilters: [...this.havingFilters, havingExpr] });\n\t}\n\t/**\n\t* Append an `ORDER BY` clause on the grouped rows themselves — orders by\n\t* group key. Ordering by an aggregate alias needs a builder surface over\n\t* the aliases and isn't supported here. Unlocks post-group `limit(...)` /\n\t* `offset(...)`, which page a group order that would otherwise be undefined.\n\t*/\n\torderBy(selection) {\n\t\tconst selectors = Array.isArray(selection) ? selection : [selection];\n\t\tif (selectors.length === 0) throw ormError(\"ORM.ARGUMENT_INVALID\", `orderBy() for model \"${this.modelName}\" requires at least one selector`, { meta: {\n\t\t\tmethod: \"orderBy\",\n\t\t\tmodel: this.modelName\n\t\t} });\n\t\tconst accessor = createModelAccessor(this.ctx.context, this.namespaceId, this.modelName);\n\t\tconst nextOrders = selectors.map((selector) => selector(accessor));\n\t\treturn this.#clone({ postGroup: {\n\t\t\t...this.postGroup,\n\t\t\torderBy: [...this.postGroup.orderBy, ...nextOrders]\n\t\t} });\n\t}\n\t/**\n\t* Apply `LIMIT n` to the grouped rows. Replaces any previous post-group\n\t* limit. Requires a prior `orderBy(...)` — a database may return groups in\n\t* any order, so \"the first n groups\" is undefined without one.\n\t*/\n\tlimit(n) {\n\t\treturn this.#clone({ postGroup: {\n\t\t\t...this.postGroup,\n\t\t\tlimit: typeof n === \"number\" ? n : toExpr(n)\n\t\t} });\n\t}\n\t/**\n\t* Apply `OFFSET n` to the grouped rows. Replaces any previous post-group\n\t* offset. Requires a prior `orderBy(...)`, same as `limit(...)` — both\n\t* pagination methods need a deterministic group order.\n\t*/\n\toffset(n) {\n\t\treturn this.#clone({ postGroup: {\n\t\t\t...this.postGroup,\n\t\t\toffset: typeof n === \"number\" ? n : toExpr(n)\n\t\t} });\n\t}\n\t/**\n\t* Read terminal: run a grouped aggregate query.\n\t*\n\t* Accepts an optional `configure` callback that receives a\n\t* `MetaBuilder<'read'>` for attaching typed annotations.\n\t* Annotations are merged into the compiled plan's `meta.annotations`.\n\t*/\n\tget prepared() {\n\t\treturn { aggregate: (fn, configure) => this.#describeAggregate(fn, configure) };\n\t}\n\tasync aggregate(fn, configure) {\n\t\tconst description = this.#describeAggregate(fn, configure);\n\t\treturn description.consume(queryPlanRows(this.ctx.runtime, description.plan));\n\t}\n\t#describeAggregate(fn, configure) {\n\t\tconst aggregateSpec = fn(createAggregateBuilder(this.contract, this.ctx.context.aggregateDescriptors, this.namespaceId, this.modelName));\n\t\tconst aggregateEntries = Object.entries(aggregateSpec);\n\t\tif (aggregateEntries.length === 0) throw ormError(\"ORM.AGGREGATE_SELECTOR_MISSING\", \"groupBy().aggregate() requires at least one aggregation selector\", { meta: {\n\t\t\tmethod: \"groupBy.aggregate\",\n\t\t\tmodel: this.modelName\n\t\t} });\n\t\tfor (const [alias, selector] of aggregateEntries) if (!isAggregateSelector(selector)) throw ormError(\"ORM.AGGREGATE_SELECTOR_INVALID\", `groupBy().aggregate() selector \"${alias}\" is invalid`, { meta: {\n\t\t\tmethod: \"groupBy.aggregate\",\n\t\t\tmodel: this.modelName,\n\t\t\talias\n\t\t} });\n\t\tlet annotationsMap;\n\t\tif (configure !== void 0) {\n\t\t\tconst meta = createMetaBuilder(\"read\", \"groupBy.aggregate\");\n\t\t\tconfigure(meta);\n\t\t\tif (meta.annotations.size > 0) annotationsMap = meta.annotations;\n\t\t}\n\t\tconst compiled = mergeAnnotations(compileGroupedAggregate(this.contract, this.ctx.context.aggregateDescriptors, this.namespaceId, this.tableName, this.preGroupState, this.groupByColumns, aggregateSpec, combineWhereExprs(this.havingFilters), this.modelName, this.postGroup), annotationsMap);\n\t\tconst mapRow = createStorageRowMapper(this.contract, this.namespaceId, this.modelName);\n\t\treturn {\n\t\t\tplan: compiled,\n\t\t\tasync consume(source) {\n\t\t\t\treturn (await source.toArray()).map((row) => {\n\t\t\t\t\tconst mapped = mapRow(row);\n\t\t\t\t\tfor (const [alias] of aggregateEntries) mapped[alias] = row[alias];\n\t\t\t\t\treturn blindCast(mapped);\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t}\n};\n/**\n* The having metric methods, one per operation the registry contributes —\n* the runtime mirror of the contract's emitted aggregate map, which is what\n* types the surface as {@link HavingBuilder}. HAVING compares the value\n* inside the database, so only an operation's plain `AggregateExpr` form is\n* sound here: an operation outside the SQL aggregate alphabet exists only in\n* its descriptor-lowered form — a rendering for the driver boundary — and is\n* refused. The typed surface already excludes it; the runtime refusal covers\n* dynamic invocation.\n*/\nfunction createHavingBuilder(contract, aggregates, namespaceId, modelName, tableName) {\n\tconst fieldToColumn = getFieldToColumnMap(contract, namespaceId, modelName);\n\tconst builder = {};\n\tfor (const operation of aggregateOperationNames(aggregates)) builder[operation] = (field) => {\n\t\tif (!isAggregateFn(operation)) throw ormError(\"ORM.AGGREGATE_PROJECTION_ONLY\", `Aggregate operation '${operation}' is projection-only: it has no plain SQL form for HAVING, ORDER BY, or comparison positions.`, {\n\t\t\twhy: \"An operation outside the SQL aggregate alphabet reaches SQL only through its descriptor's lowering hook — a rendering for the driver boundary. HAVING and ORDER BY compare the value inside the database, where that rendering would change SQL semantics.\",\n\t\t\tfix: `Project '${operation}' in a select and filter or order on the projected value, or use an operation from the SQL aggregate alphabet.`,\n\t\t\tmeta: { operation }\n\t\t});\n\t\treturn createHavingComparisonMethods(new AggregateExpr(operation, field === void 0 ? void 0 : ColumnRef.of(tableName, fieldToColumn[field] ?? field)), () => resolveAggregate({\n\t\t\taggregates,\n\t\t\tcontract,\n\t\t\tnamespaceId,\n\t\t\ttableName,\n\t\t\tfn: operation,\n\t\t\tcolumn: field === void 0 ? void 0 : fieldToColumn[field] ?? field\n\t\t}).codec.codecId);\n\t};\n\treturn blindCast(builder);\n}\nfunction createHavingComparisonMethods(metric, outputCodecId) {\n\tconst buildBinaryExpr = (op, value) => {\n\t\tconst expression = predicateExpression(value);\n\t\tif (expression !== void 0 && (expression.kind !== \"prepared-param-ref\" || expression.codec.codecId !== outputCodecId())) throw ormError(\"ORM.HAVING_EXPRESSION_UNSUPPORTED\", \"HAVING comparands require a prepared parameter with the aggregate output codec\", { meta: { kind: expression.kind } });\n\t\treturn predicateComparison(op, metric, expression ?? LiteralExpr.of(value));\n\t};\n\treturn {\n\t\teq(value) {\n\t\t\treturn buildBinaryExpr(\"eq\", value);\n\t\t},\n\t\tneq(value) {\n\t\t\treturn buildBinaryExpr(\"neq\", value);\n\t\t},\n\t\tgt(value) {\n\t\t\treturn buildBinaryExpr(\"gt\", value);\n\t\t},\n\t\tlt(value) {\n\t\t\treturn buildBinaryExpr(\"lt\", value);\n\t\t},\n\t\tgte(value) {\n\t\t\treturn buildBinaryExpr(\"gte\", value);\n\t\t},\n\t\tlte(value) {\n\t\t\treturn buildBinaryExpr(\"lte\", value);\n\t\t}\n\t};\n}\n//#endregion\n//#region src/include-descriptors.ts\nfunction createIncludeScalar(fn, state, column) {\n\treturn {\n\t\tkind: \"includeScalar\",\n\t\tfn,\n\t\tstate,\n\t\t...column !== void 0 ? { column } : {}\n\t};\n}\nfunction createIncludeCombine(branches) {\n\treturn {\n\t\tkind: \"includeCombine\",\n\t\tbranches\n\t};\n}\nfunction isIncludeScalar(value) {\n\tif (typeof value !== \"object\" || value === null) return false;\n\tconst candidate = value;\n\treturn candidate.kind === \"includeScalar\" && typeof candidate.fn === \"string\" && isCollectionState(candidate.state);\n}\nfunction isIncludeCombine(value) {\n\tif (typeof value !== \"object\" || value === null) return false;\n\tconst candidate = value;\n\tif (candidate.kind !== \"includeCombine\") return false;\n\tif (typeof candidate.branches !== \"object\" || candidate.branches === null) return false;\n\treturn true;\n}\nfunction isCollectionStateCarrier(value) {\n\tif (typeof value !== \"object\" || value === null) return false;\n\treturn isCollectionState(value.state);\n}\nfunction isCollectionState(value) {\n\tif (typeof value !== \"object\" || value === null) return false;\n\tconst candidate = value;\n\treturn Array.isArray(candidate.filters) && Array.isArray(candidate.includes);\n}\n//#endregion\n//#region src/relation-mutator.ts\nfunction createRelationMutator() {\n\treturn {\n\t\tcreate(data) {\n\t\t\treturn {\n\t\t\t\tkind: \"create\",\n\t\t\t\tdata: Array.isArray(data) ? [...data] : [data]\n\t\t\t};\n\t\t},\n\t\tconnect(criteria) {\n\t\t\treturn {\n\t\t\t\tkind: \"connect\",\n\t\t\t\tcriteria: Array.isArray(criteria) ? [...criteria] : [criteria]\n\t\t\t};\n\t\t},\n\t\tdisconnect(criteria) {\n\t\t\tif (!criteria) return { kind: \"disconnect\" };\n\t\t\treturn {\n\t\t\t\tkind: \"disconnect\",\n\t\t\t\tcriteria: [...criteria]\n\t\t\t};\n\t\t}\n\t};\n}\nfunction isRelationMutationDescriptor(value) {\n\tif (!value || typeof value !== \"object\") return false;\n\tconst candidate = value;\n\tif (candidate.kind !== \"create\" && candidate.kind !== \"connect\" && candidate.kind !== \"disconnect\") return false;\n\treturn true;\n}\nfunction isRelationMutationCallback(value) {\n\treturn typeof value === \"function\";\n}\n//#endregion\n//#region src/mutation-executor.ts\nfunction hasThrough(relation) {\n\treturn relation.through !== void 0;\n}\nfunction hasNestedMutationCallbacks(contract, namespaceId, modelName, data) {\n\tconst relationNames = new Set(Object.keys(resolveModelRelations(contract, namespaceId, modelName)));\n\tfor (const [fieldName, value] of Object.entries(data)) {\n\t\tif (!relationNames.has(fieldName)) continue;\n\t\tif (isRelationMutationCallback(value)) return true;\n\t}\n\treturn false;\n}\nasync function executeNestedCreateMutation(options) {\n\treturn withMutationScope(options.runtime, async (scope) => createGraph(scope, options.context, options.namespaceId, options.modelName, options.data));\n}\nasync function executeNestedUpdateMutation(options) {\n\treturn withMutationScope(options.runtime, async (scope) => updateFirstGraph(scope, options.context, options.namespaceId, options.modelName, options.filters, options.data));\n}\nfunction buildRowIdentityFilterFromRow(contract, namespaceId, modelName, row) {\n\tconst tableName = resolveModelTableName(contract, namespaceId, modelName);\n\tconst identityColumns = resolveRowIdentityColumns(contract, namespaceId, tableName);\n\tif (identityColumns.length === 0) throw ormError(\"ORM.ROW_IDENTITY_MISSING\", `Nested mutations on model \"${modelName}\" require table \"${tableName}\" to have a primary key or unique constraint`, { meta: {\n\t\tmodel: modelName,\n\t\ttable: tableName\n\t} });\n\tconst filter = {};\n\tfor (const column of identityColumns) {\n\t\tconst fieldName = toFieldName(contract, namespaceId, modelName, column);\n\t\tconst value = row[fieldName];\n\t\tif (value === void 0) throw new InternalError(`Missing identity field \"${fieldName}\" while reloading model \"${modelName}\"`);\n\t\tfilter[fieldName] = value;\n\t}\n\treturn filter;\n}\nasync function withMutationScope(runtime, run) {\n\tif (typeof runtime.transaction === \"function\") return runInTransaction(await runtime.transaction(), run);\n\tif (typeof runtime.connection === \"function\") {\n\t\tconst connection = await runtime.connection();\n\t\ttry {\n\t\t\tif (typeof connection.transaction === \"function\") return await runInTransaction(await connection.transaction(), run);\n\t\t\treturn await run(connection);\n\t\t} finally {\n\t\t\tawait connection.release?.();\n\t\t}\n\t}\n\treturn run(runtime);\n}\nasync function runInTransaction(transaction, run) {\n\ttry {\n\t\tconst result = await run(transaction);\n\t\tif (typeof transaction.commit === \"function\") await transaction.commit();\n\t\treturn result;\n\t} catch (error) {\n\t\tif (typeof transaction.rollback === \"function\") await transaction.rollback();\n\t\tthrow error;\n\t}\n}\nasync function createGraph(scope, context, namespaceId, modelName, input) {\n\tconst contract = context.contract;\n\tconst parsed = parseMutationInput(contract, namespaceId, modelName, input);\n\tconst { parentOwned, childOwned, junctionOwned } = partitionByOwnership(parsed.relationMutations);\n\tconst scalarData = { ...parsed.scalarData };\n\tfor (const relationMutation of parentOwned) {\n\t\tif (relationMutation.mutation.kind === \"disconnect\") throw ormError(\"ORM.RELATION_MUTATION_UNSUPPORTED\", \"disconnect() is only supported in update() nested mutations\", { meta: {\n\t\t\tkind: \"disconnect\",\n\t\t\trelation: relationMutation.relation.relationName\n\t\t} });\n\t\tawait applyParentOwnedMutation(scope, context, namespaceId, modelName, scalarData, relationMutation.relation, relationMutation.mutation);\n\t}\n\tfor (const relationMutation of junctionOwned) {\n\t\tif (relationMutation.mutation.kind === \"disconnect\") throw ormError(\"ORM.RELATION_MUTATION_UNSUPPORTED\", \"disconnect() is only supported in update() nested mutations\", { meta: {\n\t\t\tkind: \"disconnect\",\n\t\t\trelation: relationMutation.relation.relationName\n\t\t} });\n\t\tawait preflightJunctionOwnedCreateMutation(scope, context, relationMutation);\n\t}\n\tconst parentRow = await insertSingleRow(scope, context, namespaceId, modelName, scalarData);\n\tfor (const relationMutation of childOwned) {\n\t\tif (relationMutation.mutation.kind === \"disconnect\") throw ormError(\"ORM.RELATION_MUTATION_UNSUPPORTED\", \"disconnect() is only supported in update() nested mutations\", { meta: {\n\t\t\tkind: \"disconnect\",\n\t\t\trelation: relationMutation.relation.relationName\n\t\t} });\n\t\tawait applyChildOwnedMutation(scope, context, namespaceId, modelName, parentRow, relationMutation.relation, relationMutation.mutation);\n\t}\n\tfor (const relationMutation of junctionOwned) await applyJunctionOwnedMutation(scope, context, namespaceId, modelName, parentRow, relationMutation.relation, relationMutation.mutation);\n\treturn parentRow;\n}\nasync function updateFirstGraph(scope, context, namespaceId, modelName, filters, input) {\n\tconst contract = context.contract;\n\tconst existingRow = await findFirstByFilters(scope, contract, namespaceId, modelName, filters);\n\tif (!existingRow) return null;\n\tconst parsed = parseMutationInput(contract, namespaceId, modelName, input);\n\tconst { parentOwned, childOwned, junctionOwned } = partitionByOwnership(parsed.relationMutations);\n\tconst scalarData = { ...parsed.scalarData };\n\tfor (const relationMutation of parentOwned) await applyParentOwnedMutation(scope, context, namespaceId, modelName, scalarData, relationMutation.relation, relationMutation.mutation);\n\tfor (const relationMutation of junctionOwned) await preflightJunctionOwnedCreateMutation(scope, context, relationMutation);\n\tlet parentRow = existingRow;\n\tconst mappedUpdateData = mapModelDataToStorageRow(contract, namespaceId, modelName, scalarData);\n\tif (Object.keys(mappedUpdateData).length > 0) {\n\t\tconst tableName = resolveModelTableName(contract, namespaceId, modelName);\n\t\tconst appliedUpdateDefaults = context.applyMutationDefaults({\n\t\t\top: \"update\",\n\t\t\tentry: tableName,\n\t\t\tnamespace: namespaceId,\n\t\t\tvalues: mappedUpdateData\n\t\t});\n\t\tfor (const def of appliedUpdateDefaults) mappedUpdateData[def.field] = def.value;\n\t\tconst identityWhere = shorthandToWhereExpr(context, namespaceId, modelName, castAs(buildRowIdentityFilterFromRow(contract, namespaceId, modelName, existingRow)));\n\t\tif (!identityWhere) throw new InternalError(`Failed to build row identity filter for model \"${modelName}\"`);\n\t\tconst updatedRaw = (await queryPlanRows(scope, compileUpdateReturning(contract, namespaceId, tableName, mappedUpdateData, [identityWhere], void 0)).toArray())[0];\n\t\tif (updatedRaw) parentRow = mapStorageRowToModelFields(contract, namespaceId, modelName, updatedRaw);\n\t}\n\tfor (const relationMutation of childOwned) await applyChildOwnedMutation(scope, context, namespaceId, modelName, parentRow, relationMutation.relation, relationMutation.mutation);\n\tfor (const relationMutation of junctionOwned) await applyJunctionOwnedMutation(scope, context, namespaceId, modelName, parentRow, relationMutation.relation, relationMutation.mutation);\n\treturn parentRow;\n}\nfunction parseMutationInput(contract, namespaceId, modelName, input) {\n\tconst scalarData = {};\n\tconst relationDefinitions = new Map(getRelationDefinitions(contract, namespaceId, modelName).map((relation) => [relation.relationName, relation]));\n\tconst relationMutations = [];\n\tfor (const [fieldName, value] of Object.entries(input)) {\n\t\tconst relation = relationDefinitions.get(fieldName);\n\t\tif (!relation) {\n\t\t\tscalarData[fieldName] = value;\n\t\t\tcontinue;\n\t\t}\n\t\tif (!isRelationMutationCallback(value)) throw ormError(\"ORM.RELATION_MUTATION_INVALID\", `Relation field \"${fieldName}\" on model \"${modelName}\" expects a mutator callback`, { meta: {\n\t\t\trelation: fieldName,\n\t\t\tmodel: modelName,\n\t\t\tproblem: \"missing-callback\"\n\t\t} });\n\t\tconst mutation = value(createRelationMutator());\n\t\tif (!isRelationMutationDescriptor(mutation)) throw ormError(\"ORM.RELATION_MUTATION_INVALID\", `Relation field \"${fieldName}\" on model \"${modelName}\" returned an invalid mutation descriptor`, { meta: {\n\t\t\trelation: fieldName,\n\t\t\tmodel: modelName,\n\t\t\tproblem: \"invalid-descriptor\"\n\t\t} });\n\t\trelationMutations.push({\n\t\t\trelation,\n\t\t\tmutation\n\t\t});\n\t}\n\treturn {\n\t\tscalarData,\n\t\trelationMutations\n\t};\n}\nfunction partitionByOwnership(relationMutations) {\n\tconst parentOwned = [];\n\tconst childOwned = [];\n\tconst junctionOwned = [];\n\tfor (const relationMutation of relationMutations) {\n\t\tif (hasThrough(relationMutation.relation)) {\n\t\t\tjunctionOwned.push({\n\t\t\t\trelation: relationMutation.relation,\n\t\t\t\tmutation: relationMutation.mutation\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tif (relationMutation.relation.cardinality === \"N:1\") {\n\t\t\tparentOwned.push(relationMutation);\n\t\t\tcontinue;\n\t\t}\n\t\tchildOwned.push(relationMutation);\n\t}\n\treturn {\n\t\tparentOwned,\n\t\tchildOwned,\n\t\tjunctionOwned\n\t};\n}\nasync function applyParentOwnedMutation(scope, context, parentNamespaceId, parentModelName, scalarData, relation, mutation) {\n\tconst contract = context.contract;\n\tif (mutation.kind === \"disconnect\") {\n\t\tfor (const localColumn of relation.localColumns) {\n\t\t\tconst parentFieldName = toFieldName(contract, parentNamespaceId, parentModelName, localColumn);\n\t\t\tscalarData[parentFieldName] = null;\n\t\t}\n\t\treturn;\n\t}\n\tif (mutation.kind === \"create\") {\n\t\tconst row = mutation.data[0];\n\t\tif (!row) throw ormError(\"ORM.RELATION_MUTATION_INVALID\", `create() nested mutation for relation \"${relation.relationName}\" requires data`, { meta: {\n\t\t\tkind: \"create\",\n\t\t\trelation: relation.relationName,\n\t\t\tproblem: \"missing-data\"\n\t\t} });\n\t\tcopyRelatedValuesToParent(contract, parentNamespaceId, parentModelName, relation, scalarData, await createGraph(scope, context, relation.relatedNamespaceId, relation.relatedModelName, castAs(row)));\n\t\treturn;\n\t}\n\tconst criterion = mutation.criteria[0];\n\tif (!criterion) throw ormError(\"ORM.RELATION_MUTATION_INVALID\", `connect() nested mutation for relation \"${relation.relationName}\" requires criterion`, { meta: {\n\t\tkind: \"connect\",\n\t\trelation: relation.relationName,\n\t\tproblem: \"missing-criterion\"\n\t} });\n\tconst relatedRow = await findRowByCriterion(scope, context, relation.relatedNamespaceId, relation.relatedModelName, castAs(criterion));\n\tif (!relatedRow) throw ormError(\"ORM.RELATION_ROW_MISSING\", `connect() nested mutation for relation \"${relation.relationName}\" did not find a matching row`, { meta: {\n\t\tkind: \"connect\",\n\t\trelation: relation.relationName\n\t} });\n\tcopyRelatedValuesToParent(contract, parentNamespaceId, parentModelName, relation, scalarData, relatedRow);\n}\nfunction copyRelatedValuesToParent(contract, parentNamespaceId, parentModelName, relation, scalarData, relatedRow) {\n\tfor (let i = 0; i < relation.localColumns.length; i++) {\n\t\tconst localColumn = relation.localColumns[i];\n\t\tconst targetColumn = relation.targetColumns[i];\n\t\tif (!localColumn || !targetColumn) continue;\n\t\tconst parentFieldName = toFieldName(contract, parentNamespaceId, parentModelName, localColumn);\n\t\tscalarData[parentFieldName] = relatedRow[toFieldName(contract, relation.relatedNamespaceId, relation.relatedModelName, targetColumn)];\n\t}\n}\nasync function applyChildOwnedMutation(scope, context, parentNamespaceId, parentModelName, parentRow, relation, mutation) {\n\tconst contract = context.contract;\n\tconst parentValues = readParentColumnValues(contract, parentNamespaceId, parentModelName, relation, parentRow);\n\tif (mutation.kind === \"create\") {\n\t\tfor (const childInput of mutation.data) {\n\t\t\tconst payload = { ...castAs(childInput) };\n\t\t\tfor (const [childColumn, parentValue] of parentValues.entries()) {\n\t\t\t\tconst childFieldName = toFieldName(contract, relation.relatedNamespaceId, relation.relatedModelName, childColumn);\n\t\t\t\tpayload[childFieldName] = parentValue;\n\t\t\t}\n\t\t\tawait createGraph(scope, context, relation.relatedNamespaceId, relation.relatedModelName, castAs(payload));\n\t\t}\n\t\treturn;\n\t}\n\tif (mutation.kind === \"connect\") {\n\t\tfor (const criterion of mutation.criteria) {\n\t\t\tconst criterionWhere = shorthandToWhereExpr(context, relation.relatedNamespaceId, relation.relatedModelName, castAs(criterion));\n\t\t\tif (!criterionWhere) throw ormError(\"ORM.RELATION_MUTATION_INVALID\", `connect() nested mutation for relation \"${relation.relationName}\" requires non-empty criterion`, { meta: {\n\t\t\t\tkind: \"connect\",\n\t\t\t\trelation: relation.relationName,\n\t\t\t\tproblem: \"empty-criterion\"\n\t\t\t} });\n\t\t\tconst setValues = {};\n\t\t\tfor (const [childColumn, parentValue] of parentValues.entries()) setValues[childColumn] = parentValue;\n\t\t\tawait executeUpdateCount(scope, contract, relation.relatedNamespaceId, relation.relatedTableName, setValues, [criterionWhere]);\n\t\t}\n\t\treturn;\n\t}\n\tconst setValues = {};\n\tfor (const childColumn of parentValues.keys()) setValues[childColumn] = null;\n\tif (!mutation.criteria || mutation.criteria.length === 0) {\n\t\tconst parentJoinWhere = buildChildJoinWhere(relation, parentValues);\n\t\tawait executeUpdateCount(scope, contract, relation.relatedNamespaceId, relation.relatedTableName, setValues, [parentJoinWhere]);\n\t\treturn;\n\t}\n\tfor (const criterion of mutation.criteria) {\n\t\tconst criterionWhere = shorthandToWhereExpr(context, relation.relatedNamespaceId, relation.relatedModelName, castAs(criterion));\n\t\tif (!criterionWhere) throw ormError(\"ORM.RELATION_MUTATION_INVALID\", `disconnect() nested mutation for relation \"${relation.relationName}\" requires non-empty criterion`, { meta: {\n\t\t\tkind: \"disconnect\",\n\t\t\trelation: relation.relationName,\n\t\t\tproblem: \"empty-criterion\"\n\t\t} });\n\t\tconst parentJoinWhere = buildChildJoinWhere(relation, parentValues);\n\t\tawait executeUpdateCount(scope, contract, relation.relatedNamespaceId, relation.relatedTableName, setValues, [and(parentJoinWhere, criterionWhere)]);\n\t}\n}\nasync function applyJunctionOwnedMutation(scope, context, parentNamespaceId, parentModelName, parentRow, relation, mutation) {\n\tconst contract = context.contract;\n\tconst parentPkValues = readJunctionParentValues(contract, parentNamespaceId, parentModelName, relation, parentRow);\n\tassertJunctionPayloadWritable(relation, mutation.kind);\n\tif (mutation.kind === \"create\") {\n\t\tfor (const childInput of mutation.data) await insertJunctionLink(scope, context, relation, parentPkValues, readJunctionTargetValues(contract, relation, await createGraph(scope, context, relation.relatedNamespaceId, relation.relatedModelName, castAs(childInput))), \"create\");\n\t\treturn;\n\t}\n\tif (mutation.kind === \"connect\") {\n\t\tfor (const criterion of mutation.criteria) await insertJunctionLink(scope, context, relation, parentPkValues, await resolveJunctionTargetValues(scope, context, relation, \"connect\", criterion), \"connect\");\n\t\treturn;\n\t}\n\tif (!mutation.criteria || mutation.criteria.length === 0) throw ormError(\"ORM.RELATION_MUTATION_INVALID\", `disconnect() nested mutation for relation \"${relation.relationName}\" requires criterion`, { meta: {\n\t\tkind: \"disconnect\",\n\t\trelation: relation.relationName,\n\t\tproblem: \"missing-criterion\"\n\t} });\n\tfor (const criterion of mutation.criteria) await deleteJunctionLink(scope, context, relation, parentPkValues, await resolveJunctionTargetValues(scope, context, relation, \"disconnect\", criterion));\n}\nasync function preflightJunctionOwnedCreateMutation(scope, context, relationMutation) {\n\tconst { relation, mutation } = relationMutation;\n\tassertJunctionMetadataShape(relation);\n\tassertJunctionPayloadWritable(relation, mutation.kind);\n\tif (mutation.kind !== \"connect\") return;\n\tconst seenTargetKeys = /* @__PURE__ */ new Set();\n\tfor (const criterion of mutation.criteria) {\n\t\tconst targetValues = await resolveJunctionTargetValues(scope, context, relation, \"connect\", criterion);\n\t\tconst targetKey = JSON.stringify([...targetValues.entries()]);\n\t\tif (seenTargetKeys.has(targetKey)) throw ormError(\"ORM.RELATION_MUTATION_INVALID\", `connect() nested mutation for relation \"${relation.relationName}\" resolved duplicate junction link targets; remove the duplicate criteria`, { meta: {\n\t\t\tkind: \"connect\",\n\t\t\trelation: relation.relationName,\n\t\t\tproblem: \"duplicate-criteria\"\n\t\t} });\n\t\tseenTargetKeys.add(targetKey);\n\t}\n}\nfunction assertJunctionPayloadWritable(relation, mutationKind) {\n\tconst through = relation.through;\n\tif (mutationKind !== \"create\" && mutationKind !== \"connect\" || through.requiredPayloadColumns.length === 0) return;\n\tconst cols = through.requiredPayloadColumns.map((c) => `\\`${c}\\``).join(\", \");\n\tthrow ormError(\"ORM.RELATION_MUTATION_UNSUPPORTED\", `Cannot \\`${mutationKind}\\` on relation \\`${relation.relationName}\\`: its junction \\`${through.table}\\` has required column(s) ${cols} the relation API can't populate. Write the \\`${through.table}\\` junction directly or use the SQL builder.`, { meta: {\n\t\tkind: mutationKind,\n\t\trelation: relation.relationName,\n\t\treason: \"junction-required-columns\",\n\t\tjunction: through.table\n\t} });\n}\nasync function resolveJunctionTargetValues(scope, context, relation, kind, criterion) {\n\tconst relatedRow = await findRowByCriterion(scope, context, relation.relatedNamespaceId, relation.relatedModelName, criterion);\n\tif (!relatedRow) throw ormError(\"ORM.RELATION_ROW_MISSING\", `${kind}() nested mutation for relation \"${relation.relationName}\" did not find a matching row`, { meta: {\n\t\tkind,\n\t\trelation: relation.relationName\n\t} });\n\treturn readJunctionTargetValues(context.contract, relation, relatedRow);\n}\nfunction readJunctionParentValues(contract, parentNamespaceId, parentModelName, relation, parentRow) {\n\tconst values = /* @__PURE__ */ new Map();\n\tassertJunctionParentMetadataLength(relation);\n\tfor (let i = 0; i < relation.through.parentColumns.length; i++) {\n\t\tconst junctionColumn = relation.through.parentColumns[i];\n\t\tconst parentColumn = relation.localColumns[i];\n\t\tif (junctionColumn === void 0 || parentColumn === void 0) throw new InternalError(`Relation \"${relation.relationName}\" has incomplete junction metadata for parent columns`);\n\t\tconst parentFieldName = toFieldName(contract, parentNamespaceId, parentModelName, parentColumn);\n\t\tconst parentValue = parentRow[parentFieldName];\n\t\tif (parentValue === void 0) throw new InternalError(`Nested mutation requires parent field \"${parentFieldName}\" to be present in returned row`);\n\t\tvalues.set(junctionColumn, parentValue);\n\t}\n\treturn values;\n}\nfunction readJunctionTargetValues(contract, relation, relatedRow) {\n\tconst values = /* @__PURE__ */ new Map();\n\tassertJunctionTargetMetadataLength(relation);\n\tfor (let i = 0; i < relation.through.childColumns.length; i++) {\n\t\tconst junctionColumn = relation.through.childColumns[i];\n\t\tconst targetColumn = relation.through.targetColumns[i];\n\t\tif (junctionColumn === void 0 || targetColumn === void 0) throw new InternalError(`Relation \"${relation.relationName}\" has incomplete junction metadata for target columns`);\n\t\tconst targetFieldName = toFieldName(contract, relation.relatedNamespaceId, relation.relatedModelName, targetColumn);\n\t\tconst targetValue = relatedRow[targetFieldName];\n\t\tif (targetValue === void 0) throw new InternalError(`Nested mutation requires target field \"${targetFieldName}\" to be present in returned row`);\n\t\tvalues.set(junctionColumn, targetValue);\n\t}\n\treturn values;\n}\nfunction assertJunctionMetadataLength(relation, throughColumnName, throughColumns, pairedColumnName, pairedColumns) {\n\tif (throughColumns.length === pairedColumns.length) return;\n\tthrow new InternalError(`Relation \"${relation.relationName}\" has invalid junction metadata: ${throughColumnName} has ${throughColumns.length} column(s), but ${pairedColumnName} has ${pairedColumns.length}`);\n}\nfunction assertJunctionParentMetadataLength(relation) {\n\tassertJunctionMetadataLength(relation, \"parentColumns\", relation.through.parentColumns, \"localColumns\", relation.localColumns);\n}\nfunction assertJunctionTargetMetadataLength(relation) {\n\tassertJunctionMetadataLength(relation, \"childColumns\", relation.through.childColumns, \"targetColumns\", relation.through.targetColumns);\n}\nfunction assertJunctionMetadataShape(relation) {\n\tassertJunctionParentMetadataLength(relation);\n\tassertJunctionTargetMetadataLength(relation);\n}\nfunction writeJunctionColumn(junctionRow, through, column, value, relationName) {\n\tif (Object.hasOwn(junctionRow, column) && !Object.is(junctionRow[column], value)) throw ormError(\"ORM.RELATION_MUTATION_INVALID\", `Cannot write junction \"${through.table}\": conflicting values for junction column \"${column}\"`, { meta: {\n\t\trelation: relationName,\n\t\tjunction: through.table,\n\t\tcolumn\n\t} });\n\tjunctionRow[column] = value;\n}\nasync function insertJunctionLink(scope, context, relation, parentPkValues, targetPkValues, mutationKind) {\n\tconst through = relation.through;\n\tconst junctionRow = {};\n\tfor (const [column, value] of parentPkValues.entries()) writeJunctionColumn(junctionRow, through, column, value, relation.relationName);\n\tfor (const [column, value] of targetPkValues.entries()) writeJunctionColumn(junctionRow, through, column, value, relation.relationName);\n\tconst applied = context.applyMutationDefaults({\n\t\top: \"create\",\n\t\tentry: through.table,\n\t\tnamespace: through.namespaceId,\n\t\tvalues: junctionRow\n\t});\n\tfor (const def of applied) junctionRow[def.field] = def.value;\n\tconst compiled = compileInsertCount(context.contract, through.namespaceId, through.table, [junctionRow]);\n\ttry {\n\t\tawait scope.execute(compiled);\n\t} catch (error) {\n\t\tif (mutationKind === \"connect\" && isUniqueConstraintViolation(error)) throw ormError(\"ORM.RELATION_LINK_DUPLICATE\", `connect() nested mutation for relation \"${relation.relationName}\" violated a unique constraint on junction \"${through.table}\"; the junction link may already be present`, {\n\t\t\tmeta: {\n\t\t\t\trelation: relation.relationName,\n\t\t\t\tjunction: through.table\n\t\t\t},\n\t\t\tcause: error\n\t\t});\n\t\tthrow error;\n\t}\n}\nasync function deleteJunctionLink(scope, context, relation, parentPkValues, targetPkValues) {\n\tconst through = relation.through;\n\tconst junctionRow = {};\n\tfor (const [column, value] of parentPkValues.entries()) writeJunctionColumn(junctionRow, through, column, value, relation.relationName);\n\tfor (const [column, value] of targetPkValues.entries()) writeJunctionColumn(junctionRow, through, column, value, relation.relationName);\n\tconst exprs = [];\n\tfor (const [column, value] of Object.entries(junctionRow)) exprs.push(BinaryExpr.eq(ColumnRef.of(through.table, column), LiteralExpr.of(value)));\n\tconst first = exprs[0];\n\tconst where = exprs.length === 1 && first !== void 0 ? first : and(...exprs);\n\tconst compiled = compileDeleteCount(context.contract, through.namespaceId, through.table, [where]);\n\tawait scope.execute(compiled);\n}\nfunction readParentColumnValues(contract, parentNamespaceId, parentModelName, relation, parentRow) {\n\tconst values = /* @__PURE__ */ new Map();\n\tfor (let i = 0; i < relation.localColumns.length; i++) {\n\t\tconst localColumn = relation.localColumns[i];\n\t\tconst targetColumn = relation.targetColumns[i];\n\t\tif (!localColumn || !targetColumn) continue;\n\t\tconst parentFieldName = toFieldName(contract, parentNamespaceId, parentModelName, localColumn);\n\t\tconst parentValue = parentRow[parentFieldName];\n\t\tif (parentValue === void 0) throw new InternalError(`Nested mutation requires parent field \"${parentFieldName}\" to be present in returned row`);\n\t\tvalues.set(targetColumn, parentValue);\n\t}\n\treturn values;\n}\nfunction buildChildJoinWhere(relation, childValues) {\n\tconst exprs = [];\n\tfor (const [childColumn, parentValue] of childValues.entries()) exprs.push(BinaryExpr.eq(ColumnRef.of(relation.relatedTableName, childColumn), LiteralExpr.of(parentValue)));\n\tconst first = exprs[0];\n\tif (exprs.length === 1 && first !== void 0) return first;\n\treturn and(...exprs);\n}\nasync function insertSingleRow(scope, context, namespaceId, modelName, data) {\n\tconst contract = context.contract;\n\tconst tableName = resolveModelTableName(contract, namespaceId, modelName);\n\tconst mappedData = mapModelDataToStorageRow(contract, namespaceId, modelName, data);\n\tconst applied = context.applyMutationDefaults({\n\t\top: \"create\",\n\t\tentry: tableName,\n\t\tnamespace: namespaceId,\n\t\tvalues: mappedData\n\t});\n\tfor (const def of applied) mappedData[def.field] = def.value;\n\tconst firstRow = (await queryPlanRows(scope, compileInsertReturning(contract, namespaceId, tableName, [mappedData], void 0)).toArray())[0];\n\tif (!firstRow) throw ormError(\"ORM.MUTATION_ROW_MISSING\", `Nested create for model \"${modelName}\" did not return a row`, { meta: {\n\t\toperation: \"create\",\n\t\tmodel: modelName,\n\t\tphase: \"nested\"\n\t} });\n\treturn mapStorageRowToModelFields(contract, namespaceId, modelName, firstRow);\n}\nasync function findRowByCriterion(scope, context, namespaceId, modelName, criterion) {\n\tconst contract = context.contract;\n\tconst whereExpr = shorthandToWhereExpr(context, namespaceId, modelName, castAs(criterion));\n\tif (!whereExpr) throw ormError(\"ORM.RELATION_MUTATION_INVALID\", `Nested connect for model \"${modelName}\" requires non-empty criterion`, { meta: {\n\t\tkind: \"connect\",\n\t\tmodel: modelName,\n\t\tproblem: \"empty-criterion\"\n\t} });\n\tconst firstRow = (await queryPlanRows(scope, compileSelect(contract, namespaceId, resolveModelTableName(contract, namespaceId, modelName), {\n\t\t...emptyState(),\n\t\tfilters: [whereExpr],\n\t\tlimit: 1\n\t})).toArray())[0];\n\tif (!firstRow) return null;\n\treturn mapStorageRowToModelFields(contract, namespaceId, modelName, firstRow);\n}\nasync function findFirstByFilters(scope, contract, namespaceId, modelName, filters) {\n\tconst firstRow = (await queryPlanRows(scope, compileSelect(contract, namespaceId, resolveModelTableName(contract, namespaceId, modelName), {\n\t\t...emptyState(),\n\t\tfilters,\n\t\tlimit: 1\n\t})).toArray())[0];\n\tif (!firstRow) return null;\n\treturn mapStorageRowToModelFields(contract, namespaceId, modelName, firstRow);\n}\nasync function executeUpdateCount(scope, contract, namespaceId, tableName, setValues, filters) {\n\tconst compiled = compileUpdateCount(contract, namespaceId, tableName, setValues, filters);\n\tawait scope.execute(compiled);\n}\nconst relationDefsCache = /* @__PURE__ */ new WeakMap();\nfunction getRelationDefinitions(contract, namespaceId, modelName) {\n\tlet perContract = relationDefsCache.get(contract);\n\tif (!perContract) {\n\t\tperContract = /* @__PURE__ */ new Map();\n\t\trelationDefsCache.set(contract, perContract);\n\t}\n\tconst cacheKey = JSON.stringify([namespaceId, modelName]);\n\tconst cached = perContract.get(cacheKey);\n\tif (cached) return cached;\n\tconst relations = resolveModelRelations(contract, namespaceId, modelName);\n\tconst definitions = Object.entries(relations).map(([relationName, relation]) => ({\n\t\trelationName,\n\t\trelatedModelName: relation.to,\n\t\trelatedNamespaceId: relation.toNamespace,\n\t\trelatedTableName: resolveModelTableName(contract, relation.toNamespace, relation.to),\n\t\tcardinality: relation.cardinality,\n\t\tlocalColumns: relation.on.localFields.map((f) => resolveFieldToColumn(contract, namespaceId, modelName, f)),\n\t\ttargetColumns: relation.on.targetFields.map((f) => resolveFieldToColumn(contract, relation.toNamespace, relation.to, f)),\n\t\tthrough: relation.through ? {\n\t\t\ttable: relation.through.table,\n\t\t\tnamespaceId: relation.through.namespaceId,\n\t\t\tparentColumns: relation.through.parentColumns,\n\t\t\tchildColumns: relation.through.childColumns,\n\t\t\ttargetColumns: relation.through.targetColumns,\n\t\t\trequiredPayloadColumns: relation.through.requiredPayloadColumns\n\t\t} : void 0\n\t}));\n\tperContract.set(cacheKey, definitions);\n\treturn definitions;\n}\nfunction toFieldName(contract, namespaceId, modelName, columnName) {\n\treturn getColumnToFieldMap(contract, namespaceId, modelName)[columnName] ?? columnName;\n}\n//#endregion\n//#region src/where-interop.ts\nfunction normalizeWhereArg(arg, options) {\n\tif (arg === void 0) return;\n\tif (arg === null) throw ormError(\"ORM.ARGUMENT_INVALID\", \"WhereArg cannot be null. Pass undefined or a valid WhereExpr/ToWhereExpr payload.\", { meta: { argument: \"where\" } });\n\tif (isToWhereExpr(arg)) return arg.toWhereExpr();\n\tif (options?.contract) return bindWhereExpr(options.contract, arg, options.namespaceId);\n\treturn arg;\n}\nfunction isToWhereExpr(arg) {\n\treturn typeof arg === \"object\" && arg !== null && \"toWhereExpr\" in arg && !isWhereExpr(arg);\n}\n//#endregion\n//#region src/write-guards.ts\nconst CHAIN_PARTS = {\n\torderBy: {\n\t\tnoun: \"an order\",\n\t\tcall: \"orderBy()\"\n\t},\n\tlimit: {\n\t\tnoun: \"a limit\",\n\t\tcall: \"limit()\"\n\t},\n\toffset: {\n\t\tnoun: \"an offset\",\n\t\tcall: \"offset()\"\n\t},\n\tcursor: {\n\t\tnoun: \"a cursor\",\n\t\tcall: \"cursor()\"\n\t},\n\tdistinct: {\n\t\tnoun: \"a distinct selection\",\n\t\tcall: \"distinct()\"\n\t},\n\tdistinctOn: {\n\t\tnoun: \"a distinctOn selection\",\n\t\tcall: \"distinctOn()\"\n\t}\n};\nfunction presentParts(state, names) {\n\tconst present = names.filter((name) => {\n\t\tconst value = state[name];\n\t\treturn Array.isArray(value) ? value.length > 0 : value !== void 0;\n\t});\n\treturn {\n\t\tnouns: present.map((name) => CHAIN_PARTS[name].noun),\n\t\tcalls: present.map((name) => CHAIN_PARTS[name].call)\n\t};\n}\nfunction listed(items, conjunction) {\n\tconst last = items.at(-1) ?? \"\";\n\treturn items.length > 1 ? `${items.slice(0, -1).join(\", \")} ${conjunction} ${last}` : last;\n}\nconst HIDDEN_BY_A_FRAGMENT = \"A fragment passed to with can add one without showing it at the call site.\";\n/** Throws `ORM.ARGUMENT_INVALID` when the collection has a limit, an offset, a cursor or a distinct selection, which `method`, a write of every matching row, would ignore. */\nfunction assertBulkWriteIgnoresNothing(state, modelName, method) {\n\tconst { nouns, calls } = presentParts(state, [\n\t\t\"limit\",\n\t\t\"offset\",\n\t\t\"cursor\",\n\t\t\"distinct\",\n\t\t\"distinctOn\"\n\t]);\n\tif (nouns.length === 0) return;\n\tconst { limit, offset, cursor, distinct, distinctOn } = state;\n\tthrow ormError(\"ORM.ARGUMENT_INVALID\", `Cannot ${method} ${modelName}: the collection has ${listed(nouns, \"and\")}`, {\n\t\twhy: `${method} changes every row that matches the filter. The statement it runs cannot apply ${listed(nouns, \"or\")}, so it would change more rows than the chain asks for. ${HIDDEN_BY_A_FRAGMENT}`,\n\t\tfix: `Remove ${listed(calls, \"and\")} before ${method}, or read the rows first and change them by their ids.`,\n\t\tmeta: {\n\t\t\tmodel: modelName,\n\t\t\tmethod,\n\t\t\tlimit,\n\t\t\toffset,\n\t\t\tcursor,\n\t\t\tdistinct,\n\t\t\tdistinctOn\n\t\t}\n\t});\n}\n/** Throws `ORM.ARGUMENT_INVALID` when the collection has an order, a limit, an offset, a cursor or a distinct selection, which an update with a relation callback would ignore. */\nfunction assertRelationUpdateIgnoresNothing(state, modelName) {\n\tconst { nouns, calls } = presentParts(state, [\n\t\t\"orderBy\",\n\t\t\"limit\",\n\t\t\"offset\",\n\t\t\"cursor\",\n\t\t\"distinct\",\n\t\t\"distinctOn\"\n\t]);\n\tif (nouns.length === 0) return;\n\tconst { orderBy, limit, offset, cursor, distinct, distinctOn } = state;\n\tthrow ormError(\"ORM.ARGUMENT_INVALID\", `Cannot update ${modelName} with a relation mutation: the collection has ${listed(nouns, \"and\")}`, {\n\t\twhy: `An update that changes a relation finds its row by the filter alone. It would ignore ${listed(nouns, \"and\")}, and could change another row than first() returns. ${HIDDEN_BY_A_FRAGMENT}`,\n\t\tfix: `Remove ${listed(calls, \"and\")} before update, or filter to the one row, such as by its id.`,\n\t\tmeta: {\n\t\t\tmodel: modelName,\n\t\t\tmethod: \"update\",\n\t\t\tordered: orderBy !== void 0 && orderBy.length > 0,\n\t\t\tlimit,\n\t\t\toffset,\n\t\t\tcursor,\n\t\t\tdistinct,\n\t\t\tdistinctOn\n\t\t}\n\t});\n}\n//#endregion\n//#region src/collection.ts\nfunction applyCreateDefaults(ctx, namespaceId, tableName, rows, defaultValueCache = /* @__PURE__ */ new Map()) {\n\tfor (const row of rows) {\n\t\tconst applied = ctx.context.applyMutationDefaults({\n\t\t\top: \"create\",\n\t\t\tentry: tableName,\n\t\t\tnamespace: namespaceId,\n\t\t\tvalues: row,\n\t\t\tdefaultValueCache\n\t\t});\n\t\tfor (const def of applied) row[def.field] = def.value;\n\t}\n}\nfunction applyUpdateDefaults(ctx, namespaceId, tableName, values) {\n\tconst applied = ctx.context.applyMutationDefaults({\n\t\top: \"update\",\n\t\tentry: tableName,\n\t\tnamespace: namespaceId,\n\t\tvalues\n\t});\n\tfor (const def of applied) values[def.field] = def.value;\n}\nfunction isToWhereExprInput(value) {\n\treturn typeof value === \"object\" && value !== null && \"toWhereExpr\" in value && typeof value.toWhereExpr === \"function\";\n}\nfunction isWhereDirectInput(value) {\n\treturn isWhereExpr(value) && typeof value === \"object\" && value !== null && \"accept\" in value && typeof value.accept === \"function\" || isToWhereExprInput(value);\n}\nfunction splitCreateArguments(optionsOrConfigure, configure) {\n\tif (typeof optionsOrConfigure === \"function\") return {\n\t\toptions: void 0,\n\t\tconfigureCallback: optionsOrConfigure\n\t};\n\treturn {\n\t\toptions: optionsOrConfigure,\n\t\tconfigureCallback: configure\n\t};\n}\nfunction isMtiVariantInfo(variant) {\n\treturn variant?.strategy === \"mti\";\n}\nvar CollectionBase = class CollectionBase {\n\t/** @internal */\n\tctx;\n\t/** @internal */\n\tcontract;\n\t/** @internal */\n\tmodelName;\n\t/** @internal */\n\ttableName;\n\t/** @internal */\n\tnamespaceId;\n\t/** @internal */\n\tstate;\n\t/** @internal */\n\tregistry;\n\t/** @internal */\n\tincludeRefinementMode;\n\tconstructor(ctx, modelName, options) {\n\t\tthis.ctx = ctx;\n\t\tthis.contract = ctx.context.contract;\n\t\tthis.modelName = modelName;\n\t\tthis.namespaceId = options.namespaceId;\n\t\tthis.tableName = options.tableName ?? resolveModelTableName(this.contract, options.namespaceId, modelName);\n\t\tthis.state = options.state ?? emptyState();\n\t\tthis.registry = options.registry ?? /* @__PURE__ */ new Map();\n\t\tthis.includeRefinementMode = options.includeRefinementMode ?? false;\n\t\tthis.#installAggregateReducers();\n\t}\n\t/**\n\t* Install one include-scalar reducer per operation the composed registry\n\t* contributes — the runtime mirror of the contract's emitted aggregate map,\n\t* which is what types the reducers as {@link AggregateIncludeReducers} on\n\t* the public {@link Collection} surface. The reducers live on the instance\n\t* because their names are the registry's, not the class declaration's.\n\t*\n\t* A name the collection already carries is skipped, and which member holds\n\t* it decides what the skip means. A `CollectionBase` member is rejected at\n\t* ORM composition with `ORM.AGGREGATE_OPERATION_RESERVED`, since\n\t* {@link reservedCollectionMemberNames} scans this class. A member declared\n\t* by a custom collection class registered through `orm({ collections })`\n\t* falls outside that set, so it keeps the name and the operation gets no\n\t* reducer. The type level is what guards that case: {@link Collection}\n\t* intersects the class with {@link AggregateIncludeReducers}, so for any\n\t* contract whose emitted map carries the operation, a subclass member that\n\t* does not match the reducer's signature is a type error.\n\t*/\n\t#installAggregateReducers() {\n\t\tfor (const operation of aggregateOperationNames(this.ctx.context.aggregateDescriptors)) {\n\t\t\tif (operation in this) continue;\n\t\t\tObject.defineProperty(this, operation, {\n\t\t\t\tvalue: (field) => this.#includeScalarReducer(operation, field),\n\t\t\t\twritable: true,\n\t\t\t\tenumerable: false,\n\t\t\t\tconfigurable: true\n\t\t\t});\n\t\t}\n\t}\n\t/**\n\t* Scalar reducer — reduces a to-many relation to the operation's value over\n\t* the related rows. Use inside an `include(...)` refinement callback as\n\t* `include(..., (rel) => rel.count())`; throws if called elsewhere. The\n\t* parent row's relation field becomes that value instead of an array. A\n\t* call without a field aggregates over rows; a call with one aggregates the\n\t* field's storage column.\n\t*/\n\t#includeScalarReducer(operation, field) {\n\t\tthis.#assertIncludeRefinementMode(`${operation}()`);\n\t\tconst column = field === void 0 ? void 0 : resolveFieldToColumn(this.contract, this.namespaceId, this.modelName, field);\n\t\treturn createIncludeScalar(operation, this.state, column);\n\t}\n\twhere(input) {\n\t\tconst filter = normalizeWhereArg(typeof input === \"function\" ? input(createModelAccessor(this.ctx.context, this.namespaceId, this.modelName, this.state.variantName)) : isWhereDirectInput(input) ? input : shorthandToWhereExpr(this.ctx.context, this.namespaceId, this.modelName, input), {\n\t\t\tcontract: this.contract,\n\t\t\tnamespaceId: this.namespaceId\n\t\t});\n\t\tif (!filter) return blindCast(this);\n\t\treturn this.#cloneSelf({ filters: [...this.state.filters, filter] });\n\t}\n\twith(fn) {\n\t\treturn fn(this);\n\t}\n\t/**\n\t* Define a query fragment for this collection's model, such as a shared `select` and `include`. The body is typed once, against the model's plain collection. The fragment accepts any collection of the model that `select` and `variant` have not narrowed.\n\t*\n\t* ```ts\n\t* const summary = db.Post.fragment((posts) => posts.select('id', 'title').include('user'));\n\t* db.User.include('posts', (posts) => posts.with(summary));\n\t* ```\n\t*/\n\tfragment(body) {\n\t\tassertFragmentBody(body);\n\t\tconst source = {\n\t\t\tmodelName: this.modelName,\n\t\t\tnamespaceId: this.namespaceId\n\t\t};\n\t\treturn (collection) => {\n\t\t\tassertModelFragmentReceiver(source, collection);\n\t\t\treturn body(blindCast(collection));\n\t\t};\n\t}\n\tvariant(value) {\n\t\tconst polyInfo = resolvePolymorphismInfo(this.contract, this.namespaceId, this.modelName);\n\t\tconst selectedVariantName = this.state.variantName;\n\t\tif (selectedVariantName !== void 0) {\n\t\t\tconst selectedValue = polyInfo?.variants.get(selectedVariantName)?.value;\n\t\t\tthrow ormError(\"ORM.OPERATION_UNSUPPORTED\", `variant(\"${value}\") cannot be called on model \"${this.modelName}\" because variant(\"${selectedValue}\") is already selected; call variant() on the base collection instead`, { meta: {\n\t\t\t\tmethod: \"variant\",\n\t\t\t\tmodel: this.modelName,\n\t\t\t\tvariant: selectedVariantName,\n\t\t\t\tselectedValue,\n\t\t\t\treason: \"variant-already-selected\"\n\t\t\t} });\n\t\t}\n\t\tconst variantInfo = polyInfo?.variantsByValue.get(value);\n\t\tif (!polyInfo || !variantInfo) {\n\t\t\tconst declaredValues = [...polyInfo?.variantsByValue.keys() ?? []];\n\t\t\tthrow ormError(\"ORM.ARGUMENT_INVALID\", declaredValues.length === 0 ? `variant(\"${value}\") cannot narrow model \"${this.modelName}\": it declares no discriminator values` : `variant(\"${value}\") cannot narrow model \"${this.modelName}\": the declared discriminator values are ${declaredValues.map((declared) => `\"${declared}\"`).join(\", \")}`, { meta: {\n\t\t\t\tmethod: \"variant\",\n\t\t\t\targument: \"value\",\n\t\t\t\tmodel: this.modelName,\n\t\t\t\tvalue,\n\t\t\t\tdeclaredValues\n\t\t\t} });\n\t\t}\n\t\tconst columnName = polyInfo.discriminatorColumn;\n\t\tconst filter = BinaryExpr.eq(ColumnRef.of(this.tableName, columnName), LiteralExpr.of(variantInfo.value));\n\t\treturn this.#cloneWithRow({\n\t\t\tfilters: [...this.state.filters, filter],\n\t\t\tvariantName: variantInfo.modelName\n\t\t});\n\t}\n\tinclude(relationName, refineFn) {\n\t\tconst relation = resolveIncludeRelation(this.contract, this.namespaceId, this.modelName, relationName, this.state.variantName);\n\t\tlet nestedState = emptyState();\n\t\tlet scalarSelector;\n\t\tlet combineBranches;\n\t\tif (refineFn) {\n\t\t\tconst refined = refineFn(this.#createCollection(blindCast(relation.relatedModelName), {\n\t\t\t\ttableName: relation.relatedTableName,\n\t\t\t\tnamespaceId: relation.relatedNamespaceId,\n\t\t\t\tstate: emptyState(),\n\t\t\t\tincludeRefinementMode: true\n\t\t\t}));\n\t\t\tif (isIncludeScalar(refined)) {\n\t\t\t\tif (isToOneCardinality(relation.cardinality)) throw ormError(\"ORM.INCLUDE_UNSUPPORTED\", `include('${relationName}') scalar aggregations are only supported for to-many relations`, { meta: {\n\t\t\t\t\trelation: relationName,\n\t\t\t\t\tkind: \"scalar\"\n\t\t\t\t} });\n\t\t\t\tscalarSelector = refined;\n\t\t\t\tnestedState = refined.state;\n\t\t\t} else if (isIncludeCombine(refined)) {\n\t\t\t\tif (isToOneCardinality(relation.cardinality)) throw ormError(\"ORM.INCLUDE_UNSUPPORTED\", `include('${relationName}') combine() is only supported for to-many relations`, { meta: {\n\t\t\t\t\trelation: relationName,\n\t\t\t\t\tkind: \"combine\"\n\t\t\t\t} });\n\t\t\t\tcombineBranches = refined.branches;\n\t\t\t} else if (isCollectionStateCarrier(refined)) nestedState = refined.state;\n\t\t\telse throw ormError(\"ORM.INCLUDE_INVALID\", `include('${relationName}') refinement must return a collection, include scalar selector, or combine() descriptor`, { meta: { relation: relationName } });\n\t\t}\n\t\tconst includeExpr = {\n\t\t\trelationName,\n\t\t\trelatedModelName: relation.relatedModelName,\n\t\t\trelatedNamespaceId: relation.relatedNamespaceId,\n\t\t\trelatedTableName: relation.relatedTableName,\n\t\t\tlocalTableName: relation.localTableName,\n\t\t\ttargetColumns: relation.targetColumns,\n\t\t\tlocalColumns: relation.localColumns,\n\t\t\tcardinality: relation.cardinality,\n\t\t\t...ifDefined(\"through\", relation.through),\n\t\t\tnested: nestedState,\n\t\t\tscalar: scalarSelector,\n\t\t\tcombine: combineBranches\n\t\t};\n\t\treturn this.#cloneWithRow({ includes: [...this.state.includes, includeExpr] });\n\t}\n\tselect(...fields) {\n\t\tconst selectedFields = mapFieldsToColumns(this.contract, this.namespaceId, this.modelName, fields);\n\t\treturn this.#cloneWithRow({ selectedFields });\n\t}\n\torderBy(selection) {\n\t\tconst accessor = createModelAccessor(this.ctx.context, this.namespaceId, this.modelName, this.state.variantName);\n\t\tconst nextOrders = (Array.isArray(selection) ? selection : [selection]).map((selector) => selector(accessor));\n\t\tconst existing = this.state.orderBy ?? [];\n\t\treturn this.#cloneSelf({ orderBy: [...existing, ...nextOrders] });\n\t}\n\t/**\n\t* Switch to grouped-aggregate mode. Returns a `GroupedCollection`\n\t* whose `.aggregate(...)` terminal produces one row per group with\n\t* the chosen key columns plus the requested aggregates.\n\t*\n\t* ```typescript\n\t* const stats = await db.orm.Post\n\t* .where({ published: true })\n\t* .groupBy('userId')\n\t* .aggregate((agg) => ({ count: agg.count(), totalViews: agg.sum('views') }));\n\t* // [{ userId: 1, count: 3, totalViews: 120 }, ...]\n\t* ```\n\t*/\n\tgroupBy(...fields) {\n\t\tassertLockCompatible(this.state, \"groupBy\");\n\t\tconst groupByColumns = mapFieldsToColumns(this.contract, this.namespaceId, this.modelName, fields);\n\t\treturn new GroupedCollection(this.ctx, this.modelName, {\n\t\t\ttableName: this.tableName,\n\t\t\tnamespaceId: this.namespaceId,\n\t\t\tpreGroupState: this.state,\n\t\t\tgroupByFields: [...fields],\n\t\t\tgroupByColumns,\n\t\t\thavingFilters: [],\n\t\t\tpostGroup: emptyGroupPagingState()\n\t\t});\n\t}\n\t/**\n\t* Produce multiple named sub-views of a to-many relation in a\n\t* single `include(...)`. Each branch is either another refined\n\t* collection (mapped to a row array on the parent) or a scalar\n\t* reducer such as `count()`/`sum(...)`. Only valid inside an\n\t* `include(...)` refinement callback for to-many relations.\n\t*\n\t* ```typescript\n\t* const users = await db.orm.User.include('posts', (posts) =>\n\t* posts.combine({\n\t* recent: posts.where({ published: true }).limit(3),\n\t* total: posts.count(),\n\t* averageViews: posts.avg('views'),\n\t* }),\n\t* ).all();\n\t* // each user row: {\n\t* // ...user,\n\t* // posts: { recent: Post[]; total: number; averageViews: number | null };\n\t* // }\n\t* ```\n\t*/\n\tcombine(spec) {\n\t\tthis.#assertIncludeRefinementMode(\"combine()\");\n\t\tconst branches = {};\n\t\tfor (const [name, value] of Object.entries(spec)) {\n\t\t\tif (isIncludeScalar(value)) {\n\t\t\t\tbranches[name] = {\n\t\t\t\t\tkind: \"scalar\",\n\t\t\t\t\tselector: value\n\t\t\t\t};\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (isCollectionStateCarrier(value)) {\n\t\t\t\tbranches[name] = {\n\t\t\t\t\tkind: \"rows\",\n\t\t\t\t\tstate: value.state\n\t\t\t\t};\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tthrow ormError(\"ORM.INCLUDE_INVALID\", `include().combine() branch \"${name}\" is invalid`, { meta: { branch: name } });\n\t\t}\n\t\treturn createIncludeCombine(branches);\n\t}\n\tcursor(cursorValues) {\n\t\tassertCursorCompatibleOrder(this.state.orderBy);\n\t\tconst mappedCursor = mapCursorValuesToColumns(this.contract, this.namespaceId, this.modelName, cursorValues);\n\t\tif (Object.keys(mappedCursor).length === 0) return this;\n\t\treturn this.#cloneSelf({ cursor: mappedCursor });\n\t}\n\tdistinct(...fields) {\n\t\tconst distinctFields = mapFieldsToColumns(this.contract, this.namespaceId, this.modelName, fields);\n\t\treturn this.#cloneSelf({\n\t\t\tdistinct: distinctFields,\n\t\t\tdistinctOn: void 0\n\t\t});\n\t}\n\tdistinctOn(...fields) {\n\t\tassertDistinctOnCapability(this.contract, \"distinctOn\");\n\t\tassertDistinctOnCompatibleOrder(this.state.orderBy, fields.length);\n\t\tconst distinctOnFields = mapFieldsToColumns(this.contract, this.namespaceId, this.modelName, fields);\n\t\treturn this.#cloneSelf({\n\t\t\tdistinct: void 0,\n\t\t\tdistinctOn: distinctOnFields\n\t\t});\n\t}\n\t/**\n\t* Lock the selected rows of this model with `FOR UPDATE` until the transaction ends.\n\t*\n\t* Requires the `sql.forUpdate` and `sql.lockOf` capabilities, because the lock always names the model's table with `OF`.\n\t*\n\t* ```typescript\n\t* const job = await tx.orm.Job.where({ state: 'queued' }).limit(1).forUpdate({ skipLocked: true }).first();\n\t* ```\n\t*/\n\tforUpdate(...options) {\n\t\treturn this.#lock(\"forUpdate\", options[0]);\n\t}\n\t/**\n\t* Lock the selected rows of this model with `FOR NO KEY UPDATE` until the transaction ends. Unlike `forUpdate`, it does not block foreign-key checks from rows that reference them.\n\t*\n\t* Requires the `postgres.forNoKeyUpdate` and `sql.lockOf` capabilities, because the lock always names the model's table with `OF`.\n\t*/\n\tforNoKeyUpdate(...options) {\n\t\treturn this.#lock(\"forNoKeyUpdate\", options[0]);\n\t}\n\t/**\n\t* Lock the selected rows of this model with `FOR SHARE` until the transaction ends; other transactions may share-lock them but not write them.\n\t*\n\t* Requires the `sql.forShare` and `sql.lockOf` capabilities, because the lock always names the model's table with `OF`.\n\t*/\n\tforShare(...options) {\n\t\treturn this.#lock(\"forShare\", options[0]);\n\t}\n\t/**\n\t* Lock the selected rows of this model with `FOR KEY SHARE` until the transaction ends; only deletes and key changes are blocked.\n\t*\n\t* Requires the `postgres.forKeyShare` and `sql.lockOf` capabilities, because the lock always names the model's table with `OF`.\n\t*/\n\tforKeyShare(...options) {\n\t\treturn this.#lock(\"forKeyShare\", options[0]);\n\t}\n\tlimit(n) {\n\t\treturn this.#cloneSelf({ limit: typeof n === \"number\" ? n : toExpr(n) });\n\t}\n\toffset(n) {\n\t\treturn this.#cloneSelf({ offset: typeof n === \"number\" ? n : toExpr(n) });\n\t}\n\tall(configure) {\n\t\treturn this.#withAnnotationsFromMeta(configure, \"all\").#dispatch();\n\t}\n\tget prepared() {\n\t\treturn blindCast({\n\t\t\taggregate: (fn, configure) => this.#describeAggregate(fn, configure),\n\t\t\tall: (configure) => {\n\t\t\t\treturn describeCollectionRows(this.#withAnnotationsFromMeta(configure, \"all\").#descriptionOptions());\n\t\t\t},\n\t\t\tfirst: (filter, configure) => {\n\t\t\t\treturn describeCollectionFirst(this.#forFirst(filter, configure, \"first\").#descriptionOptions());\n\t\t\t},\n\t\t\tfirstOrThrow: (filter, configure) => {\n\t\t\t\treturn describeCollectionFirstOrThrow(this.#forFirst(filter, configure, \"firstOrThrow\").#descriptionOptions());\n\t\t\t}\n\t\t});\n\t}\n\t#descriptionOptions() {\n\t\treturn {\n\t\t\tcontext: this.ctx.context,\n\t\t\tstate: this.state,\n\t\t\ttableName: this.tableName,\n\t\t\tmodelName: this.modelName,\n\t\t\tnamespaceId: this.namespaceId\n\t\t};\n\t}\n\t#forFirst(filter, configure, terminalName) {\n\t\treturn (filter === void 0 ? this : typeof filter === \"function\" ? this.where(filter) : this.where(filter)).limit(1).#withAnnotationsFromMeta(configure, terminalName);\n\t}\n\tasync first(filter, configure) {\n\t\treturn consumeFirstRow(this.#forFirst(filter, configure, \"first\").#dispatch());\n\t}\n\tasync firstOrThrow(filter, configure) {\n\t\treturn this.#forFirst(filter, configure, \"firstOrThrow\").#dispatch().firstOrThrow();\n\t}\n\t/**\n\t* Read terminal: run an aggregate query (count, sum, avg, min, max)\n\t* built via the `AggregateBuilder` callback. Returns one object\n\t* with the requested aggregate values keyed by the aliases supplied\n\t* in the spec.\n\t*\n\t* ```typescript\n\t* const stats = await db.orm.Post\n\t* .where({ published: true })\n\t* .aggregate((agg) => ({\n\t* total: agg.count(),\n\t* averageViews: agg.avg('views'),\n\t* maxViews: agg.max('views'),\n\t* }));\n\t* // { total: 42, averageViews: 17.3, maxViews: 9001 }\n\t* ```\n\t*\n\t* Accepts an optional `configure` callback that receives a\n\t* `MetaBuilder<'read'>` for attaching typed annotations.\n\t* Annotations are merged into the compiled plan's `meta.annotations`.\n\t*/\n\tasync aggregate(fn, configure) {\n\t\tconst description = this.#describeAggregate(fn, configure);\n\t\treturn description.consume(queryPlanRows(this.ctx.runtime, description.plan));\n\t}\n\t#describeAggregate(fn, configure) {\n\t\tassertLockCompatible(this.state, \"aggregate\");\n\t\tconst aggregateSpec = fn(createAggregateBuilder(this.contract, this.ctx.context.aggregateDescriptors, this.namespaceId, this.modelName));\n\t\tconst entries = Object.entries(aggregateSpec);\n\t\tif (entries.length === 0) throw ormError(\"ORM.AGGREGATE_SELECTOR_MISSING\", \"aggregate() requires at least one aggregation selector\", { meta: {\n\t\t\tmethod: \"aggregate\",\n\t\t\tmodel: this.modelName\n\t\t} });\n\t\tfor (const [alias, selector] of entries) if (!isAggregateSelector(selector)) throw ormError(\"ORM.AGGREGATE_SELECTOR_INVALID\", `aggregate() selector \"${alias}\" is invalid`, { meta: {\n\t\t\tmethod: \"aggregate\",\n\t\t\tmodel: this.modelName,\n\t\t\talias\n\t\t} });\n\t\tconst annotationsMap = this.#collectAnnotationsFromMeta(configure, \"read\", \"aggregate\");\n\t\tconst compiled = mergeAnnotations(compileAggregate(this.contract, this.ctx.context.aggregateDescriptors, this.namespaceId, this.tableName, this.state, aggregateSpec, this.modelName), annotationsMap);\n\t\tconst results = entries.map(([alias, selector]) => {\n\t\t\tconst resolved = resolveAggregate({\n\t\t\t\taggregates: this.ctx.context.aggregateDescriptors,\n\t\t\t\tcontract: this.contract,\n\t\t\t\tnamespaceId: this.namespaceId,\n\t\t\t\ttableName: this.tableName,\n\t\t\t\tfn: selector.fn,\n\t\t\t\tcolumn: selector.column\n\t\t\t});\n\t\t\treturn {\n\t\t\t\talias,\n\t\t\t\tresolved,\n\t\t\t\tcodec: this.ctx.context.contractCodecs.forCodecRef(resolved.codec)\n\t\t\t};\n\t\t});\n\t\treturn {\n\t\t\tplan: compiled,\n\t\t\tasync consume(source) {\n\t\t\t\tconst row = (await source.toArray())[0] ?? {};\n\t\t\t\treturn blindCast(Object.fromEntries(results.map(({ alias, resolved, codec }) => {\n\t\t\t\t\treturn [alias, (Object.hasOwn(row, alias) ? row[alias] : void 0) ?? emptyAggregateResult(resolved, codec)];\n\t\t\t\t})));\n\t\t\t}\n\t\t};\n\t}\n\tasync create(data, configure) {\n\t\tassertLockCompatible(this.state, \"mutation\");\n\t\tassertReturningCapability(this.contract, \"create()\");\n\t\tconst annotationsMap = this.#collectAnnotationsFromMeta(configure, \"write\", \"create\");\n\t\tif (hasNestedMutationCallbacks(this.contract, this.namespaceId, this.modelName, blindCast(data))) {\n\t\t\tconst createdRow = await executeNestedCreateMutation({\n\t\t\t\tcontext: this.ctx.context,\n\t\t\t\truntime: this.ctx.runtime,\n\t\t\t\tnamespaceId: this.namespaceId,\n\t\t\t\tmodelName: this.modelName,\n\t\t\t\tdata: blindCast(data)\n\t\t\t});\n\t\t\tconst identityCriterion = buildRowIdentityFilterFromRow(this.contract, this.namespaceId, this.modelName, createdRow);\n\t\t\tconst reloaded = await this.#reloadMutationRowByIdentity(identityCriterion);\n\t\t\tif (!reloaded) throw ormError(\"ORM.MUTATION_ROW_MISSING\", `create() for model \"${this.modelName}\" did not return a row`, { meta: {\n\t\t\t\toperation: \"create\",\n\t\t\t\tmodel: this.modelName\n\t\t\t} });\n\t\t\treturn reloaded;\n\t\t}\n\t\tconst created = (await this.#createAllWithAnnotations([blindCast(data)], annotationsMap))[0];\n\t\tif (created) return created;\n\t\tthrow ormError(\"ORM.MUTATION_ROW_MISSING\", `create() for model \"${this.modelName}\" did not return a row`, { meta: {\n\t\t\toperation: \"create\",\n\t\t\tmodel: this.modelName\n\t\t} });\n\t}\n\tcreateAll(data, optionsOrConfigure, configure) {\n\t\tassertLockCompatible(this.state, \"mutation\");\n\t\tconst { options, configureCallback } = splitCreateArguments(optionsOrConfigure, configure);\n\t\tconst conflictSkip = this.#resolveConflictSkip(options, \"createAll()\");\n\t\treturn this.#createAllWithAnnotations(data, this.#collectAnnotationsFromMeta(configureCallback, \"write\", \"createAll\"), conflictSkip);\n\t}\n\t#createAllWithAnnotations(data, annotationsMap, conflictSkip) {\n\t\tif (data.length === 0) {\n\t\t\tconst generator = async function* () {};\n\t\t\treturn new AsyncIterableResult(generator());\n\t\t}\n\t\tassertReturningCapability(this.contract, \"createAll()\");\n\t\tconst rows = blindCast(data);\n\t\tconst mtiContext = this.#resolveMtiCreateContext();\n\t\tif (mtiContext) return this.#executeMtiCreate(rows, mtiContext);\n\t\tconst mappedRows = this.#mapCreateRows(rows);\n\t\tapplyCreateDefaults(this.ctx, this.namespaceId, this.tableName, mappedRows);\n\t\tconst { selectedForQuery: selectedForInsert, hiddenColumns } = this.#augmentMutationSelection();\n\t\tif (this.contract.capabilities?.[\"sql\"]?.[\"defaultInInsert\"] !== true) {\n\t\t\tconst plans = compileInsertReturningSplit(this.contract, this.namespaceId, this.tableName, mappedRows, selectedForInsert, conflictSkip).map((plan) => mergeAnnotations(plan, annotationsMap));\n\t\t\treturn dispatchSplitMutationRows({\n\t\t\t\tcontext: this.ctx.context,\n\t\t\t\truntime: this.ctx.runtime,\n\t\t\t\tplans,\n\t\t\t\ttableName: this.tableName,\n\t\t\t\tmodelName: this.modelName,\n\t\t\t\tnamespaceId: this.namespaceId,\n\t\t\t\tvariantName: this.state.variantName,\n\t\t\t\tincludes: this.state.includes,\n\t\t\t\tselectedFields: this.state.selectedFields,\n\t\t\t\thiddenColumns,\n\t\t\t\tmapRow: (mapped) => blindCast(mapped)\n\t\t\t});\n\t\t}\n\t\tconst compiled = mergeAnnotations(compileInsertReturning(this.contract, this.namespaceId, this.tableName, mappedRows, selectedForInsert, conflictSkip), annotationsMap);\n\t\treturn dispatchMutationRows({\n\t\t\tcontext: this.ctx.context,\n\t\t\truntime: this.ctx.runtime,\n\t\t\tcompiled,\n\t\t\ttableName: this.tableName,\n\t\t\tmodelName: this.modelName,\n\t\t\tnamespaceId: this.namespaceId,\n\t\t\tvariantName: this.state.variantName,\n\t\t\tincludes: this.state.includes,\n\t\t\tselectedFields: this.state.selectedFields,\n\t\t\thiddenColumns,\n\t\t\tmapRow: (mapped) => blindCast(mapped)\n\t\t});\n\t}\n\t#resolveConflictSkip(options, method) {\n\t\tif (options === void 0) return void 0;\n\t\tif (options.onConflict !== \"skip\") throw ormError(\"ORM.ARGUMENT_INVALID\", `${method} onConflict must be \"skip\"; received ${JSON.stringify(options.onConflict)}`, { meta: {\n\t\t\tmethod,\n\t\t\tmodel: this.modelName\n\t\t} });\n\t\tif (method === \"createAll()\") this.#assertConflictSkipNotOnMtiVariant(method);\n\t\telse this.#assertNotMtiVariant(method);\n\t\tconst conflictOn = options.conflictOn ?? [];\n\t\tassertInsertConflictSkipCapability(this.contract, method, conflictOn.length > 0);\n\t\treturn { columns: resolveInsertConflictColumns(this.contract, this.namespaceId, this.modelName, conflictOn, method) };\n\t}\n\t#assertNotMtiVariant(method) {\n\t\tthis.#refuseOnMtiVariant(method, `${method} is not supported for MTI variant \"${this.state.variantName}\" on model \"${this.modelName}\". Use createAll() instead.`);\n\t}\n\t#assertConflictSkipNotOnMtiVariant(method) {\n\t\tthis.#refuseOnMtiVariant(method, `The onConflict option is not supported on variant \"${this.state.variantName}\" of model \"${this.modelName}\" because the variant is stored in its own table. Call createAll(rows) without the option; a duplicate row then makes the call fail.`);\n\t}\n\t#refuseOnMtiVariant(method, message) {\n\t\tif (!this.#resolveMtiCreateContext()) return;\n\t\tthrow ormError(\"ORM.OPERATION_UNSUPPORTED\", message, { meta: {\n\t\t\tmethod,\n\t\t\tmodel: this.modelName,\n\t\t\tvariant: this.state.variantName,\n\t\t\treason: \"mti-variant\"\n\t\t} });\n\t}\n\t#resolveMtiCreateContext() {\n\t\tconst variantName = this.state.variantName;\n\t\tif (!variantName) return null;\n\t\tconst polyInfo = resolvePolymorphismInfo(this.contract, this.namespaceId, this.modelName);\n\t\tif (!polyInfo) return null;\n\t\tconst variant = polyInfo.variants.get(variantName);\n\t\tif (!isMtiVariantInfo(variant)) return null;\n\t\treturn {\n\t\t\tpolyInfo,\n\t\t\tvariant,\n\t\t\tbaseFieldToColumn: getFieldToColumnMap(this.contract, this.namespaceId, this.modelName),\n\t\t\tvariantFieldToColumn: getFieldToColumnMap(this.contract, this.namespaceId, variant.modelName),\n\t\t\tpkColumns: resolvePrimaryKeyColumns(this.contract, this.namespaceId, this.tableName)\n\t\t};\n\t}\n\t#executeMtiCreate(data, mtiCtx) {\n\t\tconst { polyInfo, variant, baseFieldToColumn, variantFieldToColumn, pkColumns } = mtiCtx;\n\t\tconst contract = this.contract;\n\t\tconst collectionCtx = this.ctx;\n\t\tconst runtime = collectionCtx.runtime;\n\t\tconst tableName = this.tableName;\n\t\tconst modelName = this.modelName;\n\t\tconst namespaceId = this.namespaceId;\n\t\tconst baseFieldColumns = new Set(Object.values(baseFieldToColumn));\n\t\tconst variantFieldColumns = new Set(Object.values(variantFieldToColumn));\n\t\tconst mergedFieldToColumn = {\n\t\t\t...baseFieldToColumn,\n\t\t\t...variantFieldToColumn\n\t\t};\n\t\tconst generator = async function* () {\n\t\t\tconst defaultValueCache = /* @__PURE__ */ new Map();\n\t\t\tfor (const row of data) {\n\t\t\t\tconst allMapped = {};\n\t\t\t\tfor (const [fieldName, value] of Object.entries(row)) {\n\t\t\t\t\tif (value === void 0) continue;\n\t\t\t\t\tconst columnName = mergedFieldToColumn[fieldName] ?? fieldName;\n\t\t\t\t\tallMapped[columnName] = value;\n\t\t\t\t}\n\t\t\t\tallMapped[polyInfo.discriminatorColumn] = variant.value;\n\t\t\t\tconst baseRow = {};\n\t\t\t\tconst variantRow = {};\n\t\t\t\tfor (const [col, val] of Object.entries(allMapped)) {\n\t\t\t\t\tif (baseFieldColumns.has(col) || col === polyInfo.discriminatorColumn) baseRow[col] = val;\n\t\t\t\t\tif (variantFieldColumns.has(col)) variantRow[col] = val;\n\t\t\t\t}\n\t\t\t\tyield blindCast(await withMutationScope(runtime, async (scope) => {\n\t\t\t\t\tapplyCreateDefaults(collectionCtx, namespaceId, tableName, [baseRow], defaultValueCache);\n\t\t\t\t\tconst baseCreated = (await queryPlanRows(scope, compileInsertReturning(contract, namespaceId, tableName, [baseRow], void 0)).toArray())[0];\n\t\t\t\t\tif (!baseCreated) throw ormError(\"ORM.MUTATION_ROW_MISSING\", `MTI base INSERT for model \"${modelName}\" did not return a row`, { meta: {\n\t\t\t\t\t\toperation: \"create\",\n\t\t\t\t\t\tmodel: modelName,\n\t\t\t\t\t\ttable: tableName,\n\t\t\t\t\t\tphase: \"mti-base\"\n\t\t\t\t\t} });\n\t\t\t\t\tfor (const pkColumn of pkColumns) variantRow[pkColumn] = baseCreated[pkColumn];\n\t\t\t\t\tapplyCreateDefaults(collectionCtx, namespaceId, variant.table, [variantRow], defaultValueCache);\n\t\t\t\t\tconst variantCreated = (await queryPlanRows(scope, compileInsertReturning(contract, namespaceId, variant.table, [variantRow], void 0)).toArray())[0];\n\t\t\t\t\tif (!variantCreated) throw ormError(\"ORM.MUTATION_ROW_MISSING\", `MTI variant INSERT for model \"${modelName}\" into \"${variant.table}\" did not return a row`, { meta: {\n\t\t\t\t\t\toperation: \"create\",\n\t\t\t\t\t\tmodel: modelName,\n\t\t\t\t\t\ttable: variant.table,\n\t\t\t\t\t\tphase: \"mti-variant\"\n\t\t\t\t\t} });\n\t\t\t\t\tconst prefixedVariant = {};\n\t\t\t\t\tfor (const [col, val] of Object.entries(variantCreated)) {\n\t\t\t\t\t\tif (pkColumns.includes(col)) continue;\n\t\t\t\t\t\tprefixedVariant[`${variant.table}__${col}`] = val;\n\t\t\t\t\t}\n\t\t\t\t\treturn mapPolymorphicRow(contract, namespaceId, modelName, polyInfo, {\n\t\t\t\t\t\t...baseCreated,\n\t\t\t\t\t\t...prefixedVariant\n\t\t\t\t\t}, variant.modelName);\n\t\t\t\t}));\n\t\t\t}\n\t\t};\n\t\treturn new AsyncIterableResult(generator());\n\t}\n\t#mapCreateRows(data) {\n\t\tconst variantName = this.state.variantName;\n\t\tif (!variantName) return data.map((row) => mapModelDataToStorageRow(this.contract, this.namespaceId, this.modelName, row));\n\t\tconst polyInfo = resolvePolymorphismInfo(this.contract, this.namespaceId, this.modelName);\n\t\tif (!polyInfo) return data.map((row) => mapModelDataToStorageRow(this.contract, this.namespaceId, this.modelName, row));\n\t\tconst variant = polyInfo.variants.get(variantName);\n\t\tif (!variant) return data.map((row) => mapModelDataToStorageRow(this.contract, this.namespaceId, this.modelName, row));\n\t\tconst baseFieldToColumn = getFieldToColumnMap(this.contract, this.namespaceId, this.modelName);\n\t\tconst variantFieldToColumn = getFieldToColumnMap(this.contract, this.namespaceId, variant.modelName);\n\t\tconst mergedFieldToColumn = {\n\t\t\t...baseFieldToColumn,\n\t\t\t...variantFieldToColumn\n\t\t};\n\t\treturn data.map((row) => {\n\t\t\tconst mapped = {};\n\t\t\tfor (const [fieldName, value] of Object.entries(row)) {\n\t\t\t\tif (value === void 0) continue;\n\t\t\t\tconst columnName = mergedFieldToColumn[fieldName] ?? fieldName;\n\t\t\t\tmapped[columnName] = value;\n\t\t\t}\n\t\t\tmapped[polyInfo.discriminatorColumn] = variant.value;\n\t\t\treturn mapped;\n\t\t});\n\t}\n\t/**\n\t* Write terminal: insert many rows without materializing the\n\t* inserted rows, returning the number of rows the database reports\n\t* inserting.\n\t*\n\t* Prefer `createAll(...)` when you need the returned rows; prefer\n\t* this when you only need to know how many rows were inserted (the\n\t* compiled plan skips `RETURNING`).\n\t*\n\t* ```typescript\n\t* const inserted = await db.orm.User.createAndCount([\n\t* { email: 'a@example.com' },\n\t* { email: 'b@example.com' },\n\t* ]);\n\t* // inserted === 2\n\t*\n\t* // Let the database skip rows that collide with a unique\n\t* // constraint; the count is how many it actually inserted:\n\t* const added = await db.orm.User.createAndCount(seedUsers, {\n\t* onConflict: 'skip',\n\t* });\n\t* ```\n\t*\n\t* Not supported on MTI variants — use `createAll(...)` instead.\n\t*/\n\tasync createAndCount(data, optionsOrConfigure, configure) {\n\t\tassertLockCompatible(this.state, \"mutation\");\n\t\tconst { options, configureCallback } = splitCreateArguments(optionsOrConfigure, configure);\n\t\tconst conflictSkip = this.#resolveConflictSkip(options, \"createAndCount()\");\n\t\tif (data.length === 0) return 0;\n\t\tthis.#assertNotMtiVariant(\"createAndCount()\");\n\t\tconst annotationsMap = this.#collectAnnotationsFromMeta(configureCallback, \"write\", \"createAndCount\");\n\t\tconst rows = blindCast(data);\n\t\tconst mappedRows = this.#mapCreateRows(rows);\n\t\tapplyCreateDefaults(this.ctx, this.namespaceId, this.tableName, mappedRows);\n\t\tif (this.contract.capabilities?.[\"sql\"]?.[\"defaultInInsert\"] !== true) {\n\t\t\tconst plans = compileInsertCountSplit(this.contract, this.namespaceId, this.tableName, mappedRows, conflictSkip).map((plan) => mergeAnnotations(plan, annotationsMap));\n\t\t\tlet affectedRows = 0;\n\t\t\tfor (const plan of plans) {\n\t\t\t\tconst stats = await this.ctx.runtime.execute(plan);\n\t\t\t\taffectedRows += stats.affectedRows;\n\t\t\t}\n\t\t\treturn affectedRows;\n\t\t}\n\t\tconst compiled = mergeAnnotations(compileInsertCount(this.contract, this.namespaceId, this.tableName, mappedRows, conflictSkip), annotationsMap);\n\t\treturn (await this.ctx.runtime.execute(compiled)).affectedRows;\n\t}\n\tasync upsert(input, configure) {\n\t\tassertLockCompatible(this.state, \"mutation\");\n\t\tassertReturningCapability(this.contract, \"upsert()\");\n\t\tthis.#assertNotMtiVariant(\"upsert()\");\n\t\tconst annotationsMap = this.#collectAnnotationsFromMeta(configure, \"write\", \"upsert\");\n\t\tconst createValues = this.#mapCreateRows([blindCast(input.create)])[0] ?? {};\n\t\tapplyCreateDefaults(this.ctx, this.namespaceId, this.tableName, [createValues]);\n\t\tconst updateValues = mapModelDataToStorageRow(this.contract, this.namespaceId, this.modelName, input.update);\n\t\tconst hasUpdateValues = Object.keys(updateValues).length > 0;\n\t\tif (hasUpdateValues) applyUpdateDefaults(this.ctx, this.namespaceId, this.tableName, updateValues);\n\t\tconst conflictColumns = resolveUpsertConflictColumns(this.contract, this.namespaceId, this.modelName, blindCast(input.conflictOn));\n\t\tif (conflictColumns.length === 0) throw ormError(\"ORM.ARGUMENT_INVALID\", `upsert() for model \"${this.modelName}\" requires conflict columns`, { meta: {\n\t\t\tmethod: \"upsert\",\n\t\t\tmodel: this.modelName\n\t\t} });\n\t\tconst { selectedForQuery: selectedForUpsert, hiddenColumns } = this.#augmentMutationSelection();\n\t\tconst compiled = mergeAnnotations(compileUpsertReturning(this.contract, this.namespaceId, this.tableName, createValues, updateValues, conflictColumns, selectedForUpsert), annotationsMap);\n\t\tconst row = await executeMutationReturningSingleRow({\n\t\t\tcontext: this.ctx.context,\n\t\t\truntime: this.ctx.runtime,\n\t\t\tcompiled,\n\t\t\ttableName: this.tableName,\n\t\t\tmodelName: this.modelName,\n\t\t\tnamespaceId: this.namespaceId,\n\t\t\tvariantName: this.state.variantName,\n\t\t\tincludes: this.state.includes,\n\t\t\tselectedFields: this.state.selectedFields,\n\t\t\thiddenColumns,\n\t\t\tmapRow: (mapped) => blindCast(mapped),\n\t\t\toperation: \"upsert\",\n\t\t\tonMissingRowMessage: `upsert() for model \"${this.modelName}\" did not return a row`\n\t\t});\n\t\tif (row) return row;\n\t\tif (!hasUpdateValues) {\n\t\t\tconst conflictCriterion = this.#buildUpsertConflictCriterion(createValues, conflictColumns);\n\t\t\tconst existing = await this.#reloadMutationRowByCriterion(conflictCriterion, \"upsert conflict\");\n\t\t\tif (existing) return existing;\n\t\t}\n\t\tthrow ormError(\"ORM.MUTATION_ROW_MISSING\", `upsert() for model \"${this.modelName}\" did not return a row`, { meta: {\n\t\t\toperation: \"upsert\",\n\t\t\tmodel: this.modelName\n\t\t} });\n\t}\n\tasync update(data, configure) {\n\t\tassertLockCompatible(this.state, \"mutation\");\n\t\tassertReturningCapability(this.contract, \"update()\");\n\t\tconst annotationsMap = this.#collectAnnotationsFromMeta(configure, \"write\", \"update\");\n\t\tif (hasNestedMutationCallbacks(this.contract, this.namespaceId, this.modelName, blindCast(data))) {\n\t\t\tassertRelationUpdateIgnoresNothing(this.state, this.modelName);\n\t\t\tconst updatedRow = await executeNestedUpdateMutation({\n\t\t\t\tcontext: this.ctx.context,\n\t\t\t\truntime: this.ctx.runtime,\n\t\t\t\tnamespaceId: this.namespaceId,\n\t\t\t\tmodelName: this.modelName,\n\t\t\t\tfilters: this.state.filters,\n\t\t\t\tdata: blindCast(data)\n\t\t\t});\n\t\t\tif (!updatedRow) return null;\n\t\t\tconst identityCriterion = buildRowIdentityFilterFromRow(this.contract, this.namespaceId, this.modelName, updatedRow);\n\t\t\treturn this.#reloadMutationRowByIdentity(identityCriterion);\n\t\t}\n\t\treturn withMutationScope(this.ctx.runtime, async (scope) => {\n\t\t\tconst scoped = this.#withRuntime(scope);\n\t\t\tconst identityWhere = await scoped.#findFirstMatchingRowIdentityWhere();\n\t\t\tif (!identityWhere) return null;\n\t\t\treturn (await scoped.#clone({ filters: [identityWhere] }).#updateAllWithAnnotations(blindCast(data), annotationsMap))[0] ?? null;\n\t\t});\n\t}\n\tupdateAll(data, configure) {\n\t\tassertBulkWriteIgnoresNothing(this.state, this.modelName, \"updateAll\");\n\t\tassertLockCompatible(this.state, \"mutation\");\n\t\treturn this.#updateAllWithAnnotations(data, this.#collectAnnotationsFromMeta(configure, \"write\", \"updateAll\"));\n\t}\n\t#updateAllWithAnnotations(data, annotationsMap) {\n\t\tassertReturningCapability(this.contract, \"updateAll()\");\n\t\tconst mappedData = mapModelDataToStorageRow(this.contract, this.namespaceId, this.modelName, data);\n\t\tif (Object.keys(mappedData).length === 0) {\n\t\t\tconst generator = async function* () {};\n\t\t\treturn new AsyncIterableResult(generator());\n\t\t}\n\t\tapplyUpdateDefaults(this.ctx, this.namespaceId, this.tableName, mappedData);\n\t\tconst { selectedForQuery: selectedForUpdate, hiddenColumns } = this.#augmentMutationSelection();\n\t\tconst compiled = mergeAnnotations(compileUpdateReturning(this.contract, this.namespaceId, this.tableName, mappedData, this.state.filters, selectedForUpdate), annotationsMap);\n\t\treturn dispatchMutationRows({\n\t\t\tcontext: this.ctx.context,\n\t\t\truntime: this.ctx.runtime,\n\t\t\tcompiled,\n\t\t\ttableName: this.tableName,\n\t\t\tmodelName: this.modelName,\n\t\t\tnamespaceId: this.namespaceId,\n\t\t\tvariantName: this.state.variantName,\n\t\t\tincludes: this.state.includes,\n\t\t\tselectedFields: this.state.selectedFields,\n\t\t\thiddenColumns,\n\t\t\tmapRow: (mapped) => blindCast(mapped)\n\t\t});\n\t}\n\tasync updateAndCount(data, configure) {\n\t\tassertBulkWriteIgnoresNothing(this.state, this.modelName, \"updateAndCount\");\n\t\tassertLockCompatible(this.state, \"mutation\");\n\t\tconst mappedData = mapModelDataToStorageRow(this.contract, this.namespaceId, this.modelName, data);\n\t\tif (Object.keys(mappedData).length === 0) return 0;\n\t\tapplyUpdateDefaults(this.ctx, this.namespaceId, this.tableName, mappedData);\n\t\tconst annotationsMap = this.#collectAnnotationsFromMeta(configure, \"write\", \"updateAndCount\");\n\t\tconst compiled = mergeAnnotations(compileUpdateCount(this.contract, this.namespaceId, this.tableName, mappedData, this.state.filters, this.state.variantName, this.modelName), annotationsMap);\n\t\treturn (await this.ctx.runtime.execute(compiled)).affectedRows;\n\t}\n\tasync delete(configure) {\n\t\tassertLockCompatible(this.state, \"mutation\");\n\t\tassertReturningCapability(this.contract, \"delete()\");\n\t\tconst annotationsMap = this.#collectAnnotationsFromMeta(configure, \"write\", \"delete\");\n\t\treturn withMutationScope(this.ctx.runtime, async (scope) => {\n\t\t\tconst scoped = this.#withRuntime(scope);\n\t\t\tconst identityWhere = await scoped.#findFirstMatchingRowIdentityWhere();\n\t\t\tif (!identityWhere) return null;\n\t\t\treturn (await scoped.#clone({\n\t\t\t\tfilters: [identityWhere],\n\t\t\t\tlimit: void 0,\n\t\t\t\toffset: void 0\n\t\t\t}).#executeDeleteReturning(annotationsMap).toArray())[0] ?? null;\n\t\t});\n\t}\n\tdeleteAll(configure) {\n\t\tassertBulkWriteIgnoresNothing(this.state, this.modelName, \"deleteAll\");\n\t\tassertLockCompatible(this.state, \"mutation\");\n\t\treturn this.#deleteAllWithAnnotations(this.#collectAnnotationsFromMeta(configure, \"write\", \"deleteAll\"));\n\t}\n\t#deleteAllWithAnnotations(annotationsMap) {\n\t\tassertReturningCapability(this.contract, \"deleteAll()\");\n\t\treturn this.#executeDeleteReturning(annotationsMap);\n\t}\n\t#executeDeleteReturning(annotationsMap) {\n\t\tif (this.state.includes.length > 0) return this.#executeDeleteReturningWithIncludes(annotationsMap);\n\t\tconst { selectedForQuery: selectedForDelete, hiddenColumns } = this.#augmentMutationSelection();\n\t\tconst compiled = mergeAnnotations(compileDeleteReturning(this.contract, this.namespaceId, this.tableName, this.state.filters, selectedForDelete), annotationsMap);\n\t\treturn dispatchMutationRows({\n\t\t\tcontext: this.ctx.context,\n\t\t\truntime: this.ctx.runtime,\n\t\t\tcompiled,\n\t\t\ttableName: this.tableName,\n\t\t\tmodelName: this.modelName,\n\t\t\tnamespaceId: this.namespaceId,\n\t\t\tvariantName: this.state.variantName,\n\t\t\tincludes: this.state.includes,\n\t\t\tselectedFields: this.state.selectedFields,\n\t\t\thiddenColumns,\n\t\t\tmapRow: (mapped) => blindCast(mapped)\n\t\t});\n\t}\n\t/**\n\t* Delete read-back with includes.\n\t*\n\t* A parent-anchored single-query include read can't observe a row\n\t* that has already been deleted, so this reads the rows together with\n\t* their relations BEFORE issuing the DELETE. The snapshot is fully\n\t* drained into a plain array with `.toArray()` while the rows still\n\t* exist; only then does the DELETE run. The yielded `for..of` walks\n\t* that in-memory array, not a live cursor, so nothing reads from the\n\t* deleted rows after the fact. Snapshot read and delete share one\n\t* `withMutationScope` so they are atomic; the returned relations\n\t* reflect the row's state at delete time.\n\t*/\n\t#executeDeleteReturningWithIncludes(annotationsMap) {\n\t\tconst collection = this;\n\t\tconst generator = async function* () {\n\t\t\tconst snapshot = await withMutationScope(collection.ctx.runtime, async (scope) => {\n\t\t\t\tconst rows = await dispatchCollectionRows({\n\t\t\t\t\tcontext: collection.ctx.context,\n\t\t\t\t\truntime: scope,\n\t\t\t\t\tstate: collection.state,\n\t\t\t\t\ttableName: collection.tableName,\n\t\t\t\t\tmodelName: collection.modelName,\n\t\t\t\t\tnamespaceId: collection.namespaceId\n\t\t\t\t}).toArray();\n\t\t\t\tconst deletePlan = mergeAnnotations(compileDeleteCount(collection.contract, collection.namespaceId, collection.tableName, collection.state.filters, collection.state.variantName, collection.modelName), annotationsMap);\n\t\t\t\tawait scope.execute(deletePlan);\n\t\t\t\treturn rows;\n\t\t\t});\n\t\t\tfor (const row of snapshot) yield row;\n\t\t};\n\t\treturn new AsyncIterableResult(generator());\n\t}\n\tasync deleteAndCount(configure) {\n\t\tassertBulkWriteIgnoresNothing(this.state, this.modelName, \"deleteAndCount\");\n\t\tassertLockCompatible(this.state, \"mutation\");\n\t\tconst annotationsMap = this.#collectAnnotationsFromMeta(configure, \"write\", \"deleteAndCount\");\n\t\tconst compiled = mergeAnnotations(compileDeleteCount(this.contract, this.namespaceId, this.tableName, this.state.filters, this.state.variantName, this.modelName), annotationsMap);\n\t\treturn (await this.ctx.runtime.execute(compiled)).affectedRows;\n\t}\n\t#buildUpsertConflictCriterion(createValues, conflictColumns) {\n\t\tconst columnToField = getColumnToFieldMap(this.contract, this.namespaceId, this.modelName);\n\t\tconst criterion = {};\n\t\tfor (const columnName of conflictColumns) {\n\t\t\tif (!(columnName in createValues)) throw ormError(\"ORM.ARGUMENT_INVALID\", `upsert() for model \"${this.modelName}\" requires create value for conflict column \"${columnName}\"`, { meta: {\n\t\t\t\tmethod: \"upsert\",\n\t\t\t\tmodel: this.modelName,\n\t\t\t\tcolumn: columnName\n\t\t\t} });\n\t\t\tconst fieldName = columnToField[columnName] ?? columnName;\n\t\t\tcriterion[fieldName] = createValues[columnName];\n\t\t}\n\t\treturn criterion;\n\t}\n\t/**\n\t* Shape the projection for a mutation's `RETURNING` clause.\n\t*\n\t* Without includes, the mutation returns the caller's projection\n\t* directly. With includes, it returns only the row identity columns\n\t* (PK / unique): those rows are reloaded through the read path\n\t* (`reloadMutationRowsByIdentities`), which re-selects the caller's\n\t* projection together with the relations, so the `RETURNING` clause\n\t* need only carry enough to key that read-back.\n\t*/\n\t#augmentMutationSelection() {\n\t\tif (this.state.includes.length > 0) {\n\t\t\tconst identityColumns = resolveRowIdentityColumns(this.contract, this.namespaceId, this.tableName);\n\t\t\tif (identityColumns.length === 0) throw ormError(\"ORM.ROW_IDENTITY_MISSING\", `Cannot load includes for the mutation result on model \"${this.modelName}\": table \"${this.tableName}\" has no primary key or unique constraint to key the include read-back on.`, { meta: {\n\t\t\t\tmodel: this.modelName,\n\t\t\t\ttable: this.tableName\n\t\t\t} });\n\t\t\treturn {\n\t\t\t\tselectedForQuery: identityColumns,\n\t\t\t\thiddenColumns: []\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\tselectedForQuery: this.state.selectedFields,\n\t\t\thiddenColumns: []\n\t\t};\n\t}\n\tasync #findFirstMatchingRowIdentityWhere() {\n\t\tconst identityColumns = resolveRowIdentityColumns(this.contract, this.namespaceId, this.tableName);\n\t\tif (identityColumns.length === 0) throw ormError(\"ORM.ROW_IDENTITY_MISSING\", `update()/delete() on model \"${this.modelName}\" requires the table to have a primary key or unique constraint`, { meta: {\n\t\t\tmodel: this.modelName,\n\t\t\ttable: this.tableName\n\t\t} });\n\t\tcheckLimitOffset(\"limit\", this.state.limit);\n\t\tif (this.state.limit === 0) return null;\n\t\tconst firstRow = await this.#clone({\n\t\t\tselectedFields: [...identityColumns],\n\t\t\tincludes: []\n\t\t}).first();\n\t\tif (!firstRow) return null;\n\t\tconst columnToField = getColumnToFieldMap(this.contract, this.namespaceId, this.modelName);\n\t\tconst criterion = {};\n\t\tfor (const column of identityColumns) {\n\t\t\tconst fieldName = columnToField[column] ?? column;\n\t\t\tconst value = blindCast(firstRow)[fieldName];\n\t\t\tif (value === void 0) throw new InternalError(`Missing identity field \"${fieldName}\" while resolving single-row scope for model \"${this.modelName}\"`);\n\t\t\tcriterion[fieldName] = value;\n\t\t}\n\t\treturn shorthandToWhereExpr(this.ctx.context, this.namespaceId, this.modelName, blindCast(criterion)) ?? null;\n\t}\n\tasync #reloadMutationRowByIdentity(criterion) {\n\t\treturn this.#reloadMutationRowByCriterion(criterion, \"row identity\");\n\t}\n\tasync #reloadMutationRowByCriterion(criterion, criterionLabel) {\n\t\tconst whereExpr = shorthandToWhereExpr(this.ctx.context, this.namespaceId, this.modelName, blindCast(criterion));\n\t\tif (!whereExpr) throw new InternalError(`Failed to build ${criterionLabel} filter for mutation result on model \"${this.modelName}\"`);\n\t\tconst resultState = {\n\t\t\t...emptyState(),\n\t\t\tfilters: [whereExpr],\n\t\t\tincludes: this.state.includes,\n\t\t\tselectedFields: this.state.selectedFields,\n\t\t\tlimit: 1\n\t\t};\n\t\treturn (await dispatchCollectionRows({\n\t\t\tcontext: this.ctx.context,\n\t\t\truntime: this.ctx.runtime,\n\t\t\tstate: resultState,\n\t\t\ttableName: this.tableName,\n\t\t\tmodelName: this.modelName,\n\t\t\tnamespaceId: this.namespaceId\n\t\t}))[0] ?? null;\n\t}\n\t#assertIncludeRefinementMode(action) {\n\t\tif (this.includeRefinementMode) return;\n\t\tthrow ormError(\"ORM.INCLUDE_INVALID\", `${action} is only available inside include() refinement callbacks`, { meta: { action } });\n\t}\n\t#lock(strength, options) {\n\t\tif (this.includeRefinementMode) throw lockIncompatible(\"includeRefinement\", `${strength}() cannot be called inside an include() refinement callback`);\n\t\tassertLockCapability(this.contract, lockStrengthCapabilities[strength], strength);\n\t\tassertLockCapability(this.contract, lockOptionCapabilities.of, strength);\n\t\tconst waitPolicy = lockWaitPolicyOf(strength, options);\n\t\tif (waitPolicy !== void 0) assertLockCapability(this.contract, lockOptionCapabilities[waitPolicy], strength);\n\t\tconst clause = LockingClause.of(strength, {\n\t\t\tof: [this.tableName],\n\t\t\t...ifDefined(\"waitPolicy\", waitPolicy)\n\t\t});\n\t\treturn this.#clone({ locking: [...this.state.locking ?? [], clause] });\n\t}\n\t#clone(overrides) {\n\t\treturn this.#createSelf({\n\t\t\t...this.state,\n\t\t\t...overrides\n\t\t});\n\t}\n\t#cloneSelf(overrides) {\n\t\treturn blindCast(this.#createSelf({\n\t\t\t...this.state,\n\t\t\t...overrides\n\t\t}));\n\t}\n\t#withRuntime(runtime) {\n\t\treturn blindCast(new (blindCast(this.constructor))({\n\t\t\t...this.ctx,\n\t\t\truntime\n\t\t}, this.modelName, {\n\t\t\ttableName: this.tableName,\n\t\t\tnamespaceId: this.namespaceId,\n\t\t\tstate: this.state,\n\t\t\tregistry: this.registry,\n\t\t\tincludeRefinementMode: this.includeRefinementMode\n\t\t}));\n\t}\n\t#cloneWithRow(overrides) {\n\t\treturn this.#createSelf({\n\t\t\t...this.state,\n\t\t\t...overrides\n\t\t});\n\t}\n\t#createSelf(state) {\n\t\treturn blindCast(new (blindCast(this.constructor))(this.ctx, this.modelName, {\n\t\t\ttableName: this.tableName,\n\t\t\tnamespaceId: this.namespaceId,\n\t\t\tstate,\n\t\t\tregistry: this.registry,\n\t\t\tincludeRefinementMode: this.includeRefinementMode\n\t\t}));\n\t}\n\t#createCollection(modelName, options) {\n\t\treturn blindCast(new ((this.registry.get(modelName)) ?? (blindCast(CollectionBase)))(this.ctx, modelName, {\n\t\t\ttableName: options.tableName,\n\t\t\tnamespaceId: options.namespaceId,\n\t\t\tstate: options.state,\n\t\t\tregistry: options.registry ?? this.registry,\n\t\t\tincludeRefinementMode: options.includeRefinementMode ?? this.includeRefinementMode\n\t\t}));\n\t}\n\t#dispatch() {\n\t\treturn dispatchCollectionRows({\n\t\t\tcontext: this.ctx.context,\n\t\t\truntime: this.ctx.runtime,\n\t\t\tstate: this.state,\n\t\t\ttableName: this.tableName,\n\t\t\tmodelName: this.modelName,\n\t\t\tnamespaceId: this.namespaceId\n\t\t});\n\t}\n\t/**\n\t* Invokes the user-supplied configurator (if any) against a freshly\n\t* constructed read meta builder, and returns a clone whose\n\t* `state.annotations` carries the recorded map. Used by read\n\t* terminals that flow annotations through state (`all`, `first`).\n\t*\n\t* Returns the receiver unchanged when no configurator was supplied\n\t* or when the configurator did not call `meta.annotate(...)`. The\n\t* meta builder's `annotate` method enforces applicability at the\n\t* type level and at runtime, so terminal code does not need to\n\t* re-validate.\n\t*/\n\t#withAnnotationsFromMeta(configure, terminalName) {\n\t\tif (configure === void 0) return this;\n\t\tconst meta = createMetaBuilder(\"read\", terminalName);\n\t\tconfigure(meta);\n\t\tif (meta.annotations.size === 0) return this;\n\t\tconst next = new Map(this.state.annotations);\n\t\tfor (const [namespace, value] of meta.annotations) next.set(namespace, value);\n\t\treturn blindCast(this.#clone({ annotations: next }));\n\t}\n\t/**\n\t* Invokes the user-supplied configurator (if any) against a freshly\n\t* constructed meta builder of the given operation kind, and returns\n\t* the recorded annotation map (or `undefined` when empty). Used by\n\t* terminals where annotations don't flow through `state` — the\n\t* compiled plan is post-wrapped via `mergeAnnotations` instead.\n\t* Read terminals `all` and `first` populate `state.annotations`\n\t* via `#withAnnotationsFromMeta` instead; `aggregate` uses this\n\t* post-wrap path because `compileAggregate` does not forward `state.annotations` into the plan.\n\t* The meta builder's `annotate` method enforces applicability at the\n\t* type level and at runtime.\n\t*/\n\t#collectAnnotationsFromMeta(configure, kind, terminalName) {\n\t\tif (configure === void 0) return;\n\t\tconst meta = createMetaBuilder(kind, terminalName);\n\t\tconfigure(meta);\n\t\treturn meta.annotations.size === 0 ? void 0 : meta.annotations;\n\t}\n};\nconst collectionInstanceMemberNames = [\n\t\"ctx\",\n\t\"contract\",\n\t\"modelName\",\n\t\"tableName\",\n\t\"namespaceId\",\n\t\"state\",\n\t\"registry\",\n\t\"includeRefinementMode\"\n];\n/**\n* Every member name the collection surface owns: the prototype's methods plus\n* the declared instance fields. A contributed aggregate operation may not\n* take one of these names — reducers install into the same flat namespace —\n* so ORM composition rejects any operation this set contains.\n*/\nfunction reservedCollectionMemberNames() {\n\treturn /* @__PURE__ */ new Set([...Object.getOwnPropertyNames(CollectionBase.prototype), ...collectionInstanceMemberNames]);\n}\nconst Collection = blindCast(CollectionBase);\n//#endregion\n//#region src/orm.ts\n/**\n* Reject a contributed aggregate operation whose name a collection member\n* already owns. Aggregate operations surface as reducer methods on the\n* collection, in one flat namespace with the builder members, so a same-named\n* operation would shadow the member it collides with — a client-surface\n* concern, enforced here where that surface is assembled.\n*/\nfunction assertAggregateOperationsNotReserved(registry) {\n\tconst reserved = reservedCollectionMemberNames();\n\tfor (const operation of aggregateOperationNames(registry)) {\n\t\tif (!reserved.has(operation)) continue;\n\t\tthrow ormError(\"ORM.AGGREGATE_OPERATION_RESERVED\", `Aggregate operation '${operation}' is reserved: the name is a collection builder member.`, {\n\t\t\twhy: \"Aggregate operations surface as reducer methods on the collection, in one namespace with the query-builder members; a same-named operation would shadow the member it collides with.\",\n\t\t\tfix: \"Rename the contributed aggregate operation.\",\n\t\t\tmeta: { operation }\n\t\t});\n\t}\n}\nfunction orm(options) {\n\tconst { runtime, collections, context } = options;\n\tassertAggregateOperationsNotReserved(context.aggregateDescriptors);\n\tconst contract = context.contract;\n\tconst ctx = {\n\t\truntime,\n\t\tcontext\n\t};\n\tconst collectionRegistry = createCollectionRegistry(contract, collections);\n\tfunction buildCollection(namespaceId, modelName, tableName) {\n\t\treturn new (blindCast(collectionRegistry.get(modelName) ?? CollectionBase))(ctx, modelName, {\n\t\t\tregistry: collectionRegistry,\n\t\t\tnamespaceId,\n\t\t\t...tableName !== void 0 ? { tableName } : {}\n\t\t});\n\t}\n\tconst namespaceFacets = /* @__PURE__ */ new Map();\n\tfunction namespaceFacet(namespaceId) {\n\t\tconst cached = namespaceFacets.get(namespaceId);\n\t\tif (cached) return cached;\n\t\tconst facetModelNames = new Set(domainModelNamesInNamespace(contract, namespaceId));\n\t\tconst facetCache = /* @__PURE__ */ new Map();\n\t\tconst facet = new Proxy({}, { get(_facetTarget, modelProp) {\n\t\t\tif (typeof modelProp !== \"string\") return;\n\t\t\tif (!facetModelNames.has(modelProp)) return;\n\t\t\tconst hit = facetCache.get(modelProp);\n\t\t\tif (hit) return hit;\n\t\t\tconst collection = buildCollection(namespaceId, modelProp, domainModelTableInNamespace(contract, namespaceId, modelProp));\n\t\t\tfacetCache.set(modelProp, collection);\n\t\t\treturn collection;\n\t\t} });\n\t\tnamespaceFacets.set(namespaceId, facet);\n\t\treturn facet;\n\t}\n\treturn new Proxy({}, { get(_target, prop) {\n\t\tif (typeof prop !== \"string\") return;\n\t\tif (Object.hasOwn(contract.domain.namespaces, prop)) return namespaceFacet(prop);\n\t\treturn prop === \"fragment\" ? defineFieldFragment : void 0;\n\t} });\n}\nfunction createCollectionRegistry(contract, collections) {\n\tconst registry = /* @__PURE__ */ new Map();\n\tif (!collections) return registry;\n\tconst models = domainModelsAtDefaultNamespace(contract.domain);\n\tfor (const [key, collectionClass] of Object.entries(collections)) {\n\t\tif (!collectionClass) continue;\n\t\tif (!isCollectionClass(collectionClass)) throw ormError(\"ORM.ARGUMENT_INVALID\", `Custom collection '${key}' must be a Collection class (constructor), not an instance`, { meta: {\n\t\t\tmethod: \"orm\",\n\t\t\targument: \"collections\",\n\t\t\tkey\n\t\t} });\n\t\tif (!Object.hasOwn(models, key)) throw ormError(\"ORM.ARGUMENT_INVALID\", `No model found for custom collection '${key}'. Available models: ${Object.keys(models).join(\", \")}`, { meta: {\n\t\t\tmethod: \"orm\",\n\t\t\targument: \"collections\",\n\t\t\tkey\n\t\t} });\n\t\tregistry.set(key, collectionClass);\n\t}\n\treturn registry;\n}\nfunction isCollectionClass(value) {\n\tif (typeof value !== \"function\") return false;\n\tconst candidate = value;\n\tif (!candidate.prototype || typeof candidate.prototype !== \"object\") return false;\n\treturn candidate.prototype instanceof CollectionBase;\n}\n//#endregion\n//#region src/prepared-row-query.ts\nasync function prepareQuery(runtime, declaration, callback) {\n\tlet description;\n\tconst statement = await runtime.prepare(declaration, (params) => {\n\t\tconst authored = callback(params);\n\t\tif (\"plan\" in authored) {\n\t\t\tdescription = authored;\n\t\t\treturn authored.plan;\n\t\t}\n\t\treturn authored;\n\t});\n\treturn blindCast(description ? createPreparedRowQuery(description, statement) : statement);\n}\nfunction createPreparedRowQuery(description, statement) {\n\treturn Object.freeze({ query(target, params, options) {\n\t\treturn description.consume(statement.query(target, params, options));\n\t} });\n}\n//#endregion\nexport { Collection, GroupedCollection, all, and, createModelAccessor, createPreparedRowQuery, emptyState, not, or, orderByField, orm, prepareQuery };\n\n//# sourceMappingURL=index.mjs.map"],"mappings":";;;;;;;;;;;;;;;AAaA,MAAM,2CAA2C,IAAI,QAAQ;;;;;;;AAO7D,SAAS,wBAAwB,UAAU;CAC1C,MAAM,SAAS,yBAAyB,IAAI,QAAQ;CACpD,IAAI,WAAW,KAAK,GAAG,OAAO;CAC9B,MAAM,QAAQ,CAAC;CACf,MAAM,uBAAuB,IAAI,IAAI;CACrC,KAAK,MAAM,EAAE,eAAe,SAAS,OAAO,GAAG;EAC9C,IAAI,KAAK,IAAI,SAAS,GAAG;EACzB,KAAK,IAAI,SAAS;EAClB,MAAM,KAAK,SAAS;CACrB;CACA,yBAAyB,IAAI,UAAU,KAAK;CAC5C,OAAO;AACR;AAGA,SAAS,SAAS,MAAM,SAAS,SAAS;CACzC,OAAO,gBAAgB,MAAM,SAAS,OAAO;AAC9C;AAGA,SAAS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AU,cAAc,uBAAuB,aAAa,SAAS,IAAI,SAAS;AAC1F;AACA,SAAS,uBAAuB,aAAa,WAAW;CACvD,OAAO,OAAO,OAAO,EAAE,MAAM,QAAQ,QAAQ,SAAS;EACrD,OAAO,YAAY,QAAQ,UAAU,MAAM,QAAQ,QAAQ,OAAO,CAAC;CACpE,EAAE,CAAC;AACJ"}
|
|
1
|
+
{"version":3,"file":"orm-client.mjs","names":["#storage","#reference","#visibleBindings","#aliasCounter","#allocateBinding","#allocateAlias","#clone","#describeAggregate","#installAggregateReducers","#includeScalarReducer","#assertIncludeRefinementMode","#cloneSelf","#cloneWithRow","#createCollection","#lock","#withAnnotationsFromMeta","#dispatch","#descriptionOptions","#forFirst","#collectAnnotationsFromMeta","#reloadMutationRowByIdentity","#createAllWithAnnotations","#resolveConflictSkip","#resolveMtiCreateContext","#executeMtiCreate","#mapCreateRows","#augmentMutationSelection","#assertConflictSkipNotOnMtiVariant","#assertNotMtiVariant","#refuseOnMtiVariant","#buildUpsertConflictCriterion","#reloadMutationRowByCriterion","#withRuntime","#findFirstMatchingRowIdentityWhere","#updateAllWithAnnotations","#executeDeleteReturning","#deleteAllWithAnnotations","#executeDeleteReturningWithIncludes","#createSelf"],"sources":["../../../../3-extensions/sql-orm-client/dist/index.mjs"],"sourcesContent":["import { AsyncIterableResult, createMetaBuilder, isRuntimeError, runtimeError } from \"@internal/framework-components/runtime\";\nimport { AggregateExpr, AndExpr, BinaryExpr, CodecJsonValueProjection, ColumnRef, DefaultValueExpr, DeleteAst, DerivedTableSource, EqColJoinOn, ExistsExpr, InsertAst, InsertOnConflict, JoinAst, JsonArrayAggExpr, JsonDocumentProjection, JsonObjectExpr, ListExpression, LiteralExpr, LockingClause, NativeJsonValueProjection, NotExpr, NullCheckExpr, OrExpr, OrderByItem, ParamRef, ProjectionItem, SelectAst, SubqueryExpr, TableSource, UpdateAst, WindowFuncExpr, checkLimitOffset, collectOrderedParamRefs, isAggregateFn, isOrderByDirection, isOrderByNulls, isWhereExpr, lockIncompatible, lockOptionCapabilities, lockStrengthCapabilities, lockWaitPolicyOf, missingCapability } from \"@internal/sql-relational-core/ast\";\nimport { isExpression, toExpr } from \"@internal/sql-relational-core/expression\";\nimport { blindCast, castAs } from \"@internal/utils/casts\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { InternalError, isInternalError } from \"@internal/utils/internal-error\";\nimport { structuredError } from \"@internal/utils/structured-error\";\nimport { resolveStorageTable } from \"@internal/sql-contract/resolve-storage-table\";\nimport { codecRefForStorageColumn } from \"@internal/sql-relational-core/codec-descriptor-registry\";\nimport { assertDefined, invariant } from \"@internal/utils/assertions\";\nimport { isUniqueConstraintViolation } from \"@internal/sql-errors\";\nimport { domainModelsAtDefaultNamespace } from \"@internal/contract/types\";\n//#region src/aggregate-operations.ts\nconst operationNamesByRegistry = /* @__PURE__ */ new WeakMap();\n/**\n* The operation vocabulary the composed registry contributes, in contribution\n* order — the runtime mirror of the contract's emitted aggregate map, both\n* settled from the same contributed descriptors. Cached per registry: the set\n* is fixed at composition time, and every collection construction reads it.\n*/\nfunction aggregateOperationNames(registry) {\n\tconst cached = operationNamesByRegistry.get(registry);\n\tif (cached !== void 0) return cached;\n\tconst names = [];\n\tconst seen = /* @__PURE__ */ new Set();\n\tfor (const { operation } of registry.values()) {\n\t\tif (seen.has(operation)) continue;\n\t\tseen.add(operation);\n\t\tnames.push(operation);\n\t}\n\toperationNamesByRegistry.set(registry, names);\n\treturn names;\n}\n//#endregion\n//#region src/orm-errors.ts\nfunction ormError(code, message, options) {\n\treturn structuredError(code, message, options);\n}\n//#endregion\n//#region src/storage-resolution.ts\nfunction resolveTableForContract(contract, namespaceId, tableName) {\n\treturn resolveStorageTable(contract.storage, tableName, namespaceId);\n}\nfunction requireStorageTableForContract(contract, namespaceId, tableName) {\n\tconst resolved = resolveTableForContract(contract, namespaceId, tableName);\n\tif (resolved === void 0) throw ormError(\"ORM.TABLE_UNKNOWN\", `Unknown table \"${tableName}\"`, { meta: {\n\t\tnamespaceId,\n\t\ttableName\n\t} });\n\treturn resolved;\n}\nfunction storageTableForContract(contract, namespaceId, tableName) {\n\treturn requireStorageTableForContract(contract, namespaceId, tableName).table;\n}\nfunction domainModelNamesInNamespace(contract, namespaceId) {\n\tconst namespace = contract.domain.namespaces[namespaceId];\n\treturn namespace ? Object.keys(namespace.models) : [];\n}\nfunction domainModelTableInNamespace(contract, namespaceId, modelName) {\n\tconst table = (contract.domain.namespaces[namespaceId]?.models[modelName])?.storage[\"table\"];\n\treturn typeof table === \"string\" ? table : void 0;\n}\nfunction tableSourceForContract(contract, namespaceId, tableName, alias) {\n\tconst resolved = requireStorageTableForContract(contract, namespaceId, tableName);\n\tconst effectiveAlias = alias !== void 0 && alias !== tableName ? alias : void 0;\n\treturn TableSource.named(tableName, effectiveAlias, resolved.namespaceId);\n}\n//#endregion\n//#region src/collection-contract.ts\nconst POLYMORPHIC_DISCRIMINATOR_ALIAS = \"__prisma_polymorphic_discriminator\";\nfunction modelsOf(contract, namespaceId) {\n\tconst namespace = contract.domain.namespaces[namespaceId];\n\tif (namespace === void 0) throw new InternalError(`domain namespace \"${namespaceId}\" is not present on the contract`);\n\treturn blindCast(namespace.models);\n}\nfunction metadataCacheKey(namespaceId, modelName) {\n\treturn JSON.stringify([namespaceId, modelName]);\n}\nfunction modelOf(contract, namespaceId, name) {\n\tconst model = contract.domain.namespaces[namespaceId]?.models[name];\n\treturn model === void 0 ? void 0 : blindCast(model);\n}\nconst fieldToColumnCache = /* @__PURE__ */ new WeakMap();\nconst columnToFieldCache = /* @__PURE__ */ new WeakMap();\nconst polymorphismCache = /* @__PURE__ */ new WeakMap();\nfunction resolvePolymorphismInfo(contract, namespaceId, modelName) {\n\tlet perContract = polymorphismCache.get(contract);\n\tif (!perContract) {\n\t\tperContract = /* @__PURE__ */ new Map();\n\t\tpolymorphismCache.set(contract, perContract);\n\t}\n\tconst cacheKey = metadataCacheKey(namespaceId, modelName);\n\tif (perContract.has(cacheKey)) return perContract.get(cacheKey);\n\tconst models = modelsOf(contract, namespaceId);\n\tconst model = models[modelName];\n\tif (!model?.discriminator || !model.variants) {\n\t\tperContract.set(cacheKey, void 0);\n\t\treturn;\n\t}\n\tconst baseTable = model.storage?.table;\n\tif (!baseTable) {\n\t\tperContract.set(cacheKey, void 0);\n\t\treturn;\n\t}\n\tconst discriminatorField = model.discriminator.field;\n\tconst discriminatorColumn = resolveFieldToColumn(contract, namespaceId, modelName, discriminatorField);\n\tconst variants = /* @__PURE__ */ new Map();\n\tconst variantsByValue = /* @__PURE__ */ new Map();\n\tconst mtiVariants = [];\n\tfor (const [variantModelName, variantEntry] of Object.entries(model.variants)) {\n\t\tconst variantModel = models[variantModelName];\n\t\tif (!variantModel) throw new InternalError(`Model \"${modelName}\" declares variant \"${variantModelName}\", but that model is missing from the contract`);\n\t\tconst variantTable = variantModel.storage?.table ?? baseTable;\n\t\tconst strategy = variantTable === baseTable ? \"sti\" : \"mti\";\n\t\tconst info = {\n\t\t\tmodelName: variantModelName,\n\t\t\tvalue: variantEntry.value,\n\t\t\ttable: variantTable,\n\t\t\tstrategy\n\t\t};\n\t\tvariants.set(variantModelName, info);\n\t\tvariantsByValue.set(variantEntry.value, info);\n\t\tif (strategy === \"mti\") mtiVariants.push(info);\n\t}\n\tconst result = {\n\t\tdiscriminatorField,\n\t\tdiscriminatorColumn,\n\t\tbaseTable,\n\t\tvariants,\n\t\tvariantsByValue,\n\t\tmtiVariants\n\t};\n\tperContract.set(cacheKey, result);\n\treturn result;\n}\nfunction resolveFieldToColumn(contract, namespaceId, modelName, fieldName) {\n\treturn getFieldToColumnMap(contract, namespaceId, modelName)[fieldName] ?? fieldName;\n}\n/**\n* Map the fields that an MTI variant contributes to `{ table, column }` refs\n* qualified against the variant's own table — the table the read path joins\n* into the correlated child SELECT. STI variants contribute nothing here:\n* their columns live on the base table and resolve through the ordinary\n* base-table field map. Base fields are intentionally absent so callers can\n* gate variant qualification strictly to variant-owned fields.\n*\n* Uncached on purpose: `resolvePolymorphismInfo` already memoizes the variant\n* lookup, and the remaining work is one pass over the variant's field→column\n* map, so a second cache layer would buy nothing.\n*/\nfunction resolveVariantFieldColumns(contract, namespaceId, baseModelName, variantName) {\n\tconst variant = resolvePolymorphismInfo(contract, namespaceId, baseModelName)?.variants.get(variantName);\n\tconst result = {};\n\tif (variant && variant.strategy === \"mti\") {\n\t\tconst variantFieldToColumn = getFieldToColumnMap(contract, namespaceId, variant.modelName);\n\t\tfor (const [field, column] of Object.entries(variantFieldToColumn)) result[field] = {\n\t\t\ttable: variant.table,\n\t\t\tcolumn\n\t\t};\n\t}\n\treturn result;\n}\nfunction getFieldToColumnMap(contract, namespaceId, modelName) {\n\tlet perContract = fieldToColumnCache.get(contract);\n\tif (!perContract) {\n\t\tperContract = /* @__PURE__ */ new Map();\n\t\tfieldToColumnCache.set(contract, perContract);\n\t}\n\tconst cacheKey = metadataCacheKey(namespaceId, modelName);\n\tlet cached = perContract.get(cacheKey);\n\tif (cached) return cached;\n\tconst storageFields = modelsOf(contract, namespaceId)[modelName]?.storage?.fields ?? {};\n\tcached = {};\n\tfor (const [f, s] of Object.entries(storageFields)) if (s?.column) cached[f] = s.column;\n\tperContract.set(cacheKey, cached);\n\treturn cached;\n}\nfunction getColumnToFieldMap(contract, namespaceId, modelName) {\n\tlet perContract = columnToFieldCache.get(contract);\n\tif (!perContract) {\n\t\tperContract = /* @__PURE__ */ new Map();\n\t\tcolumnToFieldCache.set(contract, perContract);\n\t}\n\tconst cacheKey = metadataCacheKey(namespaceId, modelName);\n\tlet cached = perContract.get(cacheKey);\n\tif (cached) return cached;\n\tconst storageFields = modelsOf(contract, namespaceId)[modelName]?.storage?.fields ?? {};\n\tcached = {};\n\tfor (const [f, s] of Object.entries(storageFields)) if (s?.column) cached[s.column] = f;\n\tperContract.set(cacheKey, cached);\n\treturn cached;\n}\nconst completeColumnToFieldCache = /* @__PURE__ */ new WeakMap();\n/**\n* Like getColumnToFieldMap, but a field without a storage `column` maps under its own name.\n*/\nfunction getCompleteColumnToFieldMap(contract, namespaceId, modelName) {\n\tlet perContract = completeColumnToFieldCache.get(contract);\n\tif (!perContract) {\n\t\tperContract = /* @__PURE__ */ new Map();\n\t\tcompleteColumnToFieldCache.set(contract, perContract);\n\t}\n\tconst cacheKey = metadataCacheKey(namespaceId, modelName);\n\tlet cached = perContract.get(cacheKey);\n\tif (cached) return cached;\n\tconst storageFields = modelsOf(contract, namespaceId)[modelName]?.storage?.fields ?? {};\n\tcached = {};\n\tfor (const [f, s] of Object.entries(storageFields)) cached[s?.column ?? f] = f;\n\tperContract.set(cacheKey, cached);\n\treturn cached;\n}\nfunction resolveIncludeRelation(contract, namespaceId, baseModelName, relationName, variantName) {\n\tconst polymorphism = resolvePolymorphismInfo(contract, namespaceId, baseModelName);\n\tconst variant = variantName === void 0 ? void 0 : polymorphism?.variants.get(variantName);\n\tlet declaringModelName = baseModelName;\n\tlet localTableName = resolveModelTableName(contract, namespaceId, baseModelName);\n\tlet relation;\n\tif (variant !== void 0) {\n\t\tconst candidate = resolveModelRelations(contract, namespaceId, variant.modelName)[relationName];\n\t\tif (candidate !== void 0) {\n\t\t\trelation = candidate;\n\t\t\tdeclaringModelName = variant.modelName;\n\t\t\tlocalTableName = variant.table;\n\t\t}\n\t}\n\trelation ??= resolveModelRelations(contract, namespaceId, baseModelName)[relationName];\n\tif (!relation) throw ormError(\"ORM.RELATION_UNKNOWN\", `Relation '${relationName}' not found on model '${baseModelName}'`, { meta: {\n\t\tmodel: baseModelName,\n\t\trelation: relationName\n\t} });\n\tconst { localFields, targetFields } = relation.on;\n\tif (localFields.length === 0 || localFields.length !== targetFields.length) throw new InternalError(`Relation '${relationName}' on model '${declaringModelName}' has incomplete join metadata: ${localFields.length} local field(s), ${targetFields.length} target field(s)`);\n\tconst localColumns = localFields.map((field) => resolveFieldToColumn(contract, namespaceId, declaringModelName, field));\n\tconst targetColumns = targetFields.map((field) => resolveFieldToColumn(contract, relation.toNamespace, relation.to, field));\n\tconst relatedTableName = resolveModelTableName(contract, relation.toNamespace, relation.to);\n\tlet through;\n\tif (relation.through !== void 0) through = {\n\t\ttable: relation.through.table,\n\t\tnamespaceId: relation.through.namespaceId,\n\t\tparentColumns: relation.through.parentColumns,\n\t\tchildColumns: relation.through.childColumns,\n\t\ttargetColumns: relation.through.targetColumns,\n\t\tparentLocalColumns: localColumns\n\t};\n\treturn {\n\t\trelatedModelName: relation.to,\n\t\trelatedNamespaceId: relation.toNamespace,\n\t\trelatedTableName,\n\t\tlocalTableName,\n\t\ttargetColumns,\n\t\tlocalColumns,\n\t\tcardinality: relation.cardinality,\n\t\t...ifDefined(\"through\", through)\n\t};\n}\nfunction resolveThrough(contract, through) {\n\tif (!through) return void 0;\n\tconst { table, namespaceId, parentColumns, childColumns, targetColumns } = through;\n\tconst junctionTable = contract.storage.namespaces[namespaceId]?.entries.table?.[table];\n\tif (!junctionTable) return void 0;\n\tconst fkColumnSet = /* @__PURE__ */ new Set([...parentColumns, ...childColumns]);\n\tconst requiredPayloadColumns = [];\n\tfor (const [colName, col] of Object.entries(junctionTable.columns)) if (!fkColumnSet.has(colName) && !col.nullable && col.default === void 0 && !hasExecutionCreateDefault(contract, namespaceId, table, colName)) requiredPayloadColumns.push(colName);\n\treturn {\n\t\ttable,\n\t\tnamespaceId,\n\t\tparentColumns,\n\t\tchildColumns,\n\t\ttargetColumns,\n\t\trequiredPayloadColumns\n\t};\n}\nfunction hasExecutionCreateDefault(contract, namespace, table, column) {\n\treturn contract.execution?.mutations.defaults.some((mutationDefault) => mutationDefault.ref.namespace === namespace && mutationDefault.ref.entry === table && mutationDefault.ref.field === column && mutationDefault.onCreate !== void 0) ?? false;\n}\nconst modelRelationsCache = /* @__PURE__ */ new WeakMap();\nfunction resolveModelRelations(contract, namespaceId, modelName) {\n\tlet perContract = modelRelationsCache.get(contract);\n\tif (!perContract) {\n\t\tperContract = /* @__PURE__ */ new Map();\n\t\tmodelRelationsCache.set(contract, perContract);\n\t}\n\tconst cacheKey = metadataCacheKey(namespaceId, modelName);\n\tconst cached = perContract.get(cacheKey);\n\tif (cached) return cached;\n\tconst relationMap = modelsOf(contract, namespaceId)[modelName]?.relations ?? {};\n\tconst resolved = {};\n\tfor (const [name, value] of Object.entries(relationMap)) {\n\t\tif (!value || typeof value !== \"object\") continue;\n\t\tconst rel = blindCast(value);\n\t\tconst localFields = rel.on?.localFields;\n\t\tconst targetFields = rel.on?.targetFields;\n\t\tif (!rel.to || typeof rel.to !== \"object\" || typeof rel.to.model !== \"string\" || !Array.isArray(localFields) || !Array.isArray(targetFields)) continue;\n\t\tconst through = resolveThrough(contract, rel.through);\n\t\tresolved[name] = {\n\t\t\tto: rel.to.model,\n\t\t\ttoNamespace: rel.to.namespace,\n\t\t\tcardinality: parseRelationCardinality(rel.cardinality),\n\t\t\ton: {\n\t\t\t\tlocalFields: blindCast(localFields),\n\t\t\t\ttargetFields: blindCast(targetFields)\n\t\t\t},\n\t\t\t...through !== void 0 ? { through } : {}\n\t\t};\n\t}\n\tperContract.set(cacheKey, resolved);\n\treturn resolved;\n}\nfunction parseRelationCardinality(value) {\n\tif (value === \"1:1\" || value === \"N:1\" || value === \"1:N\" || value === \"N:M\") return value;\n}\nfunction resolveUpsertConflictColumns(contract, namespaceId, modelName, conflictOn) {\n\tif (conflictOn && typeof conflictOn === \"object\") {\n\t\tconst columns = Object.keys(conflictOn).map((fieldName) => resolveFieldToColumn(contract, namespaceId, modelName, fieldName));\n\t\tif (columns.length > 0) return columns;\n\t}\n\treturn [...storageTableForContract(contract, namespaceId, resolveModelTableName(contract, namespaceId, modelName)).primaryKey?.columns ?? []];\n}\nfunction resolveModelTableName(contract, namespaceId, modelName) {\n\tconst table = domainModelTableInNamespace(contract, namespaceId, modelName);\n\tif (table === void 0) throw new InternalError(`Model \"${modelName}\" has invalid or missing storage.table in namespace \"${namespaceId}\"`);\n\treturn table;\n}\nfunction resolvePrimaryKeyColumns(contract, namespaceId, tableName) {\n\tconst columns = resolveTableForContract(contract, namespaceId, tableName)?.table.primaryKey?.columns ?? [];\n\tif (columns.length === 0) throw new InternalError(`Table \"${tableName}\" in namespace \"${namespaceId}\" has no primary key to join its multi-table variants on`);\n\treturn columns;\n}\nfunction resolveRowIdentityColumns(contract, namespaceId, tableName) {\n\tlet table;\n\ttry {\n\t\ttable = storageTableForContract(contract, namespaceId, tableName);\n\t} catch (error) {\n\t\tif (error instanceof Error && error.message.includes(\"ambiguous\")) throw error;\n\t\treturn [];\n\t}\n\tif (table.primaryKey && table.primaryKey.columns.length > 0) return table.primaryKey.columns;\n\tfor (const unique of table.uniques) if (unique.columns.length > 0) return unique.columns;\n\treturn [];\n}\nfunction assertReturningCapability(contract, action) {\n\tif (hasContractCapability(contract, \"returning\")) return;\n\tthrow ormError(\"ORM.CAPABILITY_MISSING\", `${action} requires contract capability \"returning\"`, { meta: {\n\t\tcapability: \"returning\",\n\t\taction\n\t} });\n}\nfunction assertInsertConflictSkipCapability(contract, action, targeted) {\n\trequireCapability(contract, action, \"insertOnConflictSkip\");\n\tif (!targeted) requireCapability(contract, action, \"insertOnConflictWithoutTarget\");\n}\nfunction requireCapability(contract, action, capability) {\n\tif (hasContractCapability(contract, capability)) return;\n\tthrow ormError(\"ORM.CAPABILITY_MISSING\", `${action} requires contract capability \"${capability}\". Re-emit the contract against an adapter that reports it.`, { meta: {\n\t\tcapability,\n\t\taction\n\t} });\n}\nfunction resolveInsertConflictColumns(contract, namespaceId, modelName, conflictOn, action) {\n\tconst fieldToColumn = getFieldToColumnMap(contract, namespaceId, modelName);\n\treturn conflictOn.map((fieldName) => {\n\t\tconst column = fieldToColumn[fieldName];\n\t\tif (column === void 0) throw ormError(\"ORM.ARGUMENT_INVALID\", `${action} conflictOn field \"${fieldName}\" is not a scalar field of model \"${modelName}\"`, { meta: {\n\t\t\taction,\n\t\t\tmodel: modelName,\n\t\t\tfield: fieldName\n\t\t} });\n\t\treturn column;\n\t});\n}\nfunction assertDistinctOnCapability(contract, methodName) {\n\tif (contract.capabilities[\"postgres\"]?.[\"distinctOn\"] === true) return;\n\tthrow ormError(\"ORM.CAPABILITY_MISSING\", `${methodName}() requires capability postgres.distinctOn`, { meta: {\n\t\tcapability: \"postgres.distinctOn\",\n\t\tmethod: methodName\n\t} });\n}\nfunction assertLockCapability(contract, requirement, methodName) {\n\tconst capability = missingCapability(contract.capabilities, requirement);\n\tif (capability === void 0) return;\n\tthrow ormError(\"ORM.CAPABILITY_MISSING\", `${methodName}() requires capability ${capability}`, { meta: {\n\t\tcapability,\n\t\tmethod: methodName\n\t} });\n}\nfunction hasContractCapability(contract, capability) {\n\tconst capabilities = contract.capabilities;\n\tconst value = capabilities[capability];\n\tif (capabilityEnabled(value)) return true;\n\treturn Object.values(capabilities).some((targetCapabilities) => {\n\t\tif (typeof targetCapabilities !== \"object\" || targetCapabilities === null) return false;\n\t\treturn capabilityEnabled(targetCapabilities[capability]);\n\t});\n}\nfunction capabilityEnabled(value) {\n\tif (value === true) return true;\n\tif (typeof value !== \"object\" || value === null) return false;\n\treturn Object.values(blindCast(value)).some((flag) => flag === true);\n}\nfunction isToOneCardinality(cardinality) {\n\treturn cardinality === \"1:1\" || cardinality === \"N:1\";\n}\n//#endregion\n//#region src/aggregate-builder.ts\n/**\n* The aggregate selector methods, one per operation the registry contributes —\n* the runtime mirror of the contract's emitted aggregate map, which is what\n* types the surface as {@link AggregateBuilder}. Each method builds a selector\n* carrying the operation's name and, for a field-taking call, the field's\n* storage column; what a selector resolves to is the plan compiler's question\n* to the same registry.\n*/\nfunction createAggregateBuilder(contract, aggregates, namespaceId, modelName) {\n\tconst fieldToColumn = getFieldToColumnMap(contract, namespaceId, modelName);\n\tconst builder = {};\n\tfor (const operation of aggregateOperationNames(aggregates)) builder[operation] = (field) => {\n\t\tconst column = field === void 0 ? void 0 : fieldToColumn[field] ?? field;\n\t\treturn {\n\t\t\tkind: \"aggregate\",\n\t\t\tfn: operation,\n\t\t\t...ifDefined(\"column\", column)\n\t\t};\n\t};\n\treturn blindCast(builder);\n}\nfunction isAggregateSelector(value) {\n\tif (!value || typeof value !== \"object\") return false;\n\tconst candidate = value;\n\treturn candidate.kind === \"aggregate\" && typeof candidate.fn === \"string\";\n}\n//#endregion\n//#region src/aggregate-codecs.ts\n/**\n* What an aggregate resolves to: the codec its result carries, and the expression the target wants built for it.\n*\n* An aggregate over a column resolves against that column's own codec, so a target that widens `sum` over small integers and preserves it over decimals answers differently per column without the caller knowing either rule. Where a target also needs the result rendered a particular way — a value its driver cannot otherwise carry — the descriptor's lowering says so, and the codec it declared stays the codec regardless.\n*\n* A pair the composed stack declares no overload for is rejected before any SQL is built: an undeclared aggregate has no result identity to project or decode, and executing it anyway would hand back the driver-native value the declared-codec path exists to replace.\n*/\nfunction resolveAggregate(query) {\n\tconst input = inputCodecRef(query);\n\tconst resolved = query.aggregates.resolve(query.fn, input);\n\tif (resolved === void 0) throw unsupportedAggregate(query, input);\n\tconst nullability = resolved.nullable ? { nullable: true } : {\n\t\tnullable: false,\n\t\temptyResultJson: resolved.emptyResultJson\n\t};\n\treturn {\n\t\tcodec: resolved.output,\n\t\t...nullability,\n\t\tinput,\n\t\tlower: resolved.lower\n\t};\n}\n/**\n* The plain SQL form of an operation in the closed aggregate alphabet.\n* Registry composition guarantees every operation outside the alphabet\n* carries a lowering hook, so a resolution without one for any other name is\n* a composition bug, not a user error.\n*/\nfunction plainAggregateExpr(fn, expr) {\n\tif (!isAggregateFn(fn)) throw new InternalError(`aggregate operation '${fn}' is outside the SQL aggregate alphabet and resolved without a lowering hook`);\n\treturn new AggregateExpr(fn, expr);\n}\nfunction unsupportedAggregate(query, input) {\n\treturn ormError(\"ORM.AGGREGATE_UNSUPPORTED\", input === void 0 ? `The composed target declares no '${query.fn}' aggregate for a call without an input.` : `The composed target declares no '${query.fn}' aggregate over codec '${input.codecId}' (column '${query.column}' of table '${query.tableName}').`, {\n\t\twhy: \"An aggregate result decodes through the codec its target declares; an undeclared pair has no declared result to type or decode.\",\n\t\tfix: `Aggregate a column the target declares '${query.fn}' for, or contribute an aggregate descriptor for this pair.`,\n\t\tmeta: {\n\t\t\toperation: query.fn,\n\t\t\ttable: query.tableName,\n\t\t\t...ifDefined(\"column\", query.column),\n\t\t\t...ifDefined(\"inputCodecId\", input?.codecId)\n\t\t}\n\t});\n}\n/** The codec of the value being aggregated — the column's own, or none where the aggregate is over rows. */\nfunction inputCodecRef(query) {\n\treturn query.column === void 0 ? void 0 : codecRefForStorageColumn(query.contract.storage, query.namespaceId, query.tableName, query.column);\n}\n//#endregion\n//#region src/aggregate-empty-result.ts\n/**\n* What an aggregate reads as when there is no row to read at all.\n*\n* SQL answers an empty input set itself — a nullable-declared aggregate\n* collapses to NULL, a non-nullable one to a value SQL still produces, a\n* count's zero cardinality — so this covers only the degenerate case of a\n* result set with no row: an absent aggregate alias, or an include whose\n* envelope never arrived. The answer reads off the operation's declared row:\n* NULL where the row is nullable, else the value the row declares, decoded\n* through the codec it declared beside it — so the application sees the same\n* value shape a real row would produce, in whichever form that codec's\n* canonical JSON takes.\n*/\nfunction emptyAggregateResult(result, codec) {\n\treturn result.nullable ? null : codec.decodeJson(result.emptyResultJson);\n}\n//#endregion\n//#region src/collection-column-mapping.ts\nfunction mapFieldsToColumns(contract, namespaceId, modelName, fieldNames) {\n\tconst fieldToColumn = getFieldToColumnMap(contract, namespaceId, modelName);\n\treturn fieldNames.map((fieldName) => fieldToColumn[fieldName] ?? fieldName);\n}\nfunction mapCursorValuesToColumns(contract, namespaceId, modelName, cursorValues) {\n\tconst fieldToColumn = getFieldToColumnMap(contract, namespaceId, modelName);\n\tconst mappedCursor = {};\n\tfor (const [fieldName, value] of Object.entries(cursorValues)) {\n\t\tif (value === void 0) continue;\n\t\tconst columnName = fieldToColumn[fieldName] ?? fieldName;\n\t\tmappedCursor[columnName] = value;\n\t}\n\treturn mappedCursor;\n}\n//#endregion\n//#region src/collection-runtime.ts\nfunction stripHiddenMappedFields(contract, namespaceId, modelName, mapped, hiddenColumns) {\n\tif (hiddenColumns.length === 0) return;\n\tconst columnToField = getColumnToFieldMap(contract, namespaceId, modelName);\n\tfor (const hiddenColumn of hiddenColumns) {\n\t\tconst fieldName = columnToField[hiddenColumn] ?? hiddenColumn;\n\t\tdelete mapped[fieldName];\n\t}\n}\nfunction mapStorageRowToModelFields(contract, namespaceId, modelName, row) {\n\tconst columnToField = getColumnToFieldMap(contract, namespaceId, modelName);\n\tif (Object.keys(columnToField).length === 0) return { ...row };\n\treturn mapColumnNames(row, columnToField);\n}\nfunction createStorageRowMapper(contract, namespaceId, modelName) {\n\tconst columnToField = getColumnToFieldMap(contract, namespaceId, modelName);\n\treturn Object.keys(columnToField).length === 0 ? (row) => ({ ...row }) : (row) => mapColumnNames(row, columnToField);\n}\nfunction mapColumnNames(row, columnToField) {\n\tconst mapped = {};\n\tfor (const [columnName, value] of Object.entries(row)) mapped[columnToField[columnName] ?? columnName] = value;\n\treturn mapped;\n}\nconst mergedColumnToFieldCache = /* @__PURE__ */ new WeakMap();\nfunction getMergedColumnToFieldMap(contract, namespaceId, baseModelName, variantModelName, variantTable) {\n\tconst cacheKey = `${namespaceId}:${baseModelName}:${variantModelName}:${variantTable ?? \"\"}`;\n\tlet perContract = mergedColumnToFieldCache.get(contract);\n\tif (!perContract) {\n\t\tperContract = /* @__PURE__ */ new Map();\n\t\tmergedColumnToFieldCache.set(contract, perContract);\n\t}\n\tconst cached = perContract.get(cacheKey);\n\tif (cached) return cached;\n\tconst baseMap = getCompleteColumnToFieldMap(contract, namespaceId, baseModelName);\n\tconst variantMap = getCompleteColumnToFieldMap(contract, namespaceId, variantModelName);\n\tconst merged = { ...baseMap };\n\tfor (const [col, field] of Object.entries(variantMap)) if (variantTable) merged[`${variantTable}__${col}`] = field;\n\telse merged[col] = field;\n\tperContract.set(cacheKey, merged);\n\treturn merged;\n}\nfunction mapPolymorphicRow(contract, namespaceId, baseModelName, polyInfo, row, variantName) {\n\tconst discriminatorValue = row[polyInfo.discriminatorColumn] ?? row[\"__prisma_polymorphic_discriminator\"];\n\tconst variant = variantName ? polyInfo.variants.get(variantName) : typeof discriminatorValue === \"string\" ? polyInfo.variantsByValue.get(discriminatorValue) : void 0;\n\tif (!variant) return mapKnownColumnNames(row, getCompleteColumnToFieldMap(contract, namespaceId, baseModelName));\n\tconst mtiTable = variant.strategy === \"mti\" ? variant.table : void 0;\n\treturn mapKnownColumnNames(row, getMergedColumnToFieldMap(contract, namespaceId, baseModelName, variant.modelName, mtiTable));\n}\nfunction createPolymorphicRowMapper(contract, namespaceId, baseModelName, polyInfo, variantName) {\n\tconst baseMapper = captureColumnMapper(() => getCompleteColumnToFieldMap(contract, namespaceId, baseModelName));\n\tconst mappersByValue = /* @__PURE__ */ new Map();\n\tlet pinnedMapper = baseMapper;\n\tfor (const [name, variant] of polyInfo.variants) {\n\t\tif (variantName && name !== variantName) continue;\n\t\tconst mapper = captureColumnMapper(() => getMergedColumnToFieldMap(contract, namespaceId, baseModelName, variant.modelName, variant.strategy === \"mti\" ? variant.table : void 0));\n\t\tif (variantName) pinnedMapper = mapper;\n\t\tfor (const [value, candidate] of polyInfo.variantsByValue) if (candidate === variant) mappersByValue.set(value, mapper);\n\t}\n\tconst discriminatorColumn = polyInfo.discriminatorColumn;\n\treturn (row) => {\n\t\tconst value = row[discriminatorColumn] ?? row[\"__prisma_polymorphic_discriminator\"];\n\t\treturn (variantName ? pinnedMapper : typeof value === \"string\" ? mappersByValue.get(value) ?? baseMapper : baseMapper)(row);\n\t};\n}\nfunction captureColumnMapper(resolve) {\n\ttry {\n\t\tconst columns = resolve();\n\t\treturn (row) => mapKnownColumnNames(row, columns);\n\t} catch (error) {\n\t\treturn () => {\n\t\t\tthrow error;\n\t\t};\n\t}\n}\nfunction mapKnownColumnNames(row, columns) {\n\tconst mapped = {};\n\tfor (const [col, val] of Object.entries(row)) {\n\t\tconst field = columns[col];\n\t\tif (field !== void 0) mapped[field] = val;\n\t}\n\treturn mapped;\n}\nfunction mapModelDataToStorageRow(contract, namespaceId, modelName, row) {\n\tconst fieldToColumn = getFieldToColumnMap(contract, namespaceId, modelName);\n\tconst mapped = {};\n\tfor (const [fieldName, value] of Object.entries(row)) {\n\t\tif (value === void 0) continue;\n\t\tconst columnName = fieldToColumn[fieldName] ?? fieldName;\n\t\tmapped[columnName] = value;\n\t}\n\treturn mapped;\n}\nfunction mapResultRows(result, mapper) {\n\tconst generator = async function* () {\n\t\tfor await (const value of result) yield mapper(value);\n\t};\n\treturn new AsyncIterableResult(generator());\n}\n//#endregion\n//#region src/column-codec.ts\nfunction resolveColumn(contract, namespaceId, tableName, columnName) {\n\treturn resolveTableForContract(contract, namespaceId, tableName)?.table.columns[columnName];\n}\nfunction codecTraits(context, codecId) {\n\treturn context.codecDescriptors.descriptorFor(codecId)?.traits ?? [];\n}\nfunction hasTrait(context, codecId, trait) {\n\treturn codecTraits(context, codecId).includes(trait);\n}\n//#endregion\n//#region src/order-by-guards.ts\n/**\n* A keyset needs a cursor value for every order axis, so each active order must be a plain column without null placement.\n*/\nfunction assertCursorCompatibleOrder(orderBy) {\n\t(orderBy ?? []).forEach((item, index) => {\n\t\tconst position = index + 1;\n\t\tif (item.expr.kind !== \"column-ref\") throw ormError(\"ORM.ARGUMENT_INVALID\", `cursor() cannot key on orderBy item ${position}: it orders by an expression rather than a column, and relation orders, relation counts and operation results are not cursorable. Order by the model's own columns to paginate with a cursor.`, { meta: {\n\t\t\tmethod: \"cursor\",\n\t\t\tposition\n\t\t} });\n\t\tif (item.nulls !== void 0) throw ormError(\"ORM.ARGUMENT_INVALID\", `cursor() cannot key on orderBy item ${position}: an order with nulls placement is not cursorable. Remove the nulls option to paginate with a cursor.`, { meta: {\n\t\t\tmethod: \"cursor\",\n\t\t\tposition,\n\t\t\tnulls: item.nulls\n\t\t} });\n\t});\n}\n/**\n* Postgres requires the leading `ORDER BY` items to match the `DISTINCT ON` expressions, so the first `distinctOnCount` items must be plain columns; later items only choose which row represents each group and may be any expression.\n*/\nfunction assertDistinctOnCompatibleOrder(orderBy, distinctOnCount) {\n\t(orderBy ?? []).slice(0, distinctOnCount).forEach((item, index) => {\n\t\tconst position = index + 1;\n\t\tif (item.expr.kind !== \"column-ref\") throw ormError(\"ORM.ARGUMENT_INVALID\", `distinctOn() needs its ${distinctOnCount} column(s) as the first orderBy items, but orderBy item ${position} orders by an expression rather than a column. Put the distinctOn columns first; relation orders, relation counts and operation results may follow them.`, { meta: {\n\t\t\tmethod: \"distinctOn\",\n\t\t\tposition,\n\t\t\tdistinctOnCount\n\t\t} });\n\t});\n}\nfunction checkedOrderByItem(dir, expr, options) {\n\tconst nulls = options?.nulls;\n\tif (nulls !== void 0 && !isOrderByNulls(nulls)) throw ormError(\"ORM.ARGUMENT_INVALID\", `${dir}() nulls must be \"first\" or \"last\"`, { meta: {\n\t\tmethod: dir,\n\t\tnulls: String(nulls)\n\t} });\n\treturn new OrderByItem(expr, dir, nulls);\n}\n//#endregion\n//#region src/query-plan-meta.ts\nfunction deriveParamsFromAst(ast) {\n\treturn { params: collectOrderedParamRefs(ast).map((p) => p.kind === \"param-ref\" ? p.value : void 0) };\n}\nfunction resolveTableColumns(contract, namespaceId, tableName) {\n\ttry {\n\t\treturn Object.keys(storageTableForContract(contract, namespaceId, tableName).columns);\n\t} catch (error) {\n\t\tif (error instanceof Error && error.message.includes(\"ambiguous\")) throw error;\n\t\tthrow ormError(\"ORM.TABLE_UNKNOWN\", `Unknown table \"${tableName}\" in SQL ORM query planner`, { meta: {\n\t\t\tnamespaceId,\n\t\t\ttableName\n\t\t} });\n\t}\n}\nfunction buildOrmPlanMeta(contract, annotations) {\n\tconst annotationRecord = annotations !== void 0 && annotations.size > 0 ? Object.freeze(Object.fromEntries(annotations)) : void 0;\n\treturn {\n\t\ttarget: contract.target,\n\t\ttargetFamily: contract.targetFamily,\n\t\tstorageHash: contract.storage.storageHash,\n\t\t...ifDefined(\"profileHash\", contract.profileHash),\n\t\t...ifDefined(\"annotations\", annotationRecord),\n\t\tlane: \"orm-client\"\n\t};\n}\nfunction buildOrmQueryPlan(contract, ast, params, annotations) {\n\treturn Object.freeze({\n\t\tast,\n\t\tparams: [...params],\n\t\tmeta: buildOrmPlanMeta(contract, annotations)\n\t});\n}\n/**\n* Merges annotations into an existing `SqlQueryPlan`'s\n* `meta.annotations` and returns a new frozen plan.\n*\n* Used by the ORM dispatch path to attach terminal-call annotations to\n* plans produced by mutation compile functions (which don't take\n* annotations as parameters). Reads compile through `compileSelect`-\n* family functions that pass `state.annotations` directly to\n* `buildOrmQueryPlan`; this helper is the alternate path for write\n* terminals where annotations arrive at the call site, not via state.\n*\n* Returns the input plan unchanged when `annotations` is undefined\n* or empty. Reserved namespaces already on the input plan (`codecs`, target keys such as `pg`)\n* win over caller-supplied entries under the same key —\n* see the reserved-namespace policy on `defineAnnotation`.\n*/\nfunction mergeAnnotations(plan, annotations) {\n\tif (annotations === void 0 || annotations.size === 0) return plan;\n\tconst callerEntries = {};\n\tfor (const [namespace, value] of annotations) callerEntries[namespace] = value;\n\tconst mergedAnnotations = Object.freeze({\n\t\t...callerEntries,\n\t\t...plan.meta.annotations ?? {}\n\t});\n\treturn Object.freeze({\n\t\t...plan,\n\t\tmeta: Object.freeze({\n\t\t\t...plan.meta,\n\t\t\tannotations: mergedAnnotations\n\t\t})\n\t});\n}\n//#endregion\n//#region src/where-binding.ts\nfunction namespaceCoordinateForSource(source) {\n\treturn source.kind === \"table-source\" ? source.namespaceId : void 0;\n}\nfunction bindWhereExpr(contract, expr, namespaceId) {\n\treturn expr.accept({\n\t\tcolumnRef(expr) {\n\t\t\treturn bindExpression(contract, expr);\n\t\t},\n\t\tidentifierRef(expr) {\n\t\t\treturn expr;\n\t\t},\n\t\tsubquery(expr) {\n\t\t\treturn bindExpression(contract, expr);\n\t\t},\n\t\toperation(expr) {\n\t\t\treturn bindExpression(contract, expr);\n\t\t},\n\t\taggregate(expr) {\n\t\t\treturn bindExpression(contract, expr);\n\t\t},\n\t\twindowFunc(expr) {\n\t\t\treturn bindExpression(contract, expr);\n\t\t},\n\t\tfunctionCall(expr) {\n\t\t\treturn bindExpression(contract, expr);\n\t\t},\n\t\tcast(expr) {\n\t\t\treturn bindExpression(contract, expr);\n\t\t},\n\t\tcase(expr) {\n\t\t\treturn bindExpression(contract, expr);\n\t\t},\n\t\tjsonObject(expr) {\n\t\t\treturn bindExpression(contract, expr);\n\t\t},\n\t\tjsonArrayAgg(expr) {\n\t\t\treturn bindExpression(contract, expr);\n\t\t},\n\t\tliteral(expr) {\n\t\t\treturn expr;\n\t\t},\n\t\tparam(expr) {\n\t\t\treturn expr;\n\t\t},\n\t\tpreparedParam(expr) {\n\t\t\treturn expr;\n\t\t},\n\t\tlist(expr) {\n\t\t\treturn bindExpression(contract, expr);\n\t\t},\n\t\tbinary(expr) {\n\t\t\tconst left = bindExpression(contract, expr.left);\n\t\t\tconst bindingColumn = left.kind === \"column-ref\" ? left : void 0;\n\t\t\treturn new BinaryExpr(expr.op, left, bindComparable(contract, expr.right, bindingColumn, namespaceId));\n\t\t},\n\t\tand(expr) {\n\t\t\treturn AndExpr.of(expr.exprs.map((part) => bindWhereExpr(contract, part, namespaceId)));\n\t\t},\n\t\tor(expr) {\n\t\t\treturn OrExpr.of(expr.exprs.map((part) => bindWhereExpr(contract, part, namespaceId)));\n\t\t},\n\t\texists(expr) {\n\t\t\treturn expr.notExists ? ExistsExpr.notExists(bindSelectAst(contract, expr.subquery)) : ExistsExpr.exists(bindSelectAst(contract, expr.subquery));\n\t\t},\n\t\tnullCheck(expr) {\n\t\t\treturn expr.isNull ? NullCheckExpr.isNull(bindExpression(contract, expr.expr)) : NullCheckExpr.isNotNull(bindExpression(contract, expr.expr));\n\t\t},\n\t\tnot(expr) {\n\t\t\treturn new NotExpr(bindWhereExpr(contract, expr.expr, namespaceId));\n\t\t},\n\t\trawExpr(expr) {\n\t\t\treturn expr;\n\t\t}\n\t});\n}\nfunction bindComparable(contract, comparable, bindingColumn, namespaceId) {\n\tif (comparable.kind === \"param-ref\" || bindingColumn === void 0) return comparable.kind === \"param-ref\" ? comparable : comparable.kind === \"literal\" || comparable.kind === \"list\" ? comparable : bindExpression(contract, comparable);\n\tif (comparable.kind === \"literal\") return createParamRef(contract, bindingColumn, comparable.value, namespaceId);\n\tif (comparable.kind === \"list\") return ListExpression.of(comparable.values.map((value) => value.kind === \"literal\" ? createParamRef(contract, bindingColumn, value.value, namespaceId) : value));\n\treturn bindExpression(contract, comparable);\n}\nfunction createParamRef(contract, columnRef, value, namespaceId) {\n\tconst resolved = resolveStorageTable(contract.storage, columnRef.table, namespaceId);\n\tif (resolved === void 0 || !resolved.table.columns[columnRef.column]) throw ormError(\"ORM.COLUMN_UNKNOWN\", `Unknown column \"${columnRef.column}\" in table \"${columnRef.table}\"`, { meta: {\n\t\ttableName: columnRef.table,\n\t\tcolumn: columnRef.column\n\t} });\n\tconst codec = codecRefForStorageColumn(contract.storage, resolved.namespaceId, columnRef.table, columnRef.column);\n\treturn ParamRef.of(value, codec ? { codec } : void 0);\n}\nfunction createExpressionBinder(contract) {\n\treturn { select: (ast) => bindSelectAst(contract, ast) };\n}\nfunction bindExpression(contract, expr) {\n\treturn expr.rewrite(createExpressionBinder(contract));\n}\nfunction bindProjectionExpr(contract, expr) {\n\treturn expr.kind === \"literal\" ? expr : bindExpression(contract, expr);\n}\nfunction bindOrderByItem(contract, orderItem) {\n\treturn orderItem.withExpr(bindExpression(contract, orderItem.expr));\n}\nfunction bindJoin(contract, join) {\n\tconst namespaceId = namespaceCoordinateForSource(join.source);\n\treturn new JoinAst(join.joinType, bindFromSource(contract, join.source), join.on.kind === \"eq-col-join-on\" ? join.on : bindWhereExpr(contract, join.on, namespaceId), join.lateral);\n}\nfunction bindFromSource(contract, source) {\n\tif (source.kind === \"table-source\") return source;\n\tif (source.kind === \"derived-table-source\") return DerivedTableSource.as(source.alias, bindSelectAst(contract, source.query));\n\treturn source;\n}\nfunction bindSelectAst(contract, ast) {\n\tconst namespaceId = ast.from !== void 0 ? namespaceCoordinateForSource(ast.from) : void 0;\n\treturn new SelectAst({\n\t\t...ast.from !== void 0 ? { from: bindFromSource(contract, ast.from) } : {},\n\t\tjoins: ast.joins?.map((join) => bindJoin(contract, join)),\n\t\tprojection: ast.projection.map((projection) => new ProjectionItem(projection.alias, bindProjectionExpr(contract, projection.expr), projection.codec)),\n\t\twhere: ast.where ? bindWhereExpr(contract, ast.where, namespaceId) : void 0,\n\t\torderBy: ast.orderBy?.map((orderItem) => bindOrderByItem(contract, orderItem)),\n\t\tdistinct: ast.distinct,\n\t\tdistinctOn: ast.distinctOn?.map((expr) => bindExpression(contract, expr)),\n\t\tgroupBy: ast.groupBy?.map((expr) => bindExpression(contract, expr)),\n\t\thaving: ast.having ? bindWhereExpr(contract, ast.having, namespaceId) : void 0,\n\t\tlimit: ast.limit,\n\t\toffset: ast.offset,\n\t\tlocking: ast.locking,\n\t\tselectAllIntent: ast.selectAllIntent\n\t});\n}\n//#endregion\n//#region src/where-utils.ts\nfunction combineWhereExprs(filters) {\n\tif (filters.length === 0) return;\n\tif (filters.length === 1) return filters[0];\n\treturn AndExpr.of(filters);\n}\n//#endregion\n//#region src/query-plan-source.ts\nfunction createBoundaryExpr(tableName, entry) {\n\treturn new BinaryExpr(entry.direction === \"asc\" ? \"gt\" : \"lt\", ColumnRef.of(tableName, entry.column), LiteralExpr.of(entry.value));\n}\nfunction buildLexicographicCursorWhere(tableName, entries) {\n\tconst branches = entries.map((entry, index) => {\n\t\tconst branchExprs = [];\n\t\tfor (const prefixEntry of entries.slice(0, index)) branchExprs.push(BinaryExpr.eq(ColumnRef.of(tableName, prefixEntry.column), LiteralExpr.of(prefixEntry.value)));\n\t\tbranchExprs.push(createBoundaryExpr(tableName, entry));\n\t\tif (branchExprs.length === 1) {\n\t\t\tconst branch = branchExprs[0];\n\t\t\tassertDefined(branch, \"cursor branch contains its boundary expression\");\n\t\t\treturn branch;\n\t\t}\n\t\treturn AndExpr.of(branchExprs);\n\t});\n\tif (branches.length === 1) {\n\t\tconst branch = branches[0];\n\t\tassertDefined(branch, \"cursor expression contains its single branch\");\n\t\treturn branch;\n\t}\n\treturn OrExpr.of(branches);\n}\nfunction buildCursorWhere(tableName, orderBy, cursor) {\n\tif (!cursor || !orderBy || orderBy.length === 0) return;\n\tassertCursorCompatibleOrder(orderBy);\n\tconst entries = [];\n\tfor (const order of orderBy) {\n\t\tif (order.expr.kind !== \"column-ref\") throw new InternalError(\"assertCursorCompatibleOrder admits only column orders\");\n\t\tconst column = order.expr.column;\n\t\tconst value = cursor[column];\n\t\tif (value === void 0) throw ormError(\"ORM.CURSOR_VALUE_MISSING\", `Missing cursor value for orderBy column \"${column}\"`, { meta: { column } });\n\t\tentries.push({\n\t\t\tcolumn,\n\t\t\tdirection: order.dir,\n\t\t\tvalue\n\t\t});\n\t}\n\tconst firstEntry = entries[0];\n\tif (entries.length === 1 && firstEntry !== void 0) return createBoundaryExpr(tableName, firstEntry);\n\treturn buildLexicographicCursorWhere(tableName, entries);\n}\nfunction createTableRefRemapper$1(fromTable, toTable) {\n\treturn {\n\t\tcolumnRef: (col) => col.table === fromTable ? ColumnRef.of(toTable, col.column) : col,\n\t\ttableSource: (source) => {\n\t\t\tif (source.alias === fromTable) return TableSource.named(source.name, toTable, source.namespaceId);\n\t\t\tif (!source.alias && source.name === fromTable) return TableSource.named(source.name, toTable, source.namespaceId);\n\t\t\treturn source;\n\t\t},\n\t\teqColJoinOn: (on) => EqColJoinOn.of(on.left.table === fromTable ? ColumnRef.of(toTable, on.left.column) : on.left, on.right.table === fromTable ? ColumnRef.of(toTable, on.right.column) : on.right)\n\t};\n}\nfunction buildStateWhere(contract, tableName, state, options) {\n\tconst filterTableName = options?.filterTableName;\n\tconst cursorWhere = buildCursorWhere(filterTableName ?? tableName, state.orderBy, state.cursor);\n\tconst boundFilters = state.filters.map((filter) => bindWhereExpr(contract, filter, options?.namespaceId));\n\tconst remappedFilters = filterTableName && filterTableName !== tableName ? boundFilters.map((filter) => filter.rewrite(createTableRefRemapper$1(filterTableName, tableName))) : boundFilters;\n\tconst boundCursorWhere = cursorWhere ? bindWhereExpr(contract, cursorWhere, options?.namespaceId) : void 0;\n\tconst remappedCursorWhere = boundCursorWhere && filterTableName && filterTableName !== tableName ? boundCursorWhere.rewrite(createTableRefRemapper$1(filterTableName, tableName)) : boundCursorWhere;\n\treturn combineWhereExprs(remappedCursorWhere ? [...remappedFilters, remappedCursorWhere] : remappedFilters);\n}\n/**\n* Wrap a base SELECT in a `ROW_NUMBER() OVER (PARTITION BY … ORDER BY …) = 1`\n* filter, implementing Prisma-style `.distinct(cols)` semantics: one\n* representative row per `(distinctColumnRefs)` group is kept; the rest\n* are dropped.\n*\n* Picking which row survives in each partition is governed by\n* `rankingOrderBy`. When the caller's `orderBy` doesn't fully order rows\n* within a partition (e.g. user wrote `.distinct('title')` with no\n* `orderBy`, or ties in their ordering), the choice is\n* implementation-defined — matching Prisma's documented nested-distinct\n* behaviour. Callers that want determinism should pass an `orderBy` that\n* is total within each partition.\n*\n* The wrapper forwards every column of `base.projection` through the\n* derived alias, so the wrapper's projection is byte-identical in alias\n* names — making this transparent to any outer query (`json_agg`,\n* correlated subquery, top-level SELECT) that consumes the SELECT.\n*/\nfunction wrapWithRowNumberDedup(options) {\n\tconst { base, distinctColumnRefs, rankingOrderBy, rankedAlias } = options;\n\tconst rnAlias = \"__prisma_distinct_rn\";\n\tconst effectiveOrderBy = rankingOrderBy.length > 0 ? rankingOrderBy : distinctColumnRefs.map((expr) => OrderByItem.asc(expr));\n\tconst inner = base.withProjection([...base.projection, ProjectionItem.of(rnAlias, WindowFuncExpr.rowNumber({\n\t\tpartitionBy: distinctColumnRefs,\n\t\torderBy: effectiveOrderBy\n\t}))]);\n\treturn SelectAst.from(DerivedTableSource.as(rankedAlias, inner)).withProjection(base.projection.map((item) => ProjectionItem.of(item.alias, ColumnRef.of(rankedAlias, item.alias), item.codec))).withWhere(BinaryExpr.eq(ColumnRef.of(rankedAlias, rnAlias), LiteralExpr.of(1)));\n}\n/**\n* FROM source + WHERE for `state.distinct`: wraps in a `ROW_NUMBER`-ranked\n* derived table aliased back to `tableName`, so callers need no rewriting.\n*/\nfunction buildDedupedTableSource(contract, namespaceId, tableName, state, where, wrapProjection, joins) {\n\tif (!hasEntries(state.distinct)) return {\n\t\tsource: tableSourceForContract(contract, namespaceId, tableName),\n\t\twhere\n\t};\n\tconst distinctColumnRefs = state.distinct.map((column) => ColumnRef.of(tableName, column));\n\tconst rankingOrderBy = hasEntries(state.orderBy) ? state.orderBy : distinctColumnRefs.map((expr) => OrderByItem.asc(expr));\n\tlet inner = SelectAst.from(tableSourceForContract(contract, namespaceId, tableName)).withProjection([...wrapProjection, ProjectionItem.of(\"__prisma_distinct_rn\", WindowFuncExpr.rowNumber({\n\t\tpartitionBy: distinctColumnRefs,\n\t\torderBy: rankingOrderBy\n\t}))]);\n\tif (joins && joins.length > 0) inner = inner.withJoins(joins);\n\tif (where) inner = inner.withWhere(where);\n\treturn {\n\t\tsource: DerivedTableSource.as(tableName, inner),\n\t\twhere: BinaryExpr.eq(ColumnRef.of(tableName, \"__prisma_distinct_rn\"), LiteralExpr.of(1))\n\t};\n}\nfunction buildPrimaryKeyJoinOn(leftTable, rightTable, primaryKeyColumns) {\n\tconst [firstColumn] = primaryKeyColumns;\n\tif (primaryKeyColumns.length === 1 && firstColumn !== void 0) return EqColJoinOn.of(ColumnRef.of(leftTable, firstColumn), ColumnRef.of(rightTable, firstColumn));\n\treturn AndExpr.of(primaryKeyColumns.map((column) => BinaryExpr.eq(ColumnRef.of(leftTable, column), ColumnRef.of(rightTable, column))));\n}\nfunction buildMtiJoins(contract, namespaceId, polyInfo, variantName, selectedColumnsByTable) {\n\tconst joins = [];\n\tconst projection = [];\n\tconst variantsToJoin = variantName ? polyInfo.mtiVariants.filter((v) => v.modelName === variantName) : polyInfo.mtiVariants;\n\tif (variantsToJoin.length === 0) return {\n\t\tjoins,\n\t\tprojection\n\t};\n\tconst pkColumns = resolvePrimaryKeyColumns(contract, namespaceId, polyInfo.baseTable);\n\tfor (const variant of variantsToJoin) {\n\t\tconst joinType = variantName ? \"inner\" : \"left\";\n\t\tconst joinOn = buildPrimaryKeyJoinOn(polyInfo.baseTable, variant.table, pkColumns);\n\t\tconst join = joinType === \"inner\" ? JoinAst.inner(tableSourceForContract(contract, namespaceId, variant.table), joinOn) : JoinAst.left(tableSourceForContract(contract, namespaceId, variant.table), joinOn);\n\t\tjoins.push(join);\n\t\tconst variantColumns = resolveTableColumns(contract, namespaceId, variant.table);\n\t\tconst selectedVariantColumns = selectedColumnsByTable?.get(variant.table);\n\t\tfor (const col of variantColumns) {\n\t\t\tif (pkColumns.includes(col)) continue;\n\t\t\tif (selectedColumnsByTable !== void 0 && selectedVariantColumns?.has(col) !== true) continue;\n\t\t\tconst alias = `${variant.table}__${col}`;\n\t\t\tprojection.push(ProjectionItem.of(alias, ColumnRef.of(variant.table, col), codecRefForStorageColumn(contract.storage, namespaceId, variant.table, col)));\n\t\t}\n\t}\n\treturn {\n\t\tjoins,\n\t\tprojection\n\t};\n}\nfunction hasEntries(value) {\n\treturn value !== void 0 && value.length > 0;\n}\n/**\n* The rows an aggregate reduces over, one SELECT aliased to `tableName` — an\n* aggregate has no outer level of its own, so where/joins/distinct/orderBy/\n* limit/offset all have to live in this one wrap.\n*/\nfunction buildAggregateInput(contract, namespaceId, tableName, state, modelName, projection) {\n\tconst polyInfo = modelName ? resolvePolymorphismInfo(contract, namespaceId, modelName) : void 0;\n\tconst variantJoins = polyInfo && polyInfo.mtiVariants.length > 0 ? buildMtiJoins(contract, namespaceId, polyInfo, state.variantName, void 0).joins : [];\n\tconst where = buildStateWhere(contract, tableName, state, { namespaceId });\n\tconst hiddenOrders = hasEntries(state.distinct) ? projectExpressionOrders(tableName, state.orderBy) : void 0;\n\tconst { source, where: effectiveWhere } = buildDedupedTableSource(contract, namespaceId, tableName, state, where, [...projection, ...hiddenOrders?.projection ?? []], variantJoins);\n\tlet inner = SelectAst.from(source).withProjection(projection);\n\tif (!hasEntries(state.distinct) && variantJoins.length > 0) inner = inner.withJoins(variantJoins);\n\tif (effectiveWhere) inner = inner.withWhere(effectiveWhere);\n\tif (hasEntries(state.distinctOn)) inner = inner.withDistinctOn(state.distinctOn.map((column) => ColumnRef.of(tableName, column)));\n\tconst orderBy = hiddenOrders?.orderBy ?? state.orderBy;\n\tif (hasEntries(orderBy)) inner = inner.withOrderBy(orderBy);\n\tif (state.limit !== void 0) inner = inner.withLimit(state.limit);\n\tif (state.offset !== void 0) inner = inner.withOffset(state.offset);\n\treturn { source: DerivedTableSource.as(tableName, inner) };\n}\n/**\n* The dedup wrap exposes only its projection, so an order over an expression (a relation order, a count, an operation result) cannot be evaluated above it. Each such order is projected inside the wrap as a hidden `__order_N` column and the outer order reads that column.\n*/\nfunction projectExpressionOrders(tableName, orderBy) {\n\tconst projection = [];\n\treturn {\n\t\tprojection,\n\t\torderBy: (orderBy ?? []).map((item, index) => {\n\t\t\tif (item.expr.kind === \"column-ref\") return item;\n\t\t\tconst alias = `__order_${index}`;\n\t\t\tprojection.push(ProjectionItem.of(alias, item.expr));\n\t\t\treturn item.withExpr(ColumnRef.of(tableName, alias));\n\t\t})\n\t};\n}\n//#endregion\n//#region src/predicate-comparison.ts\nfunction predicateComparison(op, left, right) {\n\tconst nullable = (right.kind === \"list\" ? [left, ...right.values] : [left, right]).find((operand) => operand.kind === \"prepared-param-ref\" && operand.nullable);\n\tif (nullable?.kind !== \"prepared-param-ref\") return new BinaryExpr(op, left, right);\n\tif (op === \"eq\" || op === \"neq\") return new BinaryExpr(op === \"eq\" ? \"isNotDistinctFrom\" : \"isDistinctFrom\", left, right);\n\tthrow ormError(\"ORM.FILTER_UNSUPPORTED\", `Structured ORM ${op} comparisons do not support nullable prepared parameter \"${nullable.name}\"`, { meta: { parameter: nullable.name } });\n}\n//#endregion\n//#region src/predicate-expression.ts\nfunction predicateExpression(value) {\n\tif (isExpression(value)) return value.buildAst();\n}\n//#endregion\n//#region src/types.ts\nfunction emptyState() {\n\treturn {\n\t\tfilters: [],\n\t\tincludes: [],\n\t\torderBy: void 0,\n\t\tcursor: void 0,\n\t\tdistinct: void 0,\n\t\tdistinctOn: void 0,\n\t\tselectedFields: void 0,\n\t\tlimit: void 0,\n\t\toffset: void 0,\n\t\tvariantName: void 0,\n\t\tlocking: void 0,\n\t\tannotations: /* @__PURE__ */ new Map()\n\t};\n}\nfunction emptyGroupPagingState() {\n\treturn {\n\t\torderBy: [],\n\t\tlimit: void 0,\n\t\toffset: void 0\n\t};\n}\nfunction param(codec, value) {\n\tconst expression = predicateExpression(value);\n\tif (expression !== void 0) return expression;\n\tif (codec === void 0) return ParamRef.of(value);\n\treturn ParamRef.of(value, { codec });\n}\nfunction paramList(codec, values) {\n\treturn ListExpression.of(values.map((value) => param(codec, value)));\n}\nfunction scalarComparisonMethod(op) {\n\treturn ((left, codec) => (value) => {\n\t\tif (value === null && (op === \"eq\" || op === \"neq\")) return op === \"eq\" ? NullCheckExpr.isNull(left) : NullCheckExpr.isNotNull(left);\n\t\treturn predicateComparison(op, left, param(codec, value));\n\t});\n}\nfunction listComparisonMethod(op) {\n\treturn ((left, codec) => (values) => predicateComparison(op, left, paramList(codec, values)));\n}\n/**\n* Declares trait requirements and runtime factory for each comparison method.\n*\n* - `traits: []` means \"no trait required\" — always available\n* - Multi-trait: `traits: ['equality', 'order']` means BOTH traits are required\n*/\nconst COMPARISON_METHODS_META = {\n\teq: {\n\t\ttraits: [\"equality\"],\n\t\tcreate: scalarComparisonMethod(\"eq\")\n\t},\n\tneq: {\n\t\ttraits: [\"equality\"],\n\t\tcreate: scalarComparisonMethod(\"neq\")\n\t},\n\tin: {\n\t\ttraits: [\"equality\"],\n\t\tcreate: listComparisonMethod(\"in\")\n\t},\n\tnotIn: {\n\t\ttraits: [\"equality\"],\n\t\tcreate: listComparisonMethod(\"notIn\")\n\t},\n\tgt: {\n\t\ttraits: [\"order\"],\n\t\tcreate: scalarComparisonMethod(\"gt\")\n\t},\n\tlt: {\n\t\ttraits: [\"order\"],\n\t\tcreate: scalarComparisonMethod(\"lt\")\n\t},\n\tgte: {\n\t\ttraits: [\"order\"],\n\t\tcreate: scalarComparisonMethod(\"gte\")\n\t},\n\tlte: {\n\t\ttraits: [\"order\"],\n\t\tcreate: scalarComparisonMethod(\"lte\")\n\t},\n\tlike: {\n\t\ttraits: [\"textual\"],\n\t\tcreate: scalarComparisonMethod(\"like\")\n\t},\n\tasc: {\n\t\ttraits: [\"order\"],\n\t\tcreate: (left) => (options) => checkedOrderByItem(\"asc\", left, options)\n\t},\n\tdesc: {\n\t\ttraits: [\"order\"],\n\t\tcreate: (left) => (options) => checkedOrderByItem(\"desc\", left, options)\n\t},\n\tisNull: {\n\t\ttraits: [],\n\t\tcreate: (left) => () => NullCheckExpr.isNull(left)\n\t},\n\tisNotNull: {\n\t\ttraits: [],\n\t\tcreate: (left) => () => NullCheckExpr.isNotNull(left)\n\t}\n};\n//#endregion\n//#region src/query-plan-aggregate.ts\nfunction toAggregateProjection(contract, aggregates, namespaceId, tableName, selector) {\n\tconst { codec, input: inputCodec, lower } = resolveAggregate({\n\t\taggregates,\n\t\tcontract,\n\t\tnamespaceId,\n\t\ttableName,\n\t\tfn: selector.fn,\n\t\tcolumn: selector.column\n\t});\n\tconst inputExpr = selector.column === void 0 ? void 0 : ColumnRef.of(tableName, selector.column);\n\treturn {\n\t\texpr: lower !== void 0 ? lower({\n\t\t\texpr: inputExpr,\n\t\t\tinputCodec\n\t\t}) : plainAggregateExpr(selector.fn, inputExpr),\n\t\tcodec\n\t};\n}\nfunction validateGroupedComparable(value) {\n\tswitch (value.kind) {\n\t\tcase \"param-ref\": throw ormError(\"ORM.HAVING_EXPRESSION_UNSUPPORTED\", \"ParamRef is not supported in grouped having expressions\", { meta: { kind: value.kind } });\n\t\tcase \"prepared-param-ref\":\n\t\tcase \"literal\":\n\t\tcase \"column-ref\":\n\t\tcase \"identifier-ref\":\n\t\tcase \"aggregate\":\n\t\tcase \"operation\": return value;\n\t\tcase \"function-call\":\n\t\tcase \"cast\":\n\t\tcase \"case\": throw ormError(\"ORM.HAVING_EXPRESSION_UNSUPPORTED\", `Unsupported comparable kind in grouped having: \"${value.kind}\"`, { meta: { kind: value.kind } });\n\t\tcase \"list\":\n\t\t\tif (value.values.some((entry) => entry.kind === \"param-ref\")) throw ormError(\"ORM.HAVING_EXPRESSION_UNSUPPORTED\", \"ParamRef is not supported in grouped having expressions\", { meta: { kind: \"list\" } });\n\t\t\treturn value;\n\t\tdefault: throw ormError(\"ORM.HAVING_EXPRESSION_UNSUPPORTED\", `Unsupported comparable kind in grouped having: \"${value.kind}\"`, { meta: { kind: value.kind } });\n\t}\n}\nfunction validateGroupedMetricExpr(expr) {\n\tif (expr.kind !== \"aggregate\") throw ormError(\"ORM.HAVING_EXPRESSION_UNSUPPORTED\", \"groupBy().having() only supports aggregate metric expressions\", { meta: { kind: expr.kind } });\n\treturn expr;\n}\nfunction rejectHavingExpr(expr) {\n\tthrow ormError(\"ORM.HAVING_EXPRESSION_UNSUPPORTED\", `Unsupported grouped having expression kind \"${expr.kind}\"`, { meta: { kind: expr.kind } });\n}\nfunction validateGroupedHavingExpr(expr) {\n\treturn expr.accept({\n\t\tcolumnRef: rejectHavingExpr,\n\t\tidentifierRef: rejectHavingExpr,\n\t\tsubquery: rejectHavingExpr,\n\t\toperation: rejectHavingExpr,\n\t\taggregate: rejectHavingExpr,\n\t\twindowFunc: rejectHavingExpr,\n\t\tfunctionCall: rejectHavingExpr,\n\t\tcast: rejectHavingExpr,\n\t\tcase: rejectHavingExpr,\n\t\tjsonObject: rejectHavingExpr,\n\t\tjsonArrayAgg: rejectHavingExpr,\n\t\tliteral: rejectHavingExpr,\n\t\tparam() {\n\t\t\tthrow ormError(\"ORM.HAVING_EXPRESSION_UNSUPPORTED\", \"ParamRef is not supported in grouped having expressions\", { meta: { kind: \"param-ref\" } });\n\t\t},\n\t\tpreparedParam() {\n\t\t\tthrow ormError(\"ORM.HAVING_EXPRESSION_UNSUPPORTED\", \"PreparedParamRef is not supported in grouped having expressions\", { meta: { kind: \"prepared-param-ref\" } });\n\t\t},\n\t\tlist: rejectHavingExpr,\n\t\tand(expr) {\n\t\t\treturn AndExpr.of(expr.exprs.map((child) => validateGroupedHavingExpr(child)));\n\t\t},\n\t\tor(expr) {\n\t\t\treturn OrExpr.of(expr.exprs.map((child) => validateGroupedHavingExpr(child)));\n\t\t},\n\t\texists: rejectHavingExpr,\n\t\tnullCheck(expr) {\n\t\t\treturn new NullCheckExpr(validateGroupedMetricExpr(expr.expr), expr.isNull);\n\t\t},\n\t\tnot(expr) {\n\t\t\treturn new NotExpr(validateGroupedHavingExpr(expr.expr));\n\t\t},\n\t\tbinary(expr) {\n\t\t\treturn new BinaryExpr(expr.op, validateGroupedMetricExpr(expr.left), validateGroupedComparable(expr.right));\n\t\t},\n\t\trawExpr: rejectHavingExpr\n\t});\n}\nfunction aggregateInputColumns(tableName, entries, orderBy, groupByColumns = []) {\n\tconst columns = new Set(groupByColumns);\n\tfor (const [, selector] of entries) if (selector.column !== void 0) columns.add(selector.column);\n\tfor (const item of orderBy ?? []) if (item.expr.kind === \"column-ref\") columns.add(item.expr.column);\n\tif (columns.size === 0) return [ProjectionItem.of(\"__row\", LiteralExpr.of(1))];\n\treturn Array.from(columns, (column) => ProjectionItem.of(column, ColumnRef.of(tableName, column)));\n}\nfunction compileAggregate(contract, aggregates, namespaceId, tableName, state, aggregateSpec, modelName) {\n\tconst entries = Object.entries(aggregateSpec);\n\tif (entries.length === 0) throw ormError(\"ORM.AGGREGATE_SELECTOR_MISSING\", \"aggregate() requires at least one aggregation selector\", { meta: {\n\t\tmethod: \"aggregate\",\n\t\tnamespaceId,\n\t\ttableName\n\t} });\n\tif (state.distinctOn !== void 0 && state.distinctOn.length > 0) {\n\t\tassertDistinctOnCapability(contract, \"distinctOn\");\n\t\tassertDistinctOnCompatibleOrder(state.orderBy, state.distinctOn.length);\n\t}\n\tconst hasPagination = state.limit !== void 0 || state.offset !== void 0;\n\tconst hasDistinct = state.distinct !== void 0 && state.distinct.length > 0 || state.distinctOn !== void 0 && state.distinctOn.length > 0;\n\tif (hasPagination || hasDistinct) {\n\t\tconst { source } = buildAggregateInput(contract, namespaceId, tableName, state, modelName, aggregateInputColumns(tableName, entries, state.orderBy));\n\t\tconst projection = entries.map(([alias, selector]) => {\n\t\t\tconst { expr, codec } = toAggregateProjection(contract, aggregates, namespaceId, tableName, selector);\n\t\t\treturn ProjectionItem.of(alias, expr, codec);\n\t\t});\n\t\tconst ast = SelectAst.from(source).withProjection(projection);\n\t\tconst { params } = deriveParamsFromAst(ast);\n\t\treturn buildOrmQueryPlan(contract, ast, params);\n\t}\n\tconst polyInfo = modelName ? resolvePolymorphismInfo(contract, namespaceId, modelName) : void 0;\n\tconst variantJoins = polyInfo && polyInfo.mtiVariants.length > 0 ? buildMtiJoins(contract, namespaceId, polyInfo, state.variantName, void 0).joins : [];\n\tconst where = buildStateWhere(contract, tableName, state, { namespaceId });\n\tconst projection = entries.map(([alias, selector]) => {\n\t\tconst { expr, codec } = toAggregateProjection(contract, aggregates, namespaceId, tableName, selector);\n\t\treturn ProjectionItem.of(alias, expr, codec);\n\t});\n\tlet ast = SelectAst.from(tableSourceForContract(contract, namespaceId, tableName)).withProjection(projection);\n\tif (variantJoins.length > 0) ast = ast.withJoins(variantJoins);\n\tif (where) ast = ast.withWhere(where);\n\tconst { params } = deriveParamsFromAst(ast);\n\treturn buildOrmQueryPlan(contract, ast, params);\n}\nfunction compileGroupedAggregate(contract, aggregates, namespaceId, tableName, preGroupState, groupByColumns, aggregateSpec, havingExpr, modelName, postGroup = emptyGroupPagingState()) {\n\tif (groupByColumns.length === 0) throw ormError(\"ORM.GROUP_BY_FIELD_MISSING\", \"groupBy() requires at least one field\", { meta: {\n\t\tnamespaceId,\n\t\ttableName\n\t} });\n\tconst entries = Object.entries(aggregateSpec);\n\tif (entries.length === 0) throw ormError(\"ORM.AGGREGATE_SELECTOR_MISSING\", \"groupBy().aggregate() requires at least one aggregation selector\", { meta: {\n\t\tmethod: \"groupBy.aggregate\",\n\t\tnamespaceId,\n\t\ttableName\n\t} });\n\tif (preGroupState.distinctOn !== void 0 && preGroupState.distinctOn.length > 0) {\n\t\tassertDistinctOnCapability(contract, \"distinctOn\");\n\t\tassertDistinctOnCompatibleOrder(preGroupState.orderBy, preGroupState.distinctOn.length);\n\t}\n\tconst projection = [...groupByColumns.map((column) => ProjectionItem.of(column, ColumnRef.of(tableName, column), codecRefForStorageColumn(contract.storage, namespaceId, tableName, column))), ...entries.map(([alias, selector]) => {\n\t\tconst { expr, codec } = toAggregateProjection(contract, aggregates, namespaceId, tableName, selector);\n\t\treturn ProjectionItem.of(alias, expr, codec);\n\t})];\n\tconst hasPagination = preGroupState.limit !== void 0 || preGroupState.offset !== void 0;\n\tconst hasDistinct = preGroupState.distinct !== void 0 && preGroupState.distinct.length > 0 || preGroupState.distinctOn !== void 0 && preGroupState.distinctOn.length > 0;\n\tconst needsInputSelect = hasPagination || hasDistinct;\n\tlet ast;\n\tif (needsInputSelect) {\n\t\tconst { source } = buildAggregateInput(contract, namespaceId, tableName, preGroupState, modelName, aggregateInputColumns(tableName, entries, preGroupState.orderBy, groupByColumns));\n\t\tast = SelectAst.from(source).withProjection(projection).withGroupBy(groupByColumns.map((column) => ColumnRef.of(tableName, column)));\n\t} else {\n\t\tconst polyInfo = modelName ? resolvePolymorphismInfo(contract, namespaceId, modelName) : void 0;\n\t\tconst variantJoins = polyInfo && polyInfo.mtiVariants.length > 0 ? buildMtiJoins(contract, namespaceId, polyInfo, preGroupState.variantName, void 0).joins : [];\n\t\tast = SelectAst.from(tableSourceForContract(contract, namespaceId, tableName)).withProjection(projection).withGroupBy(groupByColumns.map((column) => ColumnRef.of(tableName, column)));\n\t\tif (variantJoins.length > 0) ast = ast.withJoins(variantJoins);\n\t\tconst where = buildStateWhere(contract, tableName, preGroupState, { namespaceId });\n\t\tif (where) ast = ast.withWhere(where);\n\t}\n\tif (havingExpr) ast = ast.withHaving(validateGroupedHavingExpr(havingExpr));\n\tif (postGroup.orderBy.length > 0) ast = ast.withOrderBy(postGroup.orderBy);\n\tif (postGroup.limit !== void 0) ast = ast.withLimit(postGroup.limit);\n\tif (postGroup.offset !== void 0) ast = ast.withOffset(postGroup.offset);\n\tconst { params } = deriveParamsFromAst(ast);\n\treturn buildOrmQueryPlan(contract, ast, params);\n}\n//#endregion\n//#region src/query-plan-mutations.ts\nfunction buildReturningColumns(contract, namespaceId, tableName, returningColumns) {\n\treturn (returningColumns && returningColumns.length > 0 ? [...returningColumns] : resolveTableColumns(contract, namespaceId, tableName)).map((column) => ProjectionItem.of(column, ColumnRef.of(tableName, column), codecRefForStorageColumn(contract.storage, namespaceId, tableName, column)));\n}\nfunction toParamAssignments(contract, namespaceId, tableName, values) {\n\tconst assignments = {};\n\tconst table = storageTableForContract(contract, namespaceId, tableName);\n\tfor (const [column, value] of Object.entries(values)) {\n\t\tif (!table.columns[column]) throw ormError(\"ORM.COLUMN_UNKNOWN\", `Unknown column \"${column}\" in table \"${tableName}\"`, { meta: {\n\t\t\tnamespaceId,\n\t\t\ttableName,\n\t\t\tcolumn\n\t\t} });\n\t\tconst codec = codecRefForStorageColumn(contract.storage, namespaceId, tableName, column);\n\t\tassignments[column] = ParamRef.of(value, {\n\t\t\tname: column,\n\t\t\t...ifDefined(\"codec\", codec)\n\t\t});\n\t}\n\treturn { assignments };\n}\nfunction normalizeInsertRows(contract, namespaceId, tableName, rows) {\n\tif (rows.length === 0) throw new InternalError(\"normalizeInsertRows requires at least one row\");\n\tconst orderedColumns = [];\n\tconst seenColumns = /* @__PURE__ */ new Set();\n\tfor (const row of rows) for (const column of Object.keys(row)) {\n\t\tif (seenColumns.has(column)) continue;\n\t\tseenColumns.add(column);\n\t\torderedColumns.push(column);\n\t}\n\tconst table = storageTableForContract(contract, namespaceId, tableName);\n\treturn { rows: rows.map((row) => {\n\t\tif (orderedColumns.length === 0) return {};\n\t\tconst normalizedRow = {};\n\t\tfor (const column of orderedColumns) {\n\t\t\tif (Object.hasOwn(row, column)) {\n\t\t\t\tif (!table.columns[column]) throw ormError(\"ORM.COLUMN_UNKNOWN\", `Unknown column \"${column}\" in table \"${tableName}\"`, { meta: {\n\t\t\t\t\tnamespaceId,\n\t\t\t\t\ttableName,\n\t\t\t\t\tcolumn\n\t\t\t\t} });\n\t\t\t\tconst codec = codecRefForStorageColumn(contract.storage, namespaceId, tableName, column);\n\t\t\t\tnormalizedRow[column] = ParamRef.of(row[column], {\n\t\t\t\t\tname: column,\n\t\t\t\t\t...ifDefined(\"codec\", codec)\n\t\t\t\t});\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tnormalizedRow[column] = new DefaultValueExpr();\n\t\t}\n\t\treturn normalizedRow;\n\t}) };\n}\nfunction conflictSkipClause(tableName, conflictSkip) {\n\tif (!conflictSkip) return void 0;\n\tif (conflictSkip.columns.length === 0) return InsertOnConflict.doNothing();\n\treturn InsertOnConflict.on(conflictSkip.columns.map((column) => ColumnRef.of(tableName, column))).doNothing();\n}\nfunction compileInsertReturning(contract, namespaceId, tableName, rows, returningColumns, conflictSkip) {\n\tconst { rows: normalizedRows } = normalizeInsertRows(contract, namespaceId, tableName, rows);\n\tconst ast = InsertAst.into(tableSourceForContract(contract, namespaceId, tableName)).withRows(normalizedRows).withOnConflict(conflictSkipClause(tableName, conflictSkip)).withReturning(buildReturningColumns(contract, namespaceId, tableName, returningColumns));\n\tconst { params } = deriveParamsFromAst(ast);\n\treturn buildOrmQueryPlan(contract, ast, params);\n}\nfunction compileInsertCount(contract, namespaceId, tableName, rows, conflictSkip) {\n\tconst { rows: normalizedRows } = normalizeInsertRows(contract, namespaceId, tableName, rows);\n\tconst ast = InsertAst.into(tableSourceForContract(contract, namespaceId, tableName)).withRows(normalizedRows).withOnConflict(conflictSkipClause(tableName, conflictSkip));\n\tconst { params } = deriveParamsFromAst(ast);\n\treturn buildOrmQueryPlan(contract, ast, params);\n}\nfunction stripUndefinedValues(row) {\n\tconst result = {};\n\tfor (const [key, value] of Object.entries(row)) if (value !== void 0) result[key] = value;\n\treturn result;\n}\nfunction createTableRefRemapper(fromTable, toTable) {\n\treturn {\n\t\tcolumnRef: (col) => col.table === fromTable ? ColumnRef.of(toTable, col.column) : col,\n\t\ttableSource: (source) => {\n\t\t\tif (source.alias === fromTable) return TableSource.named(source.name, toTable, source.namespaceId);\n\t\t\tif (!source.alias && source.name === fromTable) return TableSource.named(source.name, toTable, source.namespaceId);\n\t\t\treturn source;\n\t\t},\n\t\teqColJoinOn: (on) => EqColJoinOn.of(on.left.table === fromTable ? ColumnRef.of(toTable, on.left.column) : on.left, on.right.table === fromTable ? ColumnRef.of(toTable, on.right.column) : on.right)\n\t};\n}\nfunction buildCountMutationWhere(contract, namespaceId, tableName, filters, variantName, modelName) {\n\tif (!variantName || !modelName) return combineWhereExprs(filters);\n\tconst polyInfo = resolvePolymorphismInfo(contract, namespaceId, modelName);\n\tconst variant = polyInfo?.variants.get(variantName);\n\tif (!polyInfo || !variant || variant.strategy !== \"mti\") return combineWhereExprs(filters);\n\tconst pkColumns = resolvePrimaryKeyColumns(contract, namespaceId, tableName);\n\tconst baseTableRef = `${tableName}__write_filter`;\n\tconst remapper = createTableRefRemapper(tableName, baseTableRef);\n\tconst innerFilters = filters.map((filter) => filter.rewrite(remapper));\n\tconst where = combineWhereExprs([...pkColumns.map((column) => BinaryExpr.eq(ColumnRef.of(baseTableRef, column), ColumnRef.of(tableName, column))), ...innerFilters]);\n\tconst joinOn = buildPrimaryKeyJoinOn(baseTableRef, variant.table, pkColumns);\n\tlet subquery = SelectAst.from(TableSource.named(tableName, baseTableRef, namespaceId)).withProjection(pkColumns.map((column) => ProjectionItem.of(column, ColumnRef.of(baseTableRef, column)))).withJoins([JoinAst.inner(tableSourceForContract(contract, namespaceId, variant.table), joinOn)]);\n\tif (where) subquery = subquery.withWhere(where);\n\treturn ExistsExpr.exists(subquery);\n}\nfunction groupRowsByColumnSignature(rows) {\n\tconst groups = [];\n\tlet currentKey = \"\";\n\tlet currentGroup = [];\n\tfor (const rawRow of rows) {\n\t\tconst row = stripUndefinedValues(rawRow);\n\t\tconst key = Object.keys(row).sort().join(\",\");\n\t\tif (key !== currentKey || currentGroup.length === 0) {\n\t\t\tif (currentGroup.length > 0) groups.push(currentGroup);\n\t\t\tcurrentKey = key;\n\t\t\tcurrentGroup = [row];\n\t\t} else currentGroup.push(row);\n\t}\n\tif (currentGroup.length > 0) groups.push(currentGroup);\n\treturn groups;\n}\nfunction compileInsertReturningSplit(contract, namespaceId, tableName, rows, returningColumns, conflictSkip) {\n\tif (rows.length === 0) throw ormError(\"ORM.MUTATION_DATA_MISSING\", \"create() requires at least one row\", { meta: {\n\t\tmethod: \"create\",\n\t\tnamespaceId,\n\t\ttableName\n\t} });\n\treturn groupRowsByColumnSignature(rows).map((group) => compileInsertReturning(contract, namespaceId, tableName, group, returningColumns, conflictSkip));\n}\nfunction compileInsertCountSplit(contract, namespaceId, tableName, rows, conflictSkip) {\n\tif (rows.length === 0) throw ormError(\"ORM.MUTATION_DATA_MISSING\", \"createAndCount() requires at least one row\", { meta: {\n\t\tmethod: \"createAndCount\",\n\t\tnamespaceId,\n\t\ttableName\n\t} });\n\treturn groupRowsByColumnSignature(rows).map((group) => compileInsertCount(contract, namespaceId, tableName, group, conflictSkip));\n}\nfunction compileUpsertReturning(contract, namespaceId, tableName, createValues, updateValues, conflictColumns, returningColumns) {\n\tconst createAssignments = toParamAssignments(contract, namespaceId, tableName, createValues);\n\tconst updateAssignments = Object.keys(updateValues).length > 0 ? toParamAssignments(contract, namespaceId, tableName, updateValues) : void 0;\n\tconst onConflict = updateAssignments ? InsertOnConflict.on(conflictColumns.map((column) => ColumnRef.of(tableName, column))).doUpdateSet(updateAssignments.assignments) : InsertOnConflict.on(conflictColumns.map((column) => ColumnRef.of(tableName, column))).doNothing();\n\tconst ast = InsertAst.into(tableSourceForContract(contract, namespaceId, tableName)).withRows([createAssignments.assignments]).withOnConflict(onConflict).withReturning(buildReturningColumns(contract, namespaceId, tableName, returningColumns));\n\tconst { params } = deriveParamsFromAst(ast);\n\treturn buildOrmQueryPlan(contract, ast, params);\n}\nfunction compileUpdateReturning(contract, namespaceId, tableName, setValues, filters, returningColumns) {\n\tconst where = combineWhereExprs(filters);\n\tconst { assignments } = toParamAssignments(contract, namespaceId, tableName, setValues);\n\tlet ast = UpdateAst.table(tableSourceForContract(contract, namespaceId, tableName)).withSet(assignments).withReturning(buildReturningColumns(contract, namespaceId, tableName, returningColumns));\n\tif (where) ast = ast.withWhere(where);\n\tconst { params } = deriveParamsFromAst(ast);\n\treturn buildOrmQueryPlan(contract, ast, params);\n}\nfunction compileUpdateCount(contract, namespaceId, tableName, setValues, filters, variantName, modelName) {\n\tconst where = buildCountMutationWhere(contract, namespaceId, tableName, filters, variantName, modelName);\n\tconst { assignments } = toParamAssignments(contract, namespaceId, tableName, setValues);\n\tlet ast = UpdateAst.table(tableSourceForContract(contract, namespaceId, tableName)).withSet(assignments);\n\tif (where) ast = ast.withWhere(where);\n\tconst { params } = deriveParamsFromAst(ast);\n\treturn buildOrmQueryPlan(contract, ast, params);\n}\nfunction compileDeleteReturning(contract, namespaceId, tableName, filters, returningColumns) {\n\tconst where = combineWhereExprs(filters);\n\tlet ast = DeleteAst.from(tableSourceForContract(contract, namespaceId, tableName)).withReturning(buildReturningColumns(contract, namespaceId, tableName, returningColumns));\n\tif (where) ast = ast.withWhere(where);\n\tconst { params } = deriveParamsFromAst(ast);\n\treturn buildOrmQueryPlan(contract, ast, params);\n}\nfunction compileDeleteCount(contract, namespaceId, tableName, filters, variantName, modelName) {\n\tconst where = buildCountMutationWhere(contract, namespaceId, tableName, filters, variantName, modelName);\n\tlet ast = DeleteAst.from(tableSourceForContract(contract, namespaceId, tableName));\n\tif (where) ast = ast.withWhere(where);\n\tconst { params } = deriveParamsFromAst(ast);\n\treturn buildOrmQueryPlan(contract, ast, params);\n}\n//#endregion\n//#region src/lock-guards.ts\nfunction includeCarriesLock(include) {\n\treturn [\n\t\tinclude.nested,\n\t\t...include.scalar === void 0 ? [] : [include.scalar.state],\n\t\t...Object.values(include.combine ?? {}).map((branch) => branch.kind === \"rows\" ? branch.state : branch.selector.state)\n\t].some(stateCarriesLock);\n}\nfunction stateCarriesLock(state) {\n\treturn state.locking !== void 0 || state.includes.some(includeCarriesLock);\n}\nfunction conflictOf(state, call) {\n\tif (state.includes.some(includeCarriesLock)) return \"includeRefinement\";\n\tif (state.locking === void 0) return void 0;\n\tif (call !== void 0) return call;\n\tif (state.includes.length > 0) return \"include\";\n\tif (state.distinct !== void 0 && state.distinct.length > 0) return \"distinct\";\n\tif (state.distinctOn !== void 0 && state.distinctOn.length > 0) return \"distinctOn\";\n}\n/** Refuses a row lock the ORM cannot render: inside an include, with include, distinct or distinctOn in the state, or before a call that drops it. */\nfunction assertLockCompatible(state, call) {\n\tconst conflict = conflictOf(state, call);\n\tif (conflict !== void 0) throw lockIncompatible(conflict, `A locking clause cannot be combined with ${conflict}`);\n}\n//#endregion\n//#region src/selection-shaping.ts\nfunction augmentSelectionForJoinColumns(selectedFields, requiredColumns) {\n\tif (!selectedFields) return {\n\t\tselectedForQuery: selectedFields,\n\t\thiddenColumns: []\n\t};\n\tconst hiddenColumns = requiredColumns.filter((column) => !selectedFields.includes(column));\n\tif (hiddenColumns.length === 0) return {\n\t\tselectedForQuery: selectedFields,\n\t\thiddenColumns: []\n\t};\n\treturn {\n\t\tselectedForQuery: [...selectedFields, ...hiddenColumns],\n\t\thiddenColumns\n\t};\n}\n//#endregion\n//#region src/query-plan-select.ts\n/**\n* The rule for which JSON projection variant an include entry carries. Every\n* site that puts a value into a `json_build_object` or a `json_agg` goes\n* through here, and the renderers read the variant to decide how the value\n* reaches JSON.\n*\n* - `codec`: the value is a column whose storage codec is known, so the\n* renderer can ask that codec's descriptor for the projection producing its\n* canonical JSON. The `CodecRef` is resolved at planning time by\n* `codecRefForStorageColumn` and carried on the `ProjectionItem` through\n* every wrap between the column and here.\n* - `document`: the value is already a JSON document — a nested include's\n* correlated subquery, a combine branch, or the object a child row set is\n* aggregated from. Its parts were made canonical at the level that produced\n* them; this level only nests it.\n* - `native`: the value has no codec identity. The case that reaches it is an\n* aggregate the target declares no overload for — SQLite computes `sum` over\n* a text column from whatever leading numbers the rows held, and declines to\n* type the result. Native is what a value with no codec identity means, which\n* is a different thing from defaulting a codec to identity — that, the\n* project forbids. An aggregate the target does declare carries the codec the\n* registry resolved for it, like any other value.\n*\n* A document never carries a codec and a codec-bearing column is never a\n* document, so the first two cases cannot both apply.\n*/\nfunction jsonEntryProjection(value, identity) {\n\tif (identity.codec !== void 0) return new CodecJsonValueProjection(value, identity.codec);\n\tif (identity.document === true) return new JsonDocumentProjection(value);\n\treturn new NativeJsonValueProjection(value);\n}\nfunction buildProjection(contract, namespaceId, tableName, selectedFields, tableRef = tableName) {\n\treturn (selectedFields !== void 0 ? [...selectedFields] : resolveTableColumns(contract, namespaceId, tableName)).map((column) => ProjectionItem.of(column, ColumnRef.of(tableRef, column), codecRefForStorageColumn(contract.storage, namespaceId, tableName, column)));\n}\nfunction appendUnique(values, value) {\n\tif (!values.includes(value)) values.push(value);\n}\nfunction resolvePolymorphicProjectionSelection(contract, namespaceId, modelName, polyInfo, state) {\n\tif (state.selectedFields === void 0) return {\n\t\tbaseSelectedFields: void 0,\n\t\tselectedMtiColumnsByTable: void 0,\n\t\tneedsHiddenDiscriminator: false\n\t};\n\tconst baseTableColumns = new Set(resolveTableColumns(contract, namespaceId, polyInfo.baseTable));\n\tconst baseFieldToColumn = getFieldToColumnMap(contract, namespaceId, modelName);\n\tconst variantFieldMaps = Array.from(polyInfo.variants.values(), (variant) => ({\n\t\tvariant,\n\t\tcolumnToField: getCompleteColumnToFieldMap(contract, namespaceId, variant.modelName)\n\t}));\n\tconst baseSelectedFields = [];\n\tconst selectedMtiColumnsByTable = /* @__PURE__ */ new Map();\n\tlet hasVariantOwnedSelection = false;\n\tfor (const selectedField of state.selectedFields) {\n\t\tconst baseColumn = baseFieldToColumn[selectedField] ?? (baseTableColumns.has(selectedField) ? selectedField : void 0);\n\t\tif (baseColumn !== void 0) appendUnique(baseSelectedFields, baseColumn);\n\t\tlet matchedVariantField = false;\n\t\tfor (const { variant, columnToField } of variantFieldMaps) for (const [column, field] of Object.entries(columnToField)) {\n\t\t\tif (selectedField !== field && selectedField !== column) continue;\n\t\t\tmatchedVariantField = true;\n\t\t\thasVariantOwnedSelection = true;\n\t\t\tif (variant.strategy === \"sti\") {\n\t\t\t\tappendUnique(baseSelectedFields, column);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tlet selectedColumns = selectedMtiColumnsByTable.get(variant.table);\n\t\t\tif (selectedColumns === void 0) {\n\t\t\t\tselectedColumns = /* @__PURE__ */ new Set();\n\t\t\t\tselectedMtiColumnsByTable.set(variant.table, selectedColumns);\n\t\t\t}\n\t\t\tselectedColumns.add(column);\n\t\t}\n\t\tif (baseColumn === void 0 && !matchedVariantField) appendUnique(baseSelectedFields, selectedField);\n\t}\n\treturn {\n\t\tbaseSelectedFields,\n\t\tselectedMtiColumnsByTable,\n\t\tneedsHiddenDiscriminator: state.variantName === void 0 && hasVariantOwnedSelection && !baseSelectedFields.includes(polyInfo.discriminatorColumn)\n\t};\n}\nfunction buildHiddenDiscriminatorProjection(contract, namespaceId, polyInfo, tableRef, needed) {\n\tif (!needed) return [];\n\treturn [ProjectionItem.of(POLYMORPHIC_DISCRIMINATOR_ALIAS, ColumnRef.of(tableRef, polyInfo.discriminatorColumn), codecRefForStorageColumn(contract.storage, namespaceId, polyInfo.baseTable, polyInfo.discriminatorColumn))];\n}\nfunction buildIncludeOrderArtifacts(relationName, rowAlias, childOrderBy) {\n\tif (!childOrderBy || childOrderBy.length === 0) return {\n\t\tchildOrderBy: void 0,\n\t\thiddenOrderProjection: [],\n\t\taggregateOrderBy: void 0\n\t};\n\tconst hiddenOrderProjection = childOrderBy.map((orderItem, index) => ProjectionItem.of(`${relationName}__order_${index}`, orderItem.expr));\n\treturn {\n\t\tchildOrderBy,\n\t\thiddenOrderProjection,\n\t\taggregateOrderBy: hiddenOrderProjection.map((projection, index) => {\n\t\t\tconst orderItem = childOrderBy[index];\n\t\t\tif (!orderItem) throw new InternalError(`Missing include order metadata at index ${index}`);\n\t\t\treturn orderItem.withExpr(ColumnRef.of(rowAlias, projection.alias));\n\t\t})\n\t};\n}\nfunction localColumnsForRowInclude(include) {\n\treturn include.through?.parentLocalColumns ?? include.localColumns;\n}\nfunction buildIncludeJoinExpr(include, childTableRef, parentLocalRefs) {\n\tinvariant(parentLocalRefs.length === include.targetColumns.length, `Include '${include.relationName}' has mismatched join column counts: ${parentLocalRefs.length} local, ${include.targetColumns.length} target`);\n\tconst joinExprs = include.targetColumns.map((targetColumn, i) => {\n\t\tconst parentLocalRef = parentLocalRefs[i];\n\t\tassertDefined(parentLocalRef, `Include '${include.relationName}': no local column at ${i}`);\n\t\treturn BinaryExpr.eq(ColumnRef.of(childTableRef, targetColumn), parentLocalRef);\n\t});\n\tconst [firstExpr] = joinExprs;\n\tassertDefined(firstExpr, `Include '${include.relationName}' has no join columns`);\n\treturn joinExprs.length === 1 ? firstExpr : AndExpr.of(joinExprs);\n}\nfunction resolveParentLocalRefs(parentSource, include, localColumns) {\n\treturn localColumns.map((column) => {\n\t\tif (include.localTableName === parentSource.baseTableName) return ColumnRef.of(parentSource.tableRef, column);\n\t\tif (parentSource.variantColumnsProjected) return ColumnRef.of(parentSource.tableRef, `${include.localTableName}__${column}`);\n\t\treturn ColumnRef.of(include.localTableName, column);\n\t});\n}\nfunction resolveChildTableSource(include, parentLocalRefs) {\n\tconst alias = parentLocalRefs.some((ref) => ref.table === include.relatedTableName) ? `${include.relationName}__child` : void 0;\n\treturn {\n\t\talias,\n\t\ttableRef: alias ?? include.relatedTableName\n\t};\n}\n/**\n* Recursively build the correlated-subquery projections for the nested\n* includes attached to a child SELECT. Used by `buildIncludeChildRowsSelect`\n* to wire depth-2+ aggregates into the inner SELECT at each level.\n*\n* Each nested include contributes a single projection item whose\n* expression is a correlated subquery.\n*/\nfunction buildNestedIncludeProjections(contract, aggregates, parentSource, includes) {\n\treturn includes.map((nested) => buildCorrelatedIncludeProjection(contract, aggregates, parentSource, nested).projection);\n}\n/**\n* The aliases a level's nested includes contribute. Each such subquery\n* projects a JSON document — an object for a scalar include, an array of\n* objects for a row include — which is what tells the enclosing level to nest\n* the value rather than convert it.\n*/\nfunction documentAliasesOf(nestedProjections) {\n\treturn new Set(nestedProjections.map((item) => item.alias));\n}\n/**\n* Resolve the MTI variant joins + `variant_table__column` projection for an\n* include whose target model is polymorphic, mirroring the parent path in\n* `compileSelectWithIncludes`. The discriminator column and any STI\n* variant-specific columns live on the base table and reach the row through\n* the ordinary base-column projection (`buildProjection`); only the MTI\n* variant tables need a join.\n*\n* When the child base table is aliased (self-relations), `buildMtiJoins`\n* emits a join `ON` against the unaliased base table name, which would fall\n* out of scope. Remap it to the child alias — the same remap the row builder\n* already applies to `orderBy`/`where`.\n*/\nfunction buildChildPolymorphismJoinsAndProjection(contract, include, childTableAlias, childTableRef) {\n\tconst polyInfo = resolvePolymorphismInfo(contract, include.relatedNamespaceId, include.relatedModelName);\n\tif (!polyInfo) return {\n\t\tjoins: [],\n\t\tprojection: [],\n\t\thiddenProjection: [],\n\t\tbaseSelectedFields: include.nested.selectedFields\n\t};\n\tconst selection = resolvePolymorphicProjectionSelection(contract, include.relatedNamespaceId, include.relatedModelName, polyInfo, include.nested);\n\tconst { joins, projection } = buildMtiJoins(contract, include.relatedNamespaceId, polyInfo, include.nested.variantName, selection.selectedMtiColumnsByTable);\n\tconst hiddenProjection = buildHiddenDiscriminatorProjection(contract, include.relatedNamespaceId, polyInfo, childTableRef, selection.needsHiddenDiscriminator);\n\tif (!childTableAlias) return {\n\t\tjoins,\n\t\tprojection,\n\t\thiddenProjection,\n\t\tbaseSelectedFields: selection.baseSelectedFields\n\t};\n\tconst remapper = createTableRefRemapper$1(polyInfo.baseTable, childTableRef);\n\treturn {\n\t\tjoins: joins.map((join) => join.rewrite(remapper)),\n\t\tprojection,\n\t\thiddenProjection,\n\t\tbaseSelectedFields: selection.baseSelectedFields\n\t};\n}\nfunction buildRequiredMtiJoinKeyProjection(contract, include) {\n\tconst polyInfo = resolvePolymorphismInfo(contract, include.relatedNamespaceId, include.relatedModelName);\n\tif (!polyInfo) return [];\n\tconst mtiTables = new Set(polyInfo.mtiVariants.map((variant) => variant.table));\n\tconst aliases = /* @__PURE__ */ new Set();\n\tconst projection = [];\n\tfor (const nested of include.nested.includes) {\n\t\tif (!mtiTables.has(nested.localTableName)) continue;\n\t\tfor (const column of localColumnsForRowInclude(nested)) {\n\t\t\tconst alias = `${nested.localTableName}__${column}`;\n\t\t\tif (aliases.has(alias)) continue;\n\t\t\taliases.add(alias);\n\t\t\tprojection.push(ProjectionItem.of(alias, ColumnRef.of(nested.localTableName, column), codecRefForStorageColumn(contract.storage, include.relatedNamespaceId, nested.localTableName, column)));\n\t\t}\n\t}\n\treturn projection;\n}\nfunction mergeProjectionByAlias(projection, additional) {\n\tconst aliases = new Set(projection.map((item) => item.alias));\n\tconst merged = [...projection];\n\tfor (const item of additional) if (!aliases.has(item.alias)) {\n\t\taliases.add(item.alias);\n\t\tmerged.push(item);\n\t}\n\treturn merged;\n}\n/**\n* Build the correlated WHERE and junction JOIN artifacts for a many-to-many\n* include. The resulting WHERE correlates the junction to the parent rows\n* (AND-ed across all column pairs for composite keys). The junction JOIN\n* connects child rows to the junction via the child columns.\n*/\nfunction buildManyToManyJunctionArtifacts(parentLocalRefs, childTableRef, through) {\n\tconst { table: junctionTable, parentColumns, childColumns, targetColumns, namespaceId } = through;\n\tinvariant(childColumns.length === targetColumns.length, `M:N junction '${junctionTable}': childColumns (${childColumns.length}) and targetColumns (${targetColumns.length}) must have equal length`);\n\tinvariant(parentColumns.length === parentLocalRefs.length, `M:N junction '${junctionTable}': parentColumns (${parentColumns.length}) and parentLocalColumns (${parentLocalRefs.length}) must have equal length`);\n\tconst joinOnPairs = childColumns.map((junctionCol, i) => {\n\t\tconst targetCol = targetColumns[i];\n\t\tassertDefined(targetCol, `M:N junction '${junctionTable}': missing target column at index ${i}`);\n\t\treturn BinaryExpr.eq(ColumnRef.of(junctionTable, junctionCol), ColumnRef.of(childTableRef, targetCol));\n\t});\n\tconst firstJoinPair = joinOnPairs[0];\n\tconst joinOn = joinOnPairs.length === 1 && firstJoinPair ? firstJoinPair : AndExpr.of(joinOnPairs);\n\tconst correlationPairs = parentColumns.map((junctionCol, i) => {\n\t\tconst parentLocalRef = parentLocalRefs[i];\n\t\tassertDefined(parentLocalRef, `M:N junction '${junctionTable}': missing parent-local column ref at index ${i}`);\n\t\treturn BinaryExpr.eq(ColumnRef.of(junctionTable, junctionCol), parentLocalRef);\n\t});\n\tconst firstCorrelationPair = correlationPairs[0];\n\treturn {\n\t\twhereExpr: correlationPairs.length === 1 && firstCorrelationPair ? firstCorrelationPair : AndExpr.of(correlationPairs),\n\t\tjunctionJoin: JoinAst.inner(TableSource.named(junctionTable, void 0, namespaceId), joinOn, false)\n\t};\n}\nfunction buildIncludeChildRowsSelect(contract, aggregates, parentSource, include) {\n\tconst childState = include.nested;\n\tif (childState.distinctOn !== void 0 && childState.distinctOn.length > 0) {\n\t\tassertDistinctOnCapability(contract, \"distinctOn\");\n\t\tassertDistinctOnCompatibleOrder(childState.orderBy, childState.distinctOn.length);\n\t}\n\tconst parentLocalRefs = resolveParentLocalRefs(parentSource, include, localColumnsForRowInclude(include));\n\tconst childSource = resolveChildTableSource(include, parentLocalRefs);\n\tconst childTableAlias = childSource.alias;\n\tconst childTableRef = childSource.tableRef;\n\tconst rowsAlias = `${include.relationName}__rows`;\n\tconst remappedChildOrderBy = childTableAlias && childState.orderBy ? childState.orderBy.map((item) => item.rewrite(createTableRefRemapper$1(include.relatedTableName, childTableRef))) : childState.orderBy;\n\tconst { childOrderBy, hiddenOrderProjection, aggregateOrderBy } = buildIncludeOrderArtifacts(include.relationName, rowsAlias, remappedChildOrderBy);\n\tconst childWhere = buildStateWhere(contract, childTableRef, childState, {\n\t\tfilterTableName: include.relatedTableName,\n\t\tnamespaceId: include.relatedNamespaceId\n\t});\n\tlet whereExpr;\n\tlet junctionJoins = [];\n\tif (include.through !== void 0) {\n\t\tconst artifacts = buildManyToManyJunctionArtifacts(parentLocalRefs, childTableRef, include.through);\n\t\twhereExpr = childWhere ? AndExpr.of([artifacts.whereExpr, childWhere]) : artifacts.whereExpr;\n\t\tjunctionJoins = [artifacts.junctionJoin];\n\t} else {\n\t\tconst joinExpr = buildIncludeJoinExpr(include, childTableRef, parentLocalRefs);\n\t\twhereExpr = childWhere ? AndExpr.of([joinExpr, childWhere]) : joinExpr;\n\t}\n\tif (childState.distinct !== void 0 && childState.distinct.length > 0 && childState.includes.length > 0) return buildDistinctNonLeafChildRowsSelect({\n\t\tcontract,\n\t\taggregates,\n\t\tinclude,\n\t\tchildTableAlias,\n\t\tchildTableRef,\n\t\trowsAlias,\n\t\tchildOrderBy,\n\t\thiddenOrderProjection,\n\t\taggregateOrderBy,\n\t\twhereExpr,\n\t\tjunctionJoins\n\t});\n\tconst polyJoinsAndProjection = buildChildPolymorphismJoinsAndProjection(contract, include, childTableAlias, childTableRef);\n\tconst scalarProjection = buildProjection(contract, include.relatedNamespaceId, include.relatedTableName, polyJoinsAndProjection.baseSelectedFields, childTableRef);\n\tconst nestedProjections = buildNestedIncludeProjections(contract, aggregates, {\n\t\tbaseTableName: include.relatedTableName,\n\t\ttableRef: childTableRef,\n\t\tvariantColumnsProjected: false\n\t}, childState.includes);\n\tconst childProjection = [\n\t\t...scalarProjection,\n\t\t...polyJoinsAndProjection.projection,\n\t\t...polyJoinsAndProjection.hiddenProjection,\n\t\t...nestedProjections\n\t];\n\tlet childRows = SelectAst.from(tableSourceForContract(contract, include.relatedNamespaceId, include.relatedTableName, childTableAlias)).withProjection([...childProjection, ...hiddenOrderProjection]).withWhere(whereExpr);\n\tif (polyJoinsAndProjection.joins.length > 0) childRows = childRows.withJoins([...polyJoinsAndProjection.joins]);\n\tif (junctionJoins.length > 0) childRows = childRows.withJoins(junctionJoins);\n\tif (childState.distinctOn && childState.distinctOn.length > 0) {\n\t\tchildRows = childRows.withDistinctOn(childState.distinctOn.map((column) => ColumnRef.of(childTableRef, column)));\n\t\tif (childOrderBy) childRows = childRows.withOrderBy(childOrderBy);\n\t} else if (childState.distinct && childState.distinct.length > 0) {\n\t\tconst rankedAlias = `${include.relationName}__distinct`;\n\t\tchildRows = wrapWithRowNumberDedup({\n\t\t\tbase: childRows,\n\t\t\tdistinctColumnRefs: childState.distinct.map((column) => ColumnRef.of(childTableRef, column)),\n\t\t\trankingOrderBy: childOrderBy ?? [],\n\t\t\trankedAlias\n\t\t});\n\t\tif (childOrderBy) childRows = childRows.withOrderBy(childOrderBy.map((item, index) => item.withExpr(ColumnRef.of(rankedAlias, `${include.relationName}__order_${index}`))));\n\t} else if (childOrderBy) childRows = childRows.withOrderBy(childOrderBy);\n\tif (childState.limit !== void 0) childRows = childRows.withLimit(childState.limit);\n\tif (childState.offset !== void 0) childRows = childRows.withOffset(childState.offset);\n\treturn {\n\t\tchildRows,\n\t\tchildProjection,\n\t\tdocumentAliases: documentAliasesOf(nestedProjections),\n\t\trowsAlias,\n\t\taggregateOrderBy\n\t};\n}\nfunction buildDistinctNonLeafChildRowsSelect(options) {\n\tconst { contract, aggregates, include, childTableAlias, childTableRef, rowsAlias, childOrderBy, hiddenOrderProjection, aggregateOrderBy, whereExpr, junctionJoins } = options;\n\tconst childState = include.nested;\n\tconst grandchildJoinColumns = Array.from(new Set(childState.includes.flatMap((nested) => nested.localTableName === include.relatedTableName ? localColumnsForRowInclude(nested) : [])));\n\tconst { selectedForQuery } = augmentSelectionForJoinColumns(childState.selectedFields, grandchildJoinColumns);\n\tconst visiblePolyProjection = buildChildPolymorphismJoinsAndProjection(contract, include, childTableAlias, childTableRef);\n\tconst queryPolyProjection = buildChildPolymorphismJoinsAndProjection(contract, {\n\t\t...include,\n\t\tnested: {\n\t\t\t...childState,\n\t\t\tselectedFields: selectedForQuery\n\t\t}\n\t}, childTableAlias, childTableRef);\n\tconst innerScalarProjection = buildProjection(contract, include.relatedNamespaceId, include.relatedTableName, queryPolyProjection.baseSelectedFields, childTableRef);\n\tconst innerMtiProjection = mergeProjectionByAlias(queryPolyProjection.projection, buildRequiredMtiJoinKeyProjection(contract, include));\n\tlet baseInner = SelectAst.from(tableSourceForContract(contract, include.relatedNamespaceId, include.relatedTableName, childTableAlias)).withProjection([\n\t\t...innerScalarProjection,\n\t\t...innerMtiProjection,\n\t\t...queryPolyProjection.hiddenProjection,\n\t\t...hiddenOrderProjection\n\t]).withWhere(whereExpr);\n\tconst distinctExtraJoins = [...queryPolyProjection.joins, ...junctionJoins];\n\tif (distinctExtraJoins.length > 0) baseInner = baseInner.withJoins(distinctExtraJoins);\n\tconst distinctColumns = childState.distinct;\n\tif (distinctColumns === void 0 || distinctColumns.length === 0) throw new InternalError(\"buildDistinctNonLeafChildRowsSelect requires a non-empty `distinct` selection\");\n\tconst rankedAlias = `${include.relationName}__ranked`;\n\tlet innerSelect = wrapWithRowNumberDedup({\n\t\tbase: baseInner,\n\t\tdistinctColumnRefs: distinctColumns.map((column) => ColumnRef.of(childTableRef, column)),\n\t\trankingOrderBy: childOrderBy ?? [],\n\t\trankedAlias\n\t});\n\tif (childOrderBy) innerSelect = innerSelect.withOrderBy(childOrderBy.map((item, index) => item.withExpr(ColumnRef.of(rankedAlias, `${include.relationName}__order_${index}`))));\n\tif (childState.limit !== void 0) innerSelect = innerSelect.withLimit(childState.limit);\n\tif (childState.offset !== void 0) innerSelect = innerSelect.withOffset(childState.offset);\n\tconst distinctAlias = `${include.relationName}__distinct`;\n\tconst outerScalarProjection = buildProjection(contract, include.relatedNamespaceId, include.relatedTableName, visiblePolyProjection.baseSelectedFields, distinctAlias);\n\tconst outerNestedProjections = buildNestedIncludeProjections(contract, aggregates, {\n\t\tbaseTableName: include.relatedTableName,\n\t\ttableRef: distinctAlias,\n\t\tvariantColumnsProjected: true\n\t}, childState.includes);\n\tconst outerPolyProjection = visiblePolyProjection.projection.map((proj) => ProjectionItem.of(proj.alias, ColumnRef.of(distinctAlias, proj.alias), proj.codec));\n\tconst outerHiddenProjection = visiblePolyProjection.hiddenProjection.map((proj) => ProjectionItem.of(proj.alias, ColumnRef.of(distinctAlias, proj.alias), proj.codec));\n\tconst outerHiddenOrderProjection = hiddenOrderProjection.map((proj) => ProjectionItem.of(proj.alias, ColumnRef.of(distinctAlias, proj.alias), proj.codec));\n\tconst childProjection = [\n\t\t...outerScalarProjection,\n\t\t...outerPolyProjection,\n\t\t...outerHiddenProjection,\n\t\t...outerNestedProjections\n\t];\n\treturn {\n\t\tchildRows: SelectAst.from(DerivedTableSource.as(distinctAlias, innerSelect)).withProjection([...childProjection, ...outerHiddenOrderProjection]),\n\t\tchildProjection,\n\t\tdocumentAliases: documentAliasesOf(outerNestedProjections),\n\t\trowsAlias,\n\t\taggregateOrderBy\n\t};\n}\n/**\n* Build the inner SELECT for a scalar include reducer (any operation the aggregate registry\n* contributes).\n*\n* Emits one row containing `json_build_object('value', AGG(...))`\n* over the child relation correlated to the parent via the FK. The\n* JSON wrap lets the value flow through the existing include-payload\n* decoder unchanged (it JSON.parses the column and the scalar branch\n* pulls `.value` out).\n*\n* The refine state's pipeline composes through to the aggregate's\n* input set: `where` / `orderBy` / `limit` / `offset` / `distinct` shape\n* the rows the aggregate sees, matching the natural compositional\n* semantic of\n*\n* `db.User.include('posts', p => p.where(W).limit(N).count()) // ≤ N`\n*\n* When `limit` / `offset` / `distinct` is set, the aggregate's input\n* cannot just be the bare correlated table — a top-level `LIMIT` on\n* the aggregating SELECT only trims the (already one-row) output, not\n* the rows being aggregated. We therefore wrap the source in a\n* derived SELECT that materialises the shaped row set, then\n* aggregate over that. `orderBy` alone (no `limit` / `offset` /\n* `distinct`) is dropped at the SQL level since reordering does not\n* change which rows are aggregated.\n*/\nfunction buildIncludeChildScalarSelect(contract, aggregates, parentSource, include, scalar) {\n\tconst { codec: resultCodec, input: inputCodec, lower: resultLowering } = resolveAggregate({\n\t\taggregates,\n\t\tcontract,\n\t\tnamespaceId: include.relatedNamespaceId,\n\t\ttableName: include.relatedTableName,\n\t\tfn: scalar.fn,\n\t\tcolumn: scalar.column\n\t});\n\tconst parentLocalRefs = resolveParentLocalRefs(parentSource, include, localColumnsForRowInclude(include));\n\tconst childSource = resolveChildTableSource(include, parentLocalRefs);\n\tconst childTableAlias = childSource.alias;\n\tconst childTableRef = childSource.tableRef;\n\tconst state = scalar.state;\n\tif (state.distinctOn !== void 0 && state.distinctOn.length > 0) {\n\t\tassertDistinctOnCapability(contract, \"distinctOn\");\n\t\tassertDistinctOnCompatibleOrder(state.orderBy, state.distinctOn.length);\n\t}\n\tconst childWhere = buildStateWhere(contract, childTableRef, state, {\n\t\tfilterTableName: include.relatedTableName,\n\t\tnamespaceId: include.relatedNamespaceId\n\t});\n\tlet whereExpr;\n\tlet junctionJoins = [];\n\tif (include.through !== void 0) {\n\t\tconst artifacts = buildManyToManyJunctionArtifacts(parentLocalRefs, childTableRef, include.through);\n\t\twhereExpr = childWhere ? AndExpr.of([artifacts.whereExpr, childWhere]) : artifacts.whereExpr;\n\t\tjunctionJoins = [artifacts.junctionJoin];\n\t} else {\n\t\tconst joinExpr = buildIncludeJoinExpr(include, childTableRef, parentLocalRefs);\n\t\twhereExpr = childWhere ? AndExpr.of([joinExpr, childWhere]) : joinExpr;\n\t}\n\tconst remappedOrderBy = childTableAlias && state.orderBy ? state.orderBy.map((item) => item.rewrite(createTableRefRemapper$1(include.relatedTableName, childTableRef))) : state.orderBy;\n\tconst hasPagination = state.limit !== void 0 || state.offset !== void 0;\n\tconst hasDistinct = state.distinct !== void 0 && state.distinct.length > 0 || state.distinctOn !== void 0 && state.distinctOn.length > 0;\n\tif (!(hasPagination || hasDistinct)) {\n\t\tconst aggregateExpr = buildIncludeAggregateExpr(scalar, childTableRef, resultLowering, inputCodec);\n\t\tconst jsonObjectExpr = JsonObjectExpr.fromEntries([JsonObjectExpr.entry(\"value\", jsonEntryProjection(aggregateExpr, { codec: resultCodec }))]);\n\t\tlet select = SelectAst.from(tableSourceForContract(contract, include.relatedNamespaceId, include.relatedTableName, childTableAlias)).withProjection([ProjectionItem.of(include.relationName, jsonObjectExpr)]).withWhere(whereExpr);\n\t\tif (junctionJoins.length > 0) select = select.withJoins(junctionJoins);\n\t\treturn select;\n\t}\n\tconst innerAlias = `${include.relationName}__scalar`;\n\tconst hiddenOrderProjection = state.distinct !== void 0 && state.distinct.length > 0 && remappedOrderBy !== void 0 && remappedOrderBy.length > 0 ? remappedOrderBy.map((item, index) => ProjectionItem.of(`${include.relationName}__order_${index}`, item.expr)) : [];\n\tconst innerProjection = [...scalar.column !== void 0 ? [ProjectionItem.of(scalar.column, ColumnRef.of(childTableRef, scalar.column))] : [ProjectionItem.of(\"__row\", LiteralExpr.of(1))], ...hiddenOrderProjection];\n\tlet inner = SelectAst.from(tableSourceForContract(contract, include.relatedNamespaceId, include.relatedTableName, childTableAlias)).withProjection(innerProjection).withWhere(whereExpr);\n\tif (junctionJoins.length > 0) inner = inner.withJoins(junctionJoins);\n\tif (state.distinctOn !== void 0 && state.distinctOn.length > 0) {\n\t\tinner = inner.withDistinctOn(state.distinctOn.map((column) => ColumnRef.of(childTableRef, column)));\n\t\tif (remappedOrderBy !== void 0 && remappedOrderBy.length > 0) inner = inner.withOrderBy(remappedOrderBy);\n\t} else if (state.distinct !== void 0 && state.distinct.length > 0) {\n\t\tconst rankedAlias = `${include.relationName}__scalar_distinct`;\n\t\tinner = wrapWithRowNumberDedup({\n\t\t\tbase: inner,\n\t\t\tdistinctColumnRefs: state.distinct.map((column) => ColumnRef.of(childTableRef, column)),\n\t\t\trankingOrderBy: remappedOrderBy ?? [],\n\t\t\trankedAlias\n\t\t});\n\t\tif (remappedOrderBy !== void 0 && remappedOrderBy.length > 0) inner = inner.withOrderBy(remappedOrderBy.map((item, index) => item.withExpr(ColumnRef.of(rankedAlias, `${include.relationName}__order_${index}`))));\n\t} else if (remappedOrderBy !== void 0 && remappedOrderBy.length > 0) inner = inner.withOrderBy(remappedOrderBy);\n\tif (state.limit !== void 0) inner = inner.withLimit(state.limit);\n\tif (state.offset !== void 0) inner = inner.withOffset(state.offset);\n\tconst outerAggregateExpr = buildIncludeAggregateExpr(scalar, innerAlias, resultLowering, inputCodec);\n\tconst outerJsonObjectExpr = JsonObjectExpr.fromEntries([JsonObjectExpr.entry(\"value\", jsonEntryProjection(outerAggregateExpr, { codec: resultCodec }))]);\n\treturn SelectAst.from(DerivedTableSource.as(innerAlias, inner)).withProjection([ProjectionItem.of(include.relationName, outerJsonObjectExpr)]);\n}\nfunction buildIncludeAggregateExpr(scalar, childTableRef, lower, inputCodec) {\n\tconst expr = scalar.column === void 0 ? void 0 : ColumnRef.of(childTableRef, scalar.column);\n\tif (lower !== void 0) return lower({\n\t\texpr,\n\t\tinputCodec\n\t});\n\treturn plainAggregateExpr(scalar.fn, expr);\n}\n/**\n* Build the inner SELECT for a `combine({ a, b, ... })` include.\n*\n* Each branch produces a self-contained SELECT projecting one row\n* with one column aliased to the relation name. The branches are\n* stitched together as cross-joined derived tables (FROM <first>\n* INNER JOIN <second> ON TRUE ...), and the outer projection packs\n* them into a single `json_build_object` keyed by branch name. The\n* resulting subquery emits exactly one row per parent row containing\n* the combined JSON — embedded as a correlated subquery in the outer\n* projection.\n*\n* Row branches reuse the standalone row-include builder; scalar\n* branches reuse `buildIncludeChildScalarSelect` — the `{value: ...}`\n* envelope survives into the combined JSON and the decoder unwraps\n* it per scalar branch. Distinct/limit/offset semantics inside a row\n* branch fan out naturally because the row builder is invoked with\n* a synthetic IncludeExpr whose `nested` is the branch's state.\n*/\nfunction buildIncludeChildCombineSelect(contract, aggregates, parentSource, include, branches) {\n\tconst branchEntries = Object.entries(branches);\n\tif (branchEntries.length === 0) throw ormError(\"ORM.INCLUDE_INVALID\", `combine() include \"${include.relationName}\" has no branches`, { meta: { relation: include.relationName } });\n\tconst compiledBranches = branchEntries.map(([name, branch]) => ({\n\t\tname,\n\t\talias: `${include.relationName}__combine__${name}`,\n\t\tselect: buildIncludeChildCombineBranchSelect(contract, aggregates, parentSource, include, branch)\n\t}));\n\tconst jsonObjectExpr = JsonObjectExpr.fromEntries(compiledBranches.map((branch) => JsonObjectExpr.entry(branch.name, jsonEntryProjection(ColumnRef.of(branch.alias, include.relationName), { document: true }))));\n\tconst [firstBranch, ...restBranches] = compiledBranches;\n\tif (!firstBranch) throw new InternalError(`combine() include \"${include.relationName}\" has no branches`);\n\tconst joins = restBranches.map((branch) => JoinAst.inner(DerivedTableSource.as(branch.alias, branch.select), AndExpr.true(), false));\n\treturn SelectAst.from(DerivedTableSource.as(firstBranch.alias, firstBranch.select)).withProjection([ProjectionItem.of(include.relationName, jsonObjectExpr)]).withJoins(joins);\n}\n/**\n* Compile one branch of a `combine({ ... })` into a SelectAst that\n* projects exactly one row with one column aliased to the parent\n* relation name. Dispatches to the standalone scalar / row builders\n* with the branch's state spliced into a synthetic IncludeExpr.\n*/\nfunction buildIncludeChildCombineBranchSelect(contract, aggregates, parentSource, include, branch) {\n\tif (branch.kind === \"scalar\") return buildIncludeChildScalarSelect(contract, aggregates, parentSource, include, branch.selector);\n\treturn buildIncludeChildRowsAggregateSelect(contract, aggregates, parentSource, {\n\t\t...include,\n\t\tnested: branch.state,\n\t\tscalar: void 0,\n\t\tcombine: void 0\n\t});\n}\n/**\n* Internal helper: build the inner aggregate SELECT that `json_agg`s\n* child rows into a single JSON-array column aliased to the relation\n* name. Used by both the standalone row correlated-subquery path and\n* by combine's row branches.\n*/\nfunction buildIncludeChildRowsAggregateSelect(contract, aggregates, parentSource, include) {\n\tconst { childRows, childProjection, documentAliases, rowsAlias, aggregateOrderBy } = buildIncludeChildRowsSelect(contract, aggregates, parentSource, include);\n\tconst jsonObjectExpr = JsonObjectExpr.fromEntries(childProjection.map((item) => JsonObjectExpr.entry(item.alias, jsonEntryProjection(ColumnRef.of(rowsAlias, item.alias), {\n\t\tcodec: item.codec,\n\t\tdocument: documentAliases.has(item.alias)\n\t}))));\n\treturn SelectAst.from(DerivedTableSource.as(rowsAlias, childRows)).withProjection([ProjectionItem.of(include.relationName, JsonArrayAggExpr.of(jsonEntryProjection(jsonObjectExpr, { document: true }), \"emptyArray\", aggregateOrderBy))]);\n}\nfunction buildCorrelatedIncludeProjection(contract, aggregates, parentSource, include) {\n\tif (include.scalar) {\n\t\tconst scalarSelect = buildIncludeChildScalarSelect(contract, aggregates, parentSource, include, include.scalar);\n\t\treturn { projection: ProjectionItem.of(include.relationName, SubqueryExpr.of(scalarSelect)) };\n\t}\n\tif (include.combine) {\n\t\tconst combineSelect = buildIncludeChildCombineSelect(contract, aggregates, parentSource, include, include.combine);\n\t\treturn { projection: ProjectionItem.of(include.relationName, SubqueryExpr.of(combineSelect)) };\n\t}\n\tconst aggregateQuery = buildIncludeChildRowsAggregateSelect(contract, aggregates, parentSource, include);\n\treturn { projection: ProjectionItem.of(include.relationName, SubqueryExpr.of(aggregateQuery)) };\n}\nfunction buildSelectAst(contract, tableName, state, options) {\n\tconst namespaceId = options.namespaceId;\n\tif (state.distinctOn !== void 0 && state.distinctOn.length > 0) {\n\t\tassertDistinctOnCapability(contract, \"distinctOn\");\n\t\tassertDistinctOnCompatibleOrder(state.orderBy, state.distinctOn.length);\n\t}\n\tconst projection = [...buildProjection(contract, namespaceId, tableName, state.selectedFields, tableName), ...options.includeProjection ?? []];\n\tconst { source: fromSource, where: effectiveWhere } = buildDedupedTableSource(contract, namespaceId, tableName, state, options.where ?? buildStateWhere(contract, tableName, state, { namespaceId }), resolveTableColumns(contract, namespaceId, tableName).map((column) => ProjectionItem.of(column, ColumnRef.of(tableName, column))));\n\tlet ast = SelectAst.from(fromSource).withProjection(projection);\n\tif (effectiveWhere) ast = ast.withWhere(effectiveWhere);\n\tif (state.orderBy) ast = ast.withOrderBy(state.orderBy);\n\tif (state.selectedFields === void 0) ast = ast.withSelectAllIntent({ table: tableName });\n\tif (state.distinctOn && state.distinctOn.length > 0) ast = ast.withDistinctOn(state.distinctOn.map((column) => ColumnRef.of(tableName, column)));\n\tif (state.limit !== void 0) ast = ast.withLimit(state.limit);\n\tif (state.offset !== void 0) ast = ast.withOffset(state.offset);\n\tif (options.joins && options.joins.length > 0) ast = ast.withJoins(options.joins);\n\tif (state.locking !== void 0) ast = ast.withLocking(state.locking);\n\treturn ast;\n}\nfunction compileSelect(contract, namespaceId, tableName, state, modelName) {\n\tassertLockCompatible(state);\n\tif (state.distinctOn !== void 0 && state.distinctOn.length > 0) assertDistinctOnCapability(contract, \"distinctOn\");\n\tconst polyInfo = modelName ? resolvePolymorphismInfo(contract, namespaceId, modelName) : void 0;\n\tconst selection = polyInfo && modelName ? resolvePolymorphicProjectionSelection(contract, namespaceId, modelName, polyInfo, state) : void 0;\n\tconst projectionState = selection ? {\n\t\t...state,\n\t\tselectedFields: selection.baseSelectedFields\n\t} : state;\n\tconst mtiArtifacts = polyInfo && polyInfo.mtiVariants.length > 0 ? buildMtiJoins(contract, namespaceId, polyInfo, state.variantName, selection?.selectedMtiColumnsByTable) : void 0;\n\tconst hiddenProjection = polyInfo && selection ? buildHiddenDiscriminatorProjection(contract, namespaceId, polyInfo, tableName, selection.needsHiddenDiscriminator) : [];\n\tconst ast = buildSelectAst(contract, tableName, {\n\t\t...projectionState,\n\t\tincludes: []\n\t}, {\n\t\tjoins: mtiArtifacts?.joins ?? [],\n\t\tincludeProjection: [...mtiArtifacts?.projection ?? [], ...hiddenProjection],\n\t\tnamespaceId\n\t});\n\tconst { params } = deriveParamsFromAst(ast);\n\treturn buildOrmQueryPlan(contract, ast, params, state.annotations);\n}\nfunction compileSelectWithIncludes(contract, aggregates, namespaceId, tableName, state, modelName) {\n\tassertLockCompatible(state);\n\tconst includeJoins = [];\n\tconst includeProjection = [];\n\tconst topLevelWhere = buildStateWhere(contract, tableName, state, { namespaceId });\n\tconst polyInfo = modelName ? resolvePolymorphismInfo(contract, namespaceId, modelName) : void 0;\n\tconst selection = polyInfo && modelName ? resolvePolymorphicProjectionSelection(contract, namespaceId, modelName, polyInfo, state) : void 0;\n\tconst projectionState = selection ? {\n\t\t...state,\n\t\tselectedFields: selection.baseSelectedFields\n\t} : state;\n\tif (polyInfo && selection) {\n\t\tif (polyInfo.mtiVariants.length > 0) {\n\t\t\tconst mtiArtifacts = buildMtiJoins(contract, namespaceId, polyInfo, state.variantName, selection.selectedMtiColumnsByTable);\n\t\t\tincludeJoins.push(...mtiArtifacts.joins);\n\t\t\tincludeProjection.push(...mtiArtifacts.projection);\n\t\t}\n\t\tincludeProjection.push(...buildHiddenDiscriminatorProjection(contract, namespaceId, polyInfo, tableName, selection.needsHiddenDiscriminator));\n\t}\n\tconst parentSource = {\n\t\tbaseTableName: tableName,\n\t\ttableRef: tableName,\n\t\tvariantColumnsProjected: false\n\t};\n\tfor (const include of state.includes) {\n\t\tconst artifact = buildCorrelatedIncludeProjection(contract, aggregates, parentSource, include);\n\t\tincludeProjection.push(artifact.projection);\n\t}\n\tconst ast = buildSelectAst(contract, tableName, {\n\t\t...projectionState,\n\t\tincludes: []\n\t}, {\n\t\tjoins: includeJoins,\n\t\tincludeProjection,\n\t\tnamespaceId,\n\t\t...ifDefined(\"where\", topLevelWhere)\n\t});\n\tconst { params } = deriveParamsFromAst(ast);\n\treturn buildOrmQueryPlan(contract, ast, params, state.annotations);\n}\n//#endregion\n//#region src/query-plan-rows.ts\nfunction queryPlanRows(scope, plan) {\n\treturn scope.query(plan);\n}\n//#endregion\n//#region src/collection-dispatch.ts\nfunction describeCollectionRows(options) {\n\treturn {\n\t\t...describeExecutionRows(options),\n\t\tconsume: createPreparedRowsConsumer(options)\n\t};\n}\nfunction describeExecutionRows(options) {\n\tconst { context, state, tableName, modelName, namespaceId } = options;\n\tconst { contract } = context;\n\tconst polyInfo = resolvePolymorphismInfo(contract, namespaceId, modelName);\n\tif (state.includes.length === 0) {\n\t\tconst compiled = compileSelect(contract, namespaceId, tableName, state, modelName);\n\t\tconst mapper = polyInfo ? (rawRow) => blindCast(mapPolymorphicRow(contract, namespaceId, modelName, polyInfo, rawRow, state.variantName)) : (rawRow) => blindCast(mapStorageRowToModelFields(contract, namespaceId, modelName, rawRow));\n\t\treturn {\n\t\t\tplan: compiled,\n\t\t\tconsume: (rows) => mapResultRows(rows, mapper)\n\t\t};\n\t}\n\treturn {\n\t\tplan: compileSelectWithIncludes(contract, context.aggregateDescriptors, namespaceId, tableName, state, modelName),\n\t\tconsume: (rows) => consumeIncludeRows(context, state, namespaceId, modelName, rows)\n\t};\n}\nfunction deferResolution(resolve) {\n\ttry {\n\t\tconst value = resolve();\n\t\treturn () => value;\n\t} catch (error) {\n\t\treturn () => {\n\t\t\tthrow error;\n\t\t};\n\t}\n}\nfunction createPreparedMapper(contract, namespaceId, modelName, variantName) {\n\tconst resolved = deferResolution(() => {\n\t\tconst polyInfo = resolvePolymorphismInfo(contract, namespaceId, modelName);\n\t\treturn polyInfo ? createPolymorphicRowMapper(contract, namespaceId, modelName, polyInfo, variantName) : createStorageRowMapper(contract, namespaceId, modelName);\n\t});\n\treturn (row) => resolved()(row);\n}\nfunction createPreparedRowsConsumer(options) {\n\tconst { context, state, namespaceId, modelName } = options;\n\tconst mapRow = createPreparedMapper(context.contract, namespaceId, modelName, state.variantName);\n\tconst includes = state.includes.map((include) => createPreparedIncludeConsumer(context, include));\n\tconst castRow = (row) => blindCast(row);\n\tif (includes.length === 0) return (rows) => mapResultRows(rows, (row) => castRow(mapRow(row)));\n\treturn (rows) => new AsyncIterableResult((async function* () {\n\t\tconst parents = (await rows.toArray()).map((raw) => ({\n\t\t\traw,\n\t\t\tmapped: mapRow(raw)\n\t\t}));\n\t\tfor (const parent of parents) for (const include of includes) parent.mapped[include.alias] = include.consume(parent.raw[include.alias]);\n\t\tfor (const parent of parents) yield castRow(parent.mapped);\n\t})());\n}\nfunction createPreparedIncludeConsumer(context, include) {\n\tconst { contract } = context;\n\tconst alias = include.relationName;\n\tif (include.scalar) return {\n\t\talias,\n\t\tconsume: createPreparedScalarConsumer(context, include, include.scalar)\n\t};\n\tif (include.combine) {\n\t\tconst branches = Object.entries(include.combine).map(([name, branch]) => ({\n\t\t\tname,\n\t\t\tconsume: branch.kind === \"rows\" ? createPreparedIncludeConsumer(context, {\n\t\t\t\t...include,\n\t\t\t\tnested: branch.state,\n\t\t\t\tscalar: void 0,\n\t\t\t\tcombine: void 0\n\t\t\t}).consume : createPreparedScalarConsumer(context, include, branch.selector)\n\t\t}));\n\t\treturn {\n\t\t\talias,\n\t\t\tconsume: (raw) => {\n\t\t\t\tconst parsed = parseCombineEnvelope(include, raw);\n\t\t\t\tconst result = {};\n\t\t\t\tfor (const branch of branches) result[branch.name] = branch.consume(parsed[branch.name]);\n\t\t\t\treturn result;\n\t\t\t}\n\t\t};\n\t}\n\tconst mapRow = createPreparedMapper(contract, include.relatedNamespaceId, include.relatedModelName, include.nested.variantName);\n\tconst bindings = deferResolution(() => {\n\t\tconst tables = contract.storage.namespaces[include.relatedNamespaceId]?.entries.table;\n\t\tconst keys = new Set(Object.keys(tables?.[include.relatedTableName]?.columns ?? {}));\n\t\tconst polyInfo = resolvePolymorphismInfo(contract, include.relatedNamespaceId, include.relatedModelName);\n\t\tfor (const variant of polyInfo?.mtiVariants ?? []) for (const column of Object.keys(tables?.[variant.table]?.columns ?? {})) keys.add(`${variant.table}__${column}`);\n\t\treturn new Map([...keys].map((key) => [key, deferResolution(() => resolveIncludedColumnBinding(contract, context, include, key))]));\n\t});\n\tconst bindingFor = (key) => bindings().get(key)?.() ?? null;\n\tconst nested = include.nested.includes.map((child) => createPreparedIncludeConsumer(context, child));\n\tconst toOne = isToOneCardinality(include.cardinality);\n\tconst fused = deferResolution(() => createPreparedIncludedRowDecoder(contract, include, bindingFor));\n\treturn {\n\t\talias,\n\t\tconsume: (raw) => {\n\t\t\tconst rows = parseIncludedRows(include, raw);\n\t\t\tif (rows.length === 0) return toOne ? null : [];\n\t\t\tconst decoder = fused();\n\t\t\tif (!decoder || !rows.every(decoder.matches)) return consumeRowInclude(rows, mapRow, bindingFor, nested, toOne);\n\t\t\tconst mapped = rows.map((row) => {\n\t\t\t\tconst result = decoder.decode(row);\n\t\t\t\tfor (const child of nested) result[child.alias] = child.consume(row[child.alias]);\n\t\t\t\treturn result;\n\t\t\t});\n\t\t\treturn toOne ? mapped[0] ?? null : mapped;\n\t\t}\n\t};\n}\nfunction createPreparedIncludedRowDecoder(contract, include, bindingFor) {\n\tconst namespace = include.relatedNamespaceId;\n\tconst model = include.relatedModelName;\n\tif (resolvePolymorphismInfo(contract, namespace, model)) return void 0;\n\tconst fieldToColumn = getFieldToColumnMap(contract, namespace, model);\n\tconst columnToField = getColumnToFieldMap(contract, namespace, model);\n\tconst columns = (include.nested.selectedFields ?? Object.keys(fieldToColumn)).map((field) => Object.hasOwn(fieldToColumn, field) ? fieldToColumn[field] ?? field : field);\n\tconst aliases = include.nested.includes.map((child) => child.relationName);\n\tconst table = contract.storage.namespaces[namespace]?.entries.table?.[include.relatedTableName];\n\tif (aliases.some((alias) => table?.columns[alias] !== void 0)) return void 0;\n\tconst keys = [...columns, ...aliases];\n\tif (keys.includes(\"__proto__\") || new Set(keys).size !== keys.length) return void 0;\n\tconst operations = keys.map((key) => {\n\t\tconst binding = deferResolution(() => bindingFor(key));\n\t\treturn {\n\t\t\tkey,\n\t\t\tfield: Object.hasOwn(columnToField, key) ? columnToField[key] ?? key : key,\n\t\t\tdecode(value) {\n\t\t\t\tif (value === null || value === void 0) return value;\n\t\t\t\tconst resolved = binding();\n\t\t\t\treturn resolved ? decodeIncludedColumnValue(resolved.ref, resolved.codecId, resolved.codec, value) : value;\n\t\t\t}\n\t\t};\n\t});\n\treturn {\n\t\tmatches(row) {\n\t\t\tconst actual = Object.keys(row);\n\t\t\treturn actual.length === keys.length && actual.every((key, index) => key === keys[index]);\n\t\t},\n\t\tdecode(row) {\n\t\t\tconst result = {};\n\t\t\tfor (const operation of operations) result[operation.field] = operation.decode(row[operation.key]);\n\t\t\treturn result;\n\t\t}\n\t};\n}\nfunction createPreparedScalarConsumer(context, include, scalar) {\n\tconst metadata = deferResolution(() => resolveScalarIncludeMetadata(context.contract, context, include, scalar));\n\treturn (raw) => {\n\t\tconst { resolved, codec } = metadata();\n\t\treturn consumeScalarInclude(include, resolved, codec, raw);\n\t};\n}\nasync function consumeFirstRow(rows) {\n\treturn (await rows.toArray())[0] ?? null;\n}\nfunction describeCollectionFirst(options) {\n\tconst rows = describeCollectionRows(options);\n\treturn {\n\t\t...rows,\n\t\tconsume: (source) => consumeFirstRow(rows.consume(source))\n\t};\n}\nfunction describeCollectionFirstOrThrow(options) {\n\tconst rows = describeCollectionRows(options);\n\treturn {\n\t\t...rows,\n\t\tconsume: (source) => rows.consume(source).firstOrThrow()\n\t};\n}\nfunction dispatchCollectionRows(options) {\n\tconst { context, runtime, state, tableName, modelName, namespaceId } = options;\n\tconst descriptionOptions = {\n\t\tcontext,\n\t\tstate,\n\t\ttableName,\n\t\tmodelName,\n\t\tnamespaceId\n\t};\n\tif (state.includes.length === 0) {\n\t\tconst query = describeExecutionRows(descriptionOptions);\n\t\treturn query.consume(queryPlanRows(runtime, query.plan));\n\t}\n\tresolvePolymorphismInfo(context.contract, namespaceId, modelName);\n\tconst generator = async function* () {\n\t\tconst query = describeExecutionRows(descriptionOptions);\n\t\tyield* query.consume(queryPlanRows(runtime, query.plan));\n\t};\n\treturn new AsyncIterableResult(generator());\n}\nfunction consumeIncludeRows(context, state, namespaceId, modelName, rows) {\n\tconst { contract } = context;\n\tconst generator = async function* () {\n\t\tconst parentRowsRaw = await rows.toArray();\n\t\tif (parentRowsRaw.length === 0) return;\n\t\tconst polyInfo = resolvePolymorphismInfo(contract, namespaceId, modelName);\n\t\tconst parentRows = parentRowsRaw.map((row) => {\n\t\t\treturn {\n\t\t\t\traw: row,\n\t\t\t\tmapped: polyInfo ? mapPolymorphicRow(contract, namespaceId, modelName, polyInfo, row, state.variantName) : mapStorageRowToModelFields(contract, namespaceId, modelName, row)\n\t\t\t};\n\t\t});\n\t\tconst bindings = /* @__PURE__ */ new WeakMap();\n\t\tfor (const parent of parentRows) for (const include of state.includes) parent.mapped[include.relationName] = decodeIncludePayload(contract, context, include, parent.raw[include.relationName], bindings);\n\t\tfor (const row of parentRows) yield blindCast(row.mapped);\n\t};\n\treturn new AsyncIterableResult(generator());\n}\n/**\n* Reload the rows a mutation just wrote (create / createAll / update /\n* updateAll / upsert) through the read-path dispatch, so `.include()`\n* relations resolve via the exact same correlated-subquery builder,\n* decoding, and polymorphism mapping a read query uses — there is no\n* parallel mutation read-back implementation.\n*\n* The mutation returns only its identity columns (PK / unique); this\n* re-selects those rows with the caller's projection + includes, keyed\n* by `identity IN (...)`. One round-trip regardless of row count or\n* include depth. The read-back observes the just-written rows because\n* it runs on the same runtime — and therefore the same transaction —\n* the mutation ran on.\n*\n* Delete read-back does NOT come through here: a parent-anchored\n* include query can't observe an already-deleted row, so delete reads\n* its snapshot before issuing the DELETE (see `collection.ts`).\n*/\nfunction reloadMutationRowsByIdentities(options) {\n\tconst { context, runtime, tableName, modelName, namespaceId, identityRows, selectedFields, includes } = options;\n\tconst { contract } = context;\n\tif (identityRows.length === 0) return emptyResult();\n\tconst identityColumns = resolveRowIdentityColumns(contract, namespaceId, tableName);\n\tif (identityColumns.length === 0) throw ormError(\"ORM.ROW_IDENTITY_MISSING\", `Cannot load includes for the mutation result on model \"${modelName}\": table \"${tableName}\" has no primary key or unique constraint to key the include read-back on.`, { meta: {\n\t\tmodel: modelName,\n\t\ttable: tableName\n\t} });\n\tconst identityFilter = buildIdentityInFilter(contract, namespaceId, tableName, identityColumns, identityRows);\n\tif (!identityFilter) return emptyResult();\n\treturn dispatchCollectionRows({\n\t\tcontext,\n\t\truntime,\n\t\tstate: {\n\t\t\t...emptyState(),\n\t\t\tfilters: [identityFilter],\n\t\t\tselectedFields,\n\t\t\tincludes\n\t\t},\n\t\ttableName,\n\t\tmodelName,\n\t\tnamespaceId\n\t});\n}\nfunction emptyResult() {\n\treturn new AsyncIterableResult((async function* () {})());\n}\nfunction buildIdentityInFilter(contract, namespaceId, tableName, identityColumns, identityRows) {\n\tconst [singleColumn, ...rest] = identityColumns;\n\tif (singleColumn !== void 0 && rest.length === 0) {\n\t\tconst values = identityRows.map((row) => row[singleColumn]).filter((value) => value !== void 0);\n\t\tif (values.length === 0) return;\n\t\treturn bindWhereExpr(contract, BinaryExpr.in(ColumnRef.of(tableName, singleColumn), ListExpression.fromValues(values)), namespaceId);\n\t}\n\tif (identityRows.length === 0) return;\n\tconst tuples = identityRows.map((row) => AndExpr.of(identityColumns.map((column) => BinaryExpr.eq(ColumnRef.of(tableName, column), LiteralExpr.of(row[column])))));\n\treturn bindWhereExpr(contract, OrExpr.of(tuples), namespaceId);\n}\n/**\n* Decode a single-query include payload from a parent row's raw cell\n* into the model-shaped value that downstream consumers see. Recurses\n* through `include.nested.includes` so depth-2+ trees — emitted by the\n* recursive correlated-subquery builder — are decoded symmetrically.\n*\n* The shape produced by the SQL side is one JSON column per top-level\n* include; values nested inside that JSON are already-parsed JS values\n* after the outer `JSON.parse`, so `parseIncludedRows` recognises both\n* the string (top-level) and array (nested) forms.\n*\n* Scalar leaves arrive wrapped in a `{ value: <primitive> }` JSON\n* envelope (see `buildIncludeChildScalarSelect`); the branch below\n* unwraps that envelope and passes the value straight through. The empty-relation value reads off\n* the operation's declared row via `emptyAggregateResult`: `null` where the row is nullable,\n* otherwise the row's declared empty value (so `count()` is `0`).\n*\n* Combine descriptors arrive as a JSON object keyed by branch name;\n* each branch is dispatched to the row or scalar decoder per its\n* declared shape (see `decodeCombineIncludePayload`).\n*/\nfunction decodeIncludePayload(contract, context, include, raw, bindings) {\n\tif (include.scalar) return decodeScalarIncludePayload(contract, context, include, include.scalar, raw);\n\tif (include.combine) return decodeCombineIncludePayload(contract, context, include, include.combine, raw, bindings);\n\tconst rawChildren = parseIncludedRows(include, raw);\n\tconst polyInfo = resolvePolymorphismInfo(contract, include.relatedNamespaceId, include.relatedModelName);\n\tconst mapChildRow = polyInfo ? (childRow) => mapPolymorphicRow(contract, include.relatedNamespaceId, include.relatedModelName, polyInfo, childRow, include.nested.variantName) : createStorageRowMapper(contract, include.relatedNamespaceId, include.relatedModelName);\n\tlet columns = bindings.get(include);\n\tif (!columns) {\n\t\tcolumns = /* @__PURE__ */ new Map();\n\t\tbindings.set(include, columns);\n\t}\n\tconst columnBindings = columns;\n\treturn consumeRowInclude(rawChildren, mapChildRow, (key) => {\n\t\tlet binding = columnBindings.get(key);\n\t\tif (binding === void 0) {\n\t\t\tbinding = resolveIncludedColumnBinding(contract, context, include, key);\n\t\t\tcolumnBindings.set(key, binding);\n\t\t}\n\t\treturn binding;\n\t}, include.nested.includes.map((nested) => ({\n\t\talias: nested.relationName,\n\t\tconsume: (value) => decodeIncludePayload(contract, context, nested, value, bindings)\n\t})), isToOneCardinality(include.cardinality));\n}\nfunction consumeRowInclude(rawChildren, mapChildRow, bindingFor, nested, toOne) {\n\tconst mappedChildren = [];\n\tfor (const childRow of rawChildren) {\n\t\tconst decodedChildRow = decodeIncludedStorageRow(childRow, bindingFor);\n\t\tconst mapped = mapChildRow(decodedChildRow);\n\t\tfor (const child of nested) mapped[child.alias] = child.consume(decodedChildRow[child.alias]);\n\t\tmappedChildren.push(mapped);\n\t}\n\treturn toOne ? mappedChildren[0] ?? null : mappedChildren;\n}\nfunction decodeIncludedStorageRow(row, bindingFor) {\n\tconst decoded = {};\n\tfor (const [key, value] of Object.entries(row)) {\n\t\tif (value === null || value === void 0) {\n\t\t\tdecoded[key] = value;\n\t\t\tcontinue;\n\t\t}\n\t\tconst binding = bindingFor(key);\n\t\tdecoded[key] = binding ? decodeIncludedColumnValue(binding.ref, binding.codecId, binding.codec, value) : value;\n\t}\n\treturn decoded;\n}\nfunction resolveIncludedColumnBinding(contract, context, include, key) {\n\tconst ref = resolveIncludedColumnRef(contract, include, key);\n\tif (!ref) return null;\n\tconst codec = context.contractCodecs.forColumn(include.relatedNamespaceId, ref.table, ref.column);\n\tif (!codec) return null;\n\treturn {\n\t\tref,\n\t\tcodec,\n\t\tcodecId: context.codecDescriptors.codecRefForColumn(include.relatedNamespaceId, ref.table, ref.column)?.codecId ?? ref.storageColumn.codecId\n\t};\n}\nfunction resolveIncludedColumnRef(contract, include, key) {\n\tconst baseColumn = resolveColumn(contract, include.relatedNamespaceId, include.relatedTableName, key);\n\tif (baseColumn) return {\n\t\ttable: include.relatedTableName,\n\t\tcolumn: key,\n\t\tstorageColumn: baseColumn\n\t};\n\tconst polyInfo = resolvePolymorphismInfo(contract, include.relatedNamespaceId, include.relatedModelName);\n\tif (!polyInfo) return;\n\tfor (const variant of polyInfo.mtiVariants) {\n\t\tconst prefix = `${variant.table}__`;\n\t\tif (!key.startsWith(prefix)) continue;\n\t\tconst column = key.slice(prefix.length);\n\t\tconst variantColumn = resolveColumn(contract, include.relatedNamespaceId, variant.table, column);\n\t\tif (variantColumn) return {\n\t\t\ttable: variant.table,\n\t\t\tcolumn,\n\t\t\tstorageColumn: variantColumn\n\t\t};\n\t}\n}\nfunction decodeIncludedColumnValue(ref, codecId, codec, value) {\n\tif (ref.storageColumn.many !== false) {\n\t\tif (!Array.isArray(value)) wrapIncludedDecodeFailure(/* @__PURE__ */ new TypeError(`expected an array from the driver for many-typed column, got ${typeof value}`), ref, codecId);\n\t\tconst decoded = [];\n\t\tfor (const element of value) {\n\t\t\tif (element === null || element === void 0) {\n\t\t\t\tdecoded.push(null);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdecoded.push(decodeIncludedJsonValue(ref, codecId, codec, element));\n\t\t}\n\t\treturn decoded;\n\t}\n\treturn decodeIncludedJsonValue(ref, codecId, codec, value);\n}\n/** `ref` names the value for a decode failure; an aggregate names its relation where a column would name itself. */\nfunction decodeIncludedJsonValue(ref, codecId, codec, value) {\n\ttry {\n\t\treturn codec.decodeJson(blindCast(value));\n\t} catch (error) {\n\t\tif (isRuntimeError(error)) throw error;\n\t\twrapIncludedDecodeFailure(error, ref, codecId);\n\t}\n}\nfunction wrapIncludedDecodeFailure(error, ref, codecId) {\n\tif (isInternalError(error)) throw error;\n\tconst message = error instanceof Error ? error.message : String(error);\n\tconst wrapped = runtimeError(\"RUNTIME.DECODE_FAILED\", `Failed to decode column ${ref.table}.${ref.column} with codec '${codecId}': ${message}`, {\n\t\ttable: ref.table,\n\t\tcolumn: ref.column,\n\t\tcodec: codecId\n\t});\n\twrapped.cause = error;\n\tthrow wrapped;\n}\n/**\n* Decode the combine payload produced by `buildIncludeChildCombineSelect`.\n*\n* The raw value is a JSON object (already parsed by the SQL layer when\n* top-level, or already a JS object when nested) whose keys are branch\n* names. Each branch value is decoded per its declared kind:\n* - row branch -> recurse via `decodeIncludePayload` with a synthetic\n* IncludeExpr carrying the branch's state in `nested`. This walks\n* nested row-level includes the same way a plain row include would.\n* - scalar branch -> unwrap the `{value: ...}` envelope via the\n* standalone scalar decoder.\n*\n* On a parent with zero matching child rows the correlated subquery\n* still produces one row (aggregates collapse the empty input to a\n* single row), so the combine envelope here is always present in the\n* read path. Mutation read-back goes through the same read dispatch,\n* so a missing or non-object envelope here is always a planner/decoder\n* bug — `parseCombineEnvelope` throws loudly rather than papering over\n* it with an empty shape.\n*/\nfunction decodeCombineIncludePayload(contract, context, include, branches, raw, bindings) {\n\tconst parsed = parseCombineEnvelope(include, raw);\n\tconst result = {};\n\tfor (const [branchName, branch] of Object.entries(branches)) {\n\t\tconst branchRaw = parsed[branchName];\n\t\tif (branch.kind === \"rows\") result[branchName] = decodeIncludePayload(contract, context, {\n\t\t\t...include,\n\t\t\tnested: branch.state,\n\t\t\tscalar: void 0,\n\t\t\tcombine: void 0\n\t\t}, branchRaw, bindings);\n\t\telse result[branchName] = decodeScalarIncludePayload(contract, context, include, branch.selector, branchRaw);\n\t}\n\treturn result;\n}\nfunction parseCombineEnvelope(include, raw) {\n\tif (raw === null || raw === void 0) throw new InternalError(`combine() envelope for include \"${include.relationName}\" is missing (got ${raw === null ? \"null\" : \"undefined\"}); the correlated subquery should always produce a JSON object — this indicates a planner or decoder bug.`);\n\tconst parsed = parseIncludePayload(raw);\n\tif (!isPlainObjectEnvelope(parsed)) throw new InternalError(`combine() envelope for include \"${include.relationName}\" has unexpected shape (expected object, got ${describeEnvelopeShape(parsed)}); this indicates a planner or decoder bug.`);\n\treturn parsed;\n}\nfunction isPlainObjectEnvelope(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\nfunction describeEnvelopeShape(value) {\n\tif (value === null) return \"null\";\n\tif (Array.isArray(value)) return \"array\";\n\treturn typeof value;\n}\n/**\n* Pull the primitive scalar value out of the JSON envelope emitted by\n* the correlated scalar builder.\n*\n* Contract: the envelope is always either\n* - a `{ value: <primitive> }` JSON object (the SQL path), or\n* - `null` / `undefined` (no row reached the decoder), answered with `emptyAggregateResult`.\n*\n* Any other shape — array, primitive, string that JSON-parses to\n* non-object — indicates a planner / decoder bug, so we throw\n* loudly naming the include relation rather than soft-handling.\n* Mirrors `parseCombineEnvelope`'s strict shape gate.\n*\n* The value passes through its own codec — the one the planner projected it\n* under — because it arrived inside a JSON document, where a count past 2^53\n* would otherwise have been read as a rounded number. Resolution mirrors\n* planning — the same registry, operation, and column — so the empty-relation\n* answer derives from the operation's declared row: NULL where the row is\n* nullable, else the value that row declares. The outer `raw === null` fallback is\n* defensive cover for an empty parent set; in single-query dispatch the\n* correlated subquery always produces a row, so the inner envelope's `value`\n* is always set by SQL.\n*/\nfunction decodeScalarIncludePayload(contract, context, include, scalar, raw) {\n\tconst { resolved, codec } = resolveScalarIncludeMetadata(contract, context, include, scalar);\n\treturn consumeScalarInclude(include, resolved, codec, raw);\n}\nfunction resolveScalarIncludeMetadata(contract, context, include, scalar) {\n\tconst resolved = resolveAggregate({\n\t\taggregates: context.aggregateDescriptors,\n\t\tcontract,\n\t\tnamespaceId: include.relatedNamespaceId,\n\t\ttableName: include.relatedTableName,\n\t\tfn: scalar.fn,\n\t\tcolumn: scalar.column\n\t});\n\treturn {\n\t\tresolved,\n\t\tcodec: context.contractCodecs.forCodecRef(resolved.codec)\n\t};\n}\nfunction consumeScalarInclude(include, resolved, codec, raw) {\n\tif (raw === null || raw === void 0) return emptyAggregateResult(resolved, codec);\n\tconst parsed = parseIncludePayload(raw);\n\tif (!isPlainObjectEnvelope(parsed)) throw new InternalError(`scalar() envelope for include \"${include.relationName}\" has unexpected shape (expected object, got ${describeEnvelopeShape(parsed)}); this indicates a planner or decoder bug.`);\n\tconst value = parsed[\"value\"];\n\tif (value === null || value === void 0) return emptyAggregateResult(resolved, codec);\n\treturn decodeIncludedJsonValue({\n\t\ttable: include.relatedTableName,\n\t\tcolumn: include.relationName\n\t}, resolved.codec.codecId, codec, value);\n}\nfunction parseIncludedRows(include, value) {\n\tif (value === null || value === void 0) return [];\n\tconst parsed = parseIncludePayload(value);\n\tif (!Array.isArray(parsed)) return [];\n\tconst rows = [];\n\tfor (const item of parsed) {\n\t\tif (!isPlainObjectEnvelope(item)) throw new InternalError(`Include row envelope for relation \"${include.relationName}\" has unexpected shape (expected object, got ${describeEnvelopeShape(item)}); this indicates a planner or decoder bug.`);\n\t\trows.push({ ...item });\n\t}\n\treturn rows;\n}\nfunction parseIncludePayload(value) {\n\tif (typeof value !== \"string\") return value;\n\ttry {\n\t\treturn JSON.parse(value);\n\t} catch {\n\t\treturn [];\n\t}\n}\n//#endregion\n//#region src/collection-mutation-dispatch.ts\nfunction createMutationRowMapper(contract, namespaceId, modelName, variantName) {\n\tconst polyInfo = resolvePolymorphismInfo(contract, namespaceId, modelName);\n\treturn polyInfo ? (row) => mapPolymorphicRow(contract, namespaceId, modelName, polyInfo, row, variantName) : (row) => mapStorageRowToModelFields(contract, namespaceId, modelName, row);\n}\nfunction dispatchMutationRows(options) {\n\tconst { context, runtime, compiled, tableName, modelName, namespaceId, variantName, includes, selectedFields, hiddenColumns, mapRow } = options;\n\tconst { contract } = context;\n\tconst mapStorageRow = createMutationRowMapper(contract, namespaceId, modelName, variantName);\n\tif (includes.length === 0) return mapResultRows(queryPlanRows(runtime, compiled), (rawRow) => {\n\t\tconst mapped = mapStorageRow(rawRow);\n\t\tif (hiddenColumns.length > 0) stripHiddenMappedFields(contract, namespaceId, modelName, mapped, hiddenColumns);\n\t\treturn mapRow(mapped);\n\t});\n\tconst generator = async function* () {\n\t\tconst identityRows = await queryPlanRows(runtime, compiled).toArray();\n\t\tyield* reloadMutationRowsByIdentities({\n\t\t\tcontext,\n\t\t\truntime,\n\t\t\ttableName,\n\t\t\tmodelName,\n\t\t\tnamespaceId,\n\t\t\tidentityRows,\n\t\t\tselectedFields,\n\t\t\tincludes\n\t\t});\n\t};\n\treturn new AsyncIterableResult(generator());\n}\nfunction dispatchSplitMutationRows(options) {\n\tconst { context, runtime, plans, tableName, modelName, namespaceId, variantName, includes, selectedFields, hiddenColumns, mapRow } = options;\n\tconst { contract } = context;\n\tconst mapStorageRow = createMutationRowMapper(contract, namespaceId, modelName, variantName);\n\tconst generator = async function* () {\n\t\tif (includes.length > 0) {\n\t\t\tconst identityRows = [];\n\t\t\tfor (const plan of plans) identityRows.push(...await queryPlanRows(runtime, plan).toArray());\n\t\t\tyield* reloadMutationRowsByIdentities({\n\t\t\t\tcontext,\n\t\t\t\truntime,\n\t\t\t\ttableName,\n\t\t\t\tmodelName,\n\t\t\t\tnamespaceId,\n\t\t\t\tidentityRows,\n\t\t\t\tselectedFields,\n\t\t\t\tincludes\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tfor (const plan of plans) for await (const rawRow of queryPlanRows(runtime, plan)) {\n\t\t\tconst mapped = mapStorageRow(rawRow);\n\t\t\tif (hiddenColumns.length > 0) stripHiddenMappedFields(contract, namespaceId, modelName, mapped, hiddenColumns);\n\t\t\tyield mapRow(mapped);\n\t\t}\n\t};\n\treturn new AsyncIterableResult(generator());\n}\nasync function executeMutationReturningSingleRow(options) {\n\tconst { context, runtime, compiled, tableName, modelName, namespaceId, variantName, includes, selectedFields, hiddenColumns, mapRow, operation, onMissingRowMessage } = options;\n\tconst { contract } = context;\n\tconst mapStorageRow = createMutationRowMapper(contract, namespaceId, modelName, variantName);\n\tif (includes.length === 0) {\n\t\tconst first = (await queryPlanRows(runtime, compiled).toArray())[0];\n\t\tif (!first) return null;\n\t\tconst mapped = mapStorageRow(first);\n\t\tif (hiddenColumns.length > 0) stripHiddenMappedFields(contract, namespaceId, modelName, mapped, hiddenColumns);\n\t\treturn mapRow(mapped);\n\t}\n\tconst identityRows = await queryPlanRows(runtime, compiled).toArray();\n\tif (identityRows.length === 0) return null;\n\tfor await (const row of reloadMutationRowsByIdentities({\n\t\tcontext,\n\t\truntime,\n\t\ttableName,\n\t\tmodelName,\n\t\tnamespaceId,\n\t\tidentityRows,\n\t\tselectedFields,\n\t\tincludes\n\t})) return row;\n\tthrow ormError(\"ORM.MUTATION_ROW_MISSING\", onMissingRowMessage, { meta: {\n\t\toperation,\n\t\tmodel: modelName,\n\t\ttableName\n\t} });\n}\n//#endregion\n//#region src/filters.ts\nfunction and(...exprs) {\n\treturn AndExpr.of(exprs);\n}\nfunction or(...exprs) {\n\treturn OrExpr.of(exprs);\n}\nfunction not(expr) {\n\treturn expr.not();\n}\nfunction all() {\n\treturn AndExpr.true();\n}\nfunction shorthandToWhereExpr(context, namespaceId, modelName, filters) {\n\tconst contract = context.contract;\n\tconst tableName = resolveModelTableName(contract, namespaceId, modelName);\n\tconst fieldToColumn = getFieldToColumnMap(contract, namespaceId, modelName);\n\tconst exprs = [];\n\tfor (const [fieldName, value] of Object.entries(filters)) {\n\t\tif (value === void 0) continue;\n\t\tconst columnName = fieldToColumn[fieldName] ?? fieldName;\n\t\tconst left = ColumnRef.of(tableName, columnName);\n\t\tif (value === null) {\n\t\t\texprs.push(NullCheckExpr.isNull(left));\n\t\t\tcontinue;\n\t\t}\n\t\tassertFieldHasEqualityTrait(context, namespaceId, modelName, fieldName);\n\t\texprs.push(predicateComparison(\"eq\", left, predicateExpression(value) ?? LiteralExpr.of(value)));\n\t}\n\tif (exprs.length === 0) return;\n\treturn exprs.length === 1 ? exprs[0] : and(...exprs);\n}\nfunction assertFieldHasEqualityTrait(context, namespaceId, modelName, fieldName) {\n\tconst fieldType = modelOf(context.contract, namespaceId, modelName)?.fields?.[fieldName]?.type;\n\tconst codecId = fieldType?.kind === \"scalar\" ? fieldType.codecId : void 0;\n\tif (codecId === void 0 || !hasTrait(context, codecId, \"equality\")) throw ormError(\"ORM.FILTER_UNSUPPORTED\", `Shorthand filter on \"${modelName}.${fieldName}\": field does not support equality comparisons`, { meta: {\n\t\tmodel: modelName,\n\t\tfield: fieldName,\n\t\ttrait: \"equality\"\n\t} });\n}\n//#endregion\n//#region src/fragments.ts\nfunction nullability(nullable) {\n\treturn nullable ? \"may be null\" : \"is never null\";\n}\nfunction isFieldBuilder(value) {\n\treturn \"build\" in value && typeof value.build === \"function\";\n}\nfunction isListMultiplicity(value) {\n\treturn typeof value === \"object\" && value !== null && \"elementNullable\" in value && typeof value.elementNullable === \"boolean\";\n}\nfunction isMultiplicity(value) {\n\treturn value === void 0 || value === false || isListMultiplicity(value);\n}\nfunction isFieldSpec(value) {\n\treturn \"codecId\" in value && typeof value.codecId === \"string\" && \"nullable\" in value && typeof value.nullable === \"boolean\" && (!(\"many\" in value) || isMultiplicity(value.many));\n}\nfunction multiplicity(many) {\n\treturn isListMultiplicity(many) ? { elementNullable: many.elementNullable } : false;\n}\nconst FIELD_DECLARATION_FIX = \"Declare each field with a field builder, such as field.temporal.timestamptz().optional(), or with { codecId, nullable }. Declare a list with .many() or many: { elementNullable: false }, or, when its elements may be null, with .many({ elementsNullable: true }) or many: { elementNullable: true }.\";\nfunction declaredFieldSpec(name, declaration) {\n\tif (typeof declaration === \"object\" && declaration !== null && isFieldBuilder(declaration)) {\n\t\tconst built = declaration.build();\n\t\tconst descriptor = typeof built === \"object\" && built !== null && \"descriptor\" in built ? built.descriptor : void 0;\n\t\tconst nullable = typeof built === \"object\" && built !== null && \"nullable\" in built ? built.nullable : void 0;\n\t\tif (typeof descriptor !== \"object\" || descriptor === null || !(\"codecId\" in descriptor) || typeof descriptor.codecId !== \"string\" || typeof nullable !== \"boolean\") throw ormError(\"ORM.ARGUMENT_INVALID\", `Cannot define the fragment: the field builder for ${name} names no column type`, {\n\t\t\twhy: \"A fragment for any model matches each declared field by its codec and nullability, and this builder refers to a named type instead of a column type.\",\n\t\t\tfix: \"Declare the field with a builder that has a column type, such as field.text() or field.column(textColumn), or with { codecId, nullable }.\",\n\t\t\tmeta: { field: name }\n\t\t});\n\t\tconst many = typeof built === \"object\" && built !== null && \"many\" in built && built.many;\n\t\tif (!isMultiplicity(many)) throw ormError(\"ORM.ARGUMENT_INVALID\", `Cannot define the fragment: the field builder for ${name} builds a many that is not false or { elementNullable }`, {\n\t\t\twhy: `A field builder's build() returns many as false or undefined for one value, or as { elementNullable } with a boolean elementNullable for a list; received ${describeReceived(many)} for ${name}.`,\n\t\t\tfix: FIELD_DECLARATION_FIX,\n\t\t\tmeta: { field: name }\n\t\t});\n\t\treturn {\n\t\t\tcodecId: descriptor.codecId,\n\t\t\tnullable,\n\t\t\tmany: multiplicity(many)\n\t\t};\n\t}\n\tif (typeof declaration === \"object\" && declaration !== null && isFieldSpec(declaration)) return {\n\t\tcodecId: declaration.codecId,\n\t\tnullable: declaration.nullable,\n\t\tmany: multiplicity(declaration.many)\n\t};\n\tthrow ormError(\"ORM.ARGUMENT_INVALID\", `Cannot define the fragment: the declaration of field ${name} is not a field builder or { codecId, nullable }`, {\n\t\twhy: `Each field of a fragment is declared with a field builder or with an object that has a string codecId, a boolean nullable and, for a list, many: { elementNullable } with a boolean elementNullable; received ${describeReceived(declaration)} for ${name}.`,\n\t\tfix: FIELD_DECLARATION_FIX,\n\t\tmeta: { field: name }\n\t});\n}\nfunction declaredFieldSpecs(declarations) {\n\tif (typeof declarations !== \"object\" || declarations === null || Array.isArray(declarations)) throw ormError(\"ORM.ARGUMENT_INVALID\", \"Cannot define the fragment: the fields are not an object\", {\n\t\twhy: `The first argument of fragment maps the name of each field the fragment needs to its declaration; received ${describeReceived(declarations)}.`,\n\t\tfix: FIELD_DECLARATION_FIX,\n\t\tmeta: { argument: \"fields\" }\n\t});\n\treturn Object.entries(declarations).map(([name, declaration]) => [name, declaredFieldSpec(name, declaration)]);\n}\n/** Throws `ORM.ARGUMENT_INVALID` unless `body`, the body of a fragment, is a function. */\nfunction assertFragmentBody(body) {\n\tif (typeof body !== \"function\") throw ormError(\"ORM.ARGUMENT_INVALID\", \"Cannot define the fragment: the body is not a function\", {\n\t\twhy: `The body of a fragment is a function that receives a collection and returns one; received ${describeReceived(body)}.`,\n\t\tfix: \"Pass a function, such as (rows) => rows.where(...).\",\n\t\tmeta: { argument: \"body\" }\n\t});\n}\nfunction hasContract(ctx) {\n\treturn \"context\" in ctx && typeof ctx.context === \"object\" && ctx.context !== null && \"contract\" in ctx.context && typeof ctx.context.contract === \"object\" && ctx.context.contract !== null;\n}\nfunction isModelCollection(value) {\n\treturn typeof value === \"object\" && value !== null && \"ctx\" in value && typeof value.ctx === \"object\" && value.ctx !== null && hasContract(value.ctx) && \"modelName\" in value && typeof value.modelName === \"string\" && \"namespaceId\" in value && typeof value.namespaceId === \"string\";\n}\n/** Throws `ORM.ARGUMENT_INVALID` unless `value`, what a fragment is applied to, is a collection. */\nfunction assertFragmentReceiver(value) {\n\tif (!isModelCollection(value)) throw ormError(\"ORM.ARGUMENT_INVALID\", \"Cannot apply the fragment: it was not given a collection\", {\n\t\twhy: `A fragment is applied to a collection, such as db.orm.public.Post; received ${describeReceived(value)}.`,\n\t\tfix: \"Pass the fragment to with on a collection: collection.with(fragment).\",\n\t\tmeta: { argument: \"collection\" }\n\t});\n}\n/** Throws `ORM.ARGUMENT_INVALID` unless `value` is a collection of the model and namespace a fragment for one model was made from. */\nfunction assertModelFragmentReceiver(source, value) {\n\tassertFragmentReceiver(value);\n\tif (value.modelName !== source.modelName || value.namespaceId !== source.namespaceId) {\n\t\tconst made = `${source.namespaceId}.${source.modelName}`;\n\t\tconst given = `${value.namespaceId}.${value.modelName}`;\n\t\tthrow ormError(\"ORM.ARGUMENT_INVALID\", `Cannot apply a fragment for ${made} to a collection of ${given}`, {\n\t\t\twhy: `The fragment was made with ${made}.fragment(...), and its body was written for that model.`,\n\t\t\tfix: `Apply the fragment to a collection of ${made}, or make a fragment from ${given}.`,\n\t\t\tmeta: {\n\t\t\t\tmodel: source.modelName,\n\t\t\t\tnamespace: source.namespaceId,\n\t\t\t\treceivedModel: value.modelName,\n\t\t\t\treceivedNamespace: value.namespaceId\n\t\t\t}\n\t\t});\n\t}\n}\n/** The model as error messages name it: with its namespace when the contract has more than one. */\nfunction modelLabel(collection) {\n\treturn Object.keys(collection.ctx.context.contract.domain.namespaces).length > 1 ? `${collection.namespaceId}.${collection.modelName}` : collection.modelName;\n}\n/** Throws `ORM.ARGUMENT_INVALID` unless `result`, what a fragment's body returned, is a collection of the receiver's model, namespace and class. */\nfunction assertDeclaredFieldsFragmentResult(receiver, result) {\n\tif (!(isModelCollection(result) && result.modelName === receiver.modelName && result.namespaceId === receiver.namespaceId && result instanceof receiver.constructor)) {\n\t\tconst label = modelLabel(receiver);\n\t\tthrow ormError(\"ORM.ARGUMENT_INVALID\", `Cannot apply the fragment to ${label}: its body did not return a collection of ${label}`, {\n\t\t\twhy: `The body of a fragment for any model returns the collection it received, after where, orderBy, limit or offset; it returned ${isModelCollection(result) ? `a collection of ${modelLabel(result)}` : describeReceived(result)}.`,\n\t\t\tfix: \"Return the collection the body receives, or one made from it by calling its methods.\",\n\t\t\tmeta: {\n\t\t\t\tmodel: receiver.modelName,\n\t\t\t\tnamespace: receiver.namespaceId,\n\t\t\t\treturned: isModelCollection(result) ? result.modelName : describeReceived(result)\n\t\t\t}\n\t\t});\n\t}\n}\nfunction elementNullability(elementNullable) {\n\treturn elementNullable ? \"may be null\" : \"are never null\";\n}\nfunction sameMultiplicity(a, b) {\n\treturn a === false || b === false ? a === b : a.elementNullable === b.elementNullable;\n}\nfunction fieldShape(many) {\n\treturn many === false ? \"holds one value\" : `is a list whose elements ${elementNullability(many.elementNullable)}`;\n}\nfunction declarationFor(many) {\n\tif (many === false) return \"as one value, without .many() or many\";\n\treturn many.elementNullable ? \"as a list whose elements may be null, with .many({ elementsNullable: true }) or many: { elementNullable: true }\" : \"as a list whose elements are never null, with .many() or many: { elementNullable: false }\";\n}\nfunction describeField(field) {\n\tconst value = `with codec ${field.codecId} that ${nullability(field.nullable)}`;\n\treturn field.many === false ? value : `${value} and whose elements ${elementNullability(field.many.elementNullable)}`;\n}\nfunction assertDeclaredFieldsFragmentFields(collection, fields) {\n\tconst { contract } = collection.ctx.context;\n\tconst { modelName, namespaceId } = collection;\n\tconst label = modelLabel(collection);\n\tconst model = modelOf(contract, namespaceId, modelName);\n\tfor (const [name, spec] of fields) {\n\t\tconst declared = `The fragment was declared for models that have a ${spec.many === false ? \"field\" : \"list field\"} ${name} ${describeField(spec)}.`;\n\t\tconst meta = {\n\t\t\tmodel: modelName,\n\t\t\tnamespace: namespaceId,\n\t\t\tfield: name,\n\t\t\tcodecId: spec.codecId,\n\t\t\tnullable: spec.nullable,\n\t\t\tmany: spec.many\n\t\t};\n\t\tconst modelFields = model?.fields ?? {};\n\t\tif (!Object.hasOwn(modelFields, name)) throw ormError(\"ORM.FIELD_UNKNOWN\", `Cannot apply a fragment to ${label}: it has no field ${name}`, {\n\t\t\twhy: declared,\n\t\t\tfix: `Apply the fragment to a model that has a field ${name}, or remove ${name} from the declaration in the fragment.`,\n\t\t\tmeta\n\t\t});\n\t\tconst fieldMany = multiplicity(modelFields[name]?.many);\n\t\tconst column = resolveColumn(contract, namespaceId, collection.tableName, resolveFieldToColumn(contract, namespaceId, modelName, name));\n\t\tconst actual = column === void 0 ? `${label}.${name} has no column.` : fieldMany === false ? `${label}.${name} has codec ${column.codecId} and ${nullability(column.nullable)}.` : `${label}.${name} is a list ${describeField({\n\t\t\tcodecId: column.codecId,\n\t\t\tnullable: column.nullable,\n\t\t\tmany: fieldMany\n\t\t})}.`;\n\t\tconst sameCodecAndNullability = column?.codecId === spec.codecId && column.nullable === spec.nullable;\n\t\tif (!sameCodecAndNullability || !sameMultiplicity(fieldMany, spec.many)) throw ormError(\"ORM.FIELD_UNKNOWN\", `Cannot apply a fragment to ${label}: its field ${name} does not match the declaration`, {\n\t\t\twhy: `${declared} ${actual}`,\n\t\t\tfix: sameCodecAndNullability ? `Apply the fragment to a model whose ${name} field ${fieldShape(spec.many)}, or declare ${name} ${declarationFor(fieldMany)}.` : `Apply the fragment to a model whose ${name} field has that codec and nullability, or change the declaration in the fragment.`,\n\t\t\tmeta\n\t\t});\n\t}\n}\n/**\n* Define a fragment for any model that has the declared fields. Reached as the `fragment` method of the client `orm()` returns.\n*/\nfunction defineDeclaredFieldsFragment(declarations, body) {\n\tconst fields = declaredFieldSpecs(declarations);\n\tassertFragmentBody(body);\n\treturn blindCast((collection) => {\n\t\tconst receiver = collection;\n\t\tassertFragmentReceiver(receiver);\n\t\tassertDeclaredFieldsFragmentFields(receiver, fields);\n\t\tconst result = body(blindCast(collection));\n\t\tassertDeclaredFieldsFragmentResult(receiver, result);\n\t\treturn result;\n\t});\n}\nconst SHOWN_LENGTH = 64;\nfunction shown(value) {\n\tconst characters = Array.from(value);\n\tconst cut = characters.length > SHOWN_LENGTH;\n\treturn {\n\t\ttext: JSON.stringify(cut ? `${characters.slice(0, SHOWN_LENGTH).join(\"\")}…` : value),\n\t\tcut\n\t};\n}\nfunction describeReceived(value) {\n\tif (value === void 0 || value === null) return String(value);\n\tif (Array.isArray(value)) return \"an array\";\n\tconst kind = typeof value;\n\treturn kind === \"object\" ? \"an object\" : `a ${kind}`;\n}\nfunction cutNote(subject, value) {\n\treturn value.cut ? ` The ${subject} above is cut to its first ${SHOWN_LENGTH} characters.` : \"\";\n}\nfunction fieldCodecId(collection, field) {\n\tconst { contract } = collection.ctx.context;\n\tconst column = resolveFieldToColumn(contract, collection.namespaceId, collection.modelName, field);\n\treturn resolveColumn(contract, collection.namespaceId, collection.tableName, column)?.codecId;\n}\nfunction canOrder(collection, field) {\n\tconst codecId = fieldCodecId(collection, field);\n\treturn codecId !== void 0 && hasTrait(collection.ctx.context, codecId, \"order\");\n}\nfunction orderableFieldNames(collection) {\n\tconst model = modelOf(collection.ctx.context.contract, collection.namespaceId, collection.modelName);\n\treturn Object.keys(model?.fields ?? {}).filter((field) => canOrder(collection, field));\n}\nfunction whyNotOrderable(collection, name) {\n\tconst { modelName } = collection;\n\tconst model = modelOf(collection.ctx.context.contract, collection.namespaceId, modelName);\n\tconst quoted = shown(name).text;\n\tif (Object.hasOwn(model?.relations ?? {}, name)) return `${quoted} is a relation of ${modelName}, not a field.`;\n\tif (!Object.hasOwn(model?.fields ?? {}, name)) return `${modelName} has no field ${quoted}.`;\n\treturn canOrder(collection, name) ? `${quoted} is not one of the fields allowed for ordering.` : `The codec ${fieldCodecId(collection, name)} of ${modelName}.${name} cannot be ordered.`;\n}\n/**\n* An `orderBy` selector for a field named by a string, such as an order parameter of a request. `allowed` lists the fields a request may order by. A name that is not in `allowed` or not an orderable field of the collection's model, and a direction other than `asc` or `desc`, throw `ORM.ARGUMENT_INVALID`. An undefined direction is `asc`.\n*\n* ```ts\n* db.Post.orderBy(orderByField(db.Post, input.orderBy, input.direction, ['title', 'createdAt']));\n* ```\n*/\nfunction orderByField(collection, name, direction, allowed) {\n\tconst receiver = collection;\n\tif (!isModelCollection(receiver)) throw ormError(\"ORM.ARGUMENT_INVALID\", \"Cannot order: orderByField was not given a collection\", {\n\t\twhy: `orderByField takes the collection it orders, such as db.orm.public.Post; received ${describeReceived(receiver)}.`,\n\t\tfix: \"Pass the collection the selector is for as the first argument.\",\n\t\tmeta: { argument: \"collection\" }\n\t});\n\tconst { modelName } = collection;\n\tconst requestedName = name;\n\tconst requestedDirection = direction === void 0 ? \"asc\" : direction;\n\tconst allowedList = allowed;\n\tif (!Array.isArray(allowedList) || allowedList.some((field) => typeof field !== \"string\")) throw ormError(\"ORM.ARGUMENT_INVALID\", `Cannot order ${modelName}: the allowed fields are not a list of names`, {\n\t\twhy: `orderByField takes the list of fields a request may order by; received ${describeReceived(allowedList)}.`,\n\t\tfix: `Pass an array of field names of ${modelName}, such as ['title', 'createdAt'].`,\n\t\tmeta: {\n\t\t\tmodel: modelName,\n\t\t\targument: \"allowed\"\n\t\t}\n\t});\n\tif (typeof requestedDirection !== \"string\") throw ormError(\"ORM.ARGUMENT_INVALID\", `Cannot order ${modelName}: the direction is not a string`, {\n\t\twhy: `An order direction is \"asc\" or \"desc\"; received ${describeReceived(requestedDirection)}.`,\n\t\tfix: \"Pass \\\"asc\\\" or \\\"desc\\\".\",\n\t\tmeta: {\n\t\t\tmodel: modelName,\n\t\t\tdirection: requestedDirection\n\t\t}\n\t});\n\tif (!isOrderByDirection(requestedDirection)) {\n\t\tconst shownDirection = shown(requestedDirection);\n\t\tthrow ormError(\"ORM.ARGUMENT_INVALID\", `Cannot order ${modelName} in direction ${shownDirection.text}`, {\n\t\t\twhy: \"An order direction is \\\"asc\\\" or \\\"desc\\\".\",\n\t\t\tfix: `Pass \"asc\" or \"desc\".${cutNote(\"direction\", shownDirection)}`,\n\t\t\tmeta: {\n\t\t\t\tmodel: modelName,\n\t\t\t\tdirection: requestedDirection\n\t\t\t}\n\t\t});\n\t}\n\tconst orderable = orderableFieldNames(collection);\n\tconst names = allowedList.filter((field) => orderable.includes(field));\n\tconst orderByOneOf = names.length === 0 ? `Pass an allowed list that names at least one field of ${modelName} that can be ordered.` : `Order by one of: ${names.join(\", \")}.`;\n\tif (typeof requestedName !== \"string\") throw ormError(\"ORM.ARGUMENT_INVALID\", `Cannot order ${modelName}: the field name is not a string`, {\n\t\twhy: `An order field name is a string; received ${describeReceived(requestedName)}.`,\n\t\tfix: orderByOneOf,\n\t\tmeta: {\n\t\t\tmodel: modelName,\n\t\t\tfield: requestedName\n\t\t}\n\t});\n\tif (!names.includes(requestedName)) {\n\t\tconst shownName = shown(requestedName);\n\t\tthrow ormError(\"ORM.ARGUMENT_INVALID\", `Cannot order ${modelName} by ${shownName.text}`, {\n\t\t\twhy: whyNotOrderable(collection, requestedName),\n\t\t\tfix: `${orderByOneOf}${cutNote(\"name\", shownName)}`,\n\t\t\tmeta: {\n\t\t\t\tmodel: modelName,\n\t\t\t\tfield: requestedName\n\t\t\t}\n\t\t});\n\t}\n\tconst field = blindCast(requestedName);\n\tconst order = requestedDirection;\n\treturn (row) => row[field][order]();\n}\n//#endregion\n//#region src/model-accessor.ts\nfunction hasThrough$1(relation) {\n\treturn relation.through !== void 0;\n}\nvar SqlTableBinding = class SqlTableBinding {\n\t#storage;\n\t#reference;\n\tconstructor(storage, reference) {\n\t\tthis.#storage = Object.freeze({ ...storage });\n\t\tthis.#reference = reference;\n\t\tObject.freeze(this);\n\t}\n\tstatic unaliased(storage) {\n\t\treturn new SqlTableBinding(storage, storage.tableName);\n\t}\n\tstatic aliased(storage, alias) {\n\t\treturn new SqlTableBinding(storage, alias);\n\t}\n\tcolumn(columnName) {\n\t\treturn ColumnRef.of(this.#reference, columnName);\n\t}\n\ttableSource(contract) {\n\t\treturn tableSourceForContract(contract, this.#storage.namespaceId, this.#storage.tableName, this.#reference);\n\t}\n\tisReferencedAs(candidate) {\n\t\treturn this.#reference === candidate;\n\t}\n\tisStoredAt(namespaceId, tableName) {\n\t\treturn this.#storage.namespaceId === namespaceId && this.#storage.tableName === tableName;\n\t}\n};\nvar ModelAccessorScope = class ModelAccessorScope {\n\tcurrent;\n\t#visibleBindings;\n\t#aliasCounter;\n\tconstructor(current, visibleBindings, aliasCounter) {\n\t\tthis.current = current;\n\t\tthis.#visibleBindings = Object.freeze([...visibleBindings]);\n\t\tthis.#aliasCounter = aliasCounter;\n\t\tObject.freeze(this);\n\t}\n\tstatic root(namespaceId, tableName) {\n\t\tconst binding = SqlTableBinding.unaliased({\n\t\t\tnamespaceId,\n\t\t\ttableName\n\t\t});\n\t\treturn new ModelAccessorScope(binding, [binding], { nextId: 1 });\n\t}\n\tforRelation(namespaceId, tableName) {\n\t\tconst binding = this.#allocateBinding(namespaceId, tableName, \"rel\");\n\t\treturn new ModelAccessorScope(binding, [...this.#visibleBindings, binding], this.#aliasCounter);\n\t}\n\tforManyToManyRelation(childNamespaceId, childTableName, junctionNamespaceId, junctionTableName) {\n\t\tconst initialChildScope = this.forRelation(childNamespaceId, childTableName);\n\t\tconst junctionBinding = initialChildScope.#allocateBinding(junctionNamespaceId, junctionTableName, \"junction\");\n\t\treturn {\n\t\t\tchildScope: new ModelAccessorScope(initialChildScope.current, [...initialChildScope.#visibleBindings, junctionBinding], this.#aliasCounter),\n\t\t\tjunctionBinding\n\t\t};\n\t}\n\tforJoinedSource(namespaceId, tableName) {\n\t\tif (this.current.isStoredAt(namespaceId, tableName)) return this;\n\t\tconst binding = SqlTableBinding.unaliased({\n\t\t\tnamespaceId,\n\t\t\ttableName\n\t\t});\n\t\treturn new ModelAccessorScope(binding, [...this.#visibleBindings, binding], this.#aliasCounter);\n\t}\n\t#allocateBinding(namespaceId, tableName, aliasKind) {\n\t\tconst storage = {\n\t\t\tnamespaceId,\n\t\t\ttableName\n\t\t};\n\t\tif (!this.#visibleBindings.some((binding) => binding.isReferencedAs(tableName))) return SqlTableBinding.unaliased(storage);\n\t\treturn SqlTableBinding.aliased(storage, this.#allocateAlias(aliasKind));\n\t}\n\t#allocateAlias(kind) {\n\t\twhile (true) {\n\t\t\tconst alias = `__orm_${kind}_${this.#aliasCounter.nextId}`;\n\t\t\tthis.#aliasCounter.nextId += 1;\n\t\t\tif (!this.#visibleBindings.some((binding) => binding.isReferencedAs(alias))) return alias;\n\t\t}\n\t}\n};\nfunction createModelAccessor(context, namespaceId, modelName, variantName) {\n\tconst tableName = resolveModelTableName(context.contract, namespaceId, modelName);\n\treturn createModelAccessorInScope(context, namespaceId, modelName, variantName, ModelAccessorScope.root(namespaceId, tableName));\n}\nfunction createModelAccessorInScope(context, namespaceId, modelName, variantName, scope) {\n\tconst contract = context.contract;\n\tconst fieldToColumn = getFieldToColumnMap(contract, namespaceId, modelName);\n\tconst tableName = resolveModelTableName(contract, namespaceId, modelName);\n\tconst modelRelations = resolveModelRelations(contract, namespaceId, modelName);\n\tconst variantFieldColumns = variantName ? resolveVariantFieldColumns(contract, namespaceId, modelName, variantName) : {};\n\tconst variantCoordinates = variantName ? {\n\t\tname: variantName,\n\t\trelations: resolveModelRelations(contract, namespaceId, variantName),\n\t\ttableName: resolvePolymorphismInfo(contract, namespaceId, modelName)?.variants.get(variantName)?.table ?? tableName\n\t} : void 0;\n\tconst opsByCodecId = /* @__PURE__ */ new Map();\n\tfunction registerOp(codecId, op) {\n\t\tlet existing = opsByCodecId.get(codecId);\n\t\tif (!existing) {\n\t\t\texisting = [];\n\t\t\topsByCodecId.set(codecId, existing);\n\t\t}\n\t\texisting.push(op);\n\t}\n\tfor (const [name, entry] of Object.entries(context.queryOperations.entries())) {\n\t\tconst op = [name, entry];\n\t\tconst self = entry.self;\n\t\tif (!self) continue;\n\t\tif (self.codecId !== void 0) registerOp(self.codecId, op);\n\t\telse if (self.traits !== void 0) for (const descriptor of context.codecDescriptors.values()) {\n\t\t\tconst descriptorTraits = descriptor.traits;\n\t\t\tif (self.traits.every((t) => descriptorTraits.includes(t))) registerOp(descriptor.codecId, op);\n\t\t}\n\t}\n\treturn blindCast(new Proxy({}, { get(_target, prop) {\n\t\tif (typeof prop !== \"string\") return;\n\t\tif (variantCoordinates) {\n\t\t\tconst variantRelation = variantCoordinates.relations[prop];\n\t\t\tif (variantRelation) return createRelationFilterAccessor(context, namespaceId, variantCoordinates.name, scope.forJoinedSource(namespaceId, variantCoordinates.tableName), variantRelation);\n\t\t}\n\t\tconst relation = modelRelations[prop];\n\t\tif (relation) return createRelationFilterAccessor(context, namespaceId, modelName, scope, relation);\n\t\tconst variantField = variantFieldColumns[prop];\n\t\tconst resolvedTable = variantField?.table ?? tableName;\n\t\tconst fieldBinding = scope.forJoinedSource(namespaceId, resolvedTable).current;\n\t\tconst columnName = variantField?.column ?? fieldToColumn[prop] ?? prop;\n\t\tconst column = resolveColumn(contract, namespaceId, resolvedTable, columnName);\n\t\tif (!column) return;\n\t\tconst traits = codecTraits(context, column.codecId);\n\t\tconst operations = opsByCodecId.get(column.codecId) ?? [];\n\t\tconst codec = codecRefForStorageColumn(contract.storage, namespaceId, resolvedTable, columnName);\n\t\treturn createScalarFieldAccessor(fieldBinding, columnName, column.codecId, column.nullable, codec, traits, operations, context);\n\t} }));\n}\nfunction createScalarFieldAccessor(tableBinding, columnName, codecId, nullable, codec, traits, operations, context) {\n\tconst column = tableBinding.column(columnName);\n\tconst comparisonEntries = [];\n\tfor (const [name, meta] of Object.entries(COMPARISON_METHODS_META)) {\n\t\tif (meta.traits.some((t) => !traits.includes(t))) continue;\n\t\tcomparisonEntries.push([name, meta.create(column, codec)]);\n\t}\n\tconst accessor = blindCast({\n\t\treturnType: {\n\t\t\tcodecId,\n\t\t\tnullable,\n\t\t\tcodec\n\t\t},\n\t\tbuildAst: () => column,\n\t\t...Object.fromEntries(comparisonEntries)\n\t});\n\tfor (const [name, entry] of operations) accessor[name] = createExtensionMethodFactory(accessor, entry, context);\n\treturn blindCast(accessor);\n}\nfunction createExtensionMethodFactory(selfExpr, entry, context) {\n\treturn (...args) => {\n\t\tconst result = blindCast(entry.impl)(selfExpr, ...args);\n\t\tconst returnCodecId = result.returnType.codecId;\n\t\tconst returnTraits = codecTraits(context, returnCodecId);\n\t\tif (returnTraits.includes(\"boolean\")) return result.buildAst();\n\t\tconst resultAst = result.buildAst();\n\t\tconst returnCodec = { codecId: returnCodecId };\n\t\tconst methods = {};\n\t\tfor (const [resultMethodName, meta] of Object.entries(COMPARISON_METHODS_META)) {\n\t\t\tif (meta.traits.some((t) => !returnTraits.includes(t))) continue;\n\t\t\tmethods[resultMethodName] = meta.create(resultAst, returnCodec);\n\t\t}\n\t\treturn methods;\n\t};\n}\nconst RELATION_ACCESSOR_METHOD_NAMES = /* @__PURE__ */ new Set([\n\t\"some\",\n\t\"every\",\n\t\"none\",\n\t\"count\"\n]);\nfunction createRelationFilterAccessor(context, parentNamespaceId, parentModelName, parentScope, relation) {\n\tconst relatedTableName = resolveModelTableName(context.contract, relation.toNamespace, relation.to);\n\tconst correlate = () => correlateRelatedRows(context, parentNamespaceId, parentModelName, parentScope, relatedTableName, relation);\n\tconst filters = {\n\t\tsome: (predicate) => buildExistsExpr(context, relation, correlate(), \"some\", predicate),\n\t\tevery: (predicate) => buildExistsExpr(context, relation, correlate(), \"every\", predicate),\n\t\tnone: (predicate) => buildExistsExpr(context, relation, correlate(), \"none\", predicate)\n\t};\n\tif (isToOneCardinality(relation.cardinality)) return new Proxy(filters, { get(target, prop) {\n\t\tif (typeof prop !== \"string\") return void 0;\n\t\tif (Object.hasOwn(target, prop)) return Reflect.get(target, prop);\n\t\tif (RELATION_ACCESSOR_METHOD_NAMES.has(prop)) return void 0;\n\t\treturn relatedOrderableField(context, relation, relatedTableName, correlate, prop);\n\t} });\n\treturn {\n\t\t...filters,\n\t\tcount: (predicate) => createOrderable(() => buildRelationCountExpr(context, relation, correlate(), predicate))\n\t};\n}\nfunction createOrderable(buildExpr) {\n\treturn {\n\t\tasc: (options) => checkedOrderByItem(\"asc\", buildExpr(), options),\n\t\tdesc: (options) => checkedOrderByItem(\"desc\", buildExpr(), options)\n\t};\n}\nfunction relatedOrderableField(context, relation, relatedTableName, correlate, fieldName) {\n\tconst fieldToColumn = getFieldToColumnMap(context.contract, relation.toNamespace, relation.to);\n\tif (!Object.hasOwn(fieldToColumn, fieldName)) return void 0;\n\tconst columnName = fieldToColumn[fieldName];\n\tif (columnName === void 0) return void 0;\n\tconst column = resolveColumn(context.contract, relation.toNamespace, relatedTableName, columnName);\n\tif (!column || !hasTrait(context, column.codecId, \"order\")) return void 0;\n\treturn createOrderable(() => {\n\t\tconst rows = correlate();\n\t\treturn SubqueryExpr.of(rows.source.withProjection([ProjectionItem.of(columnName, rows.childScope.current.column(columnName))]).withWhere(rows.correlation));\n\t});\n}\nfunction buildRelationCountExpr(context, relation, rows, predicate) {\n\tconst childWhere = toRelationWhereExpr(context, relation.toNamespace, relation.to, predicate, rows.childScope);\n\treturn SubqueryExpr.of(rows.source.withProjection([ProjectionItem.of(\"count\", plainAggregateExpr(\"count\", void 0))]).withWhere(childWhere ? and(rows.correlation, childWhere) : rows.correlation));\n}\nfunction correlateRelatedRows(context, parentNamespaceId, parentModelName, parentScope, relatedTableName, relation) {\n\tif (hasThrough$1(relation)) {\n\t\tconst { through } = relation;\n\t\tconst { childScope, junctionBinding } = parentScope.forManyToManyRelation(relation.toNamespace, relatedTableName, through.namespaceId, through.table);\n\t\tconst junctionJoinOn = buildPairedColumnExprs(junctionBinding, through.childColumns, childScope.current, through.targetColumns);\n\t\tconst parentLocalColumns = relation.on.localFields.map((field) => resolveFieldToColumn(context.contract, parentNamespaceId, parentModelName, field));\n\t\treturn {\n\t\t\tchildScope,\n\t\t\tsource: SelectAst.from(childScope.current.tableSource(context.contract)).withJoins([JoinAst.inner(junctionBinding.tableSource(context.contract), junctionJoinOn)]),\n\t\t\tcorrelation: buildPairedColumnExprs(junctionBinding, through.parentColumns, parentScope.current, parentLocalColumns),\n\t\t\tkeyColumn: firstJoinColumn(through.targetColumns, \"targetColumns\")\n\t\t};\n\t}\n\tconst childScope = parentScope.forRelation(relation.toNamespace, relatedTableName);\n\treturn {\n\t\tchildScope,\n\t\tsource: SelectAst.from(childScope.current.tableSource(context.contract)),\n\t\tcorrelation: buildJoinWhere(context.contract, parentNamespaceId, parentModelName, parentScope.current, childScope.current, relation),\n\t\tkeyColumn: firstTargetColumn(context.contract, relation) ?? \"id\"\n\t};\n}\nfunction buildExistsExpr(context, relation, rows, mode, predicate) {\n\tconst childWhere = toRelationWhereExpr(context, relation.toNamespace, relation.to, predicate, rows.childScope);\n\tconst filterPlan = planRelationFilterMode(rows.correlation, childWhere, mode);\n\tif (filterPlan.kind === \"constantTrue\") return AndExpr.true();\n\tconst subquery = rows.source.withProjection([ProjectionItem.of(\"_exists\", rows.childScope.current.column(rows.keyColumn))]).withWhere(filterPlan.where);\n\treturn filterPlan.notExists ? ExistsExpr.notExists(subquery) : ExistsExpr.exists(subquery);\n}\nfunction planRelationFilterMode(joinWhere, childWhere, mode) {\n\tif (mode === \"every\") {\n\t\tif (!childWhere) return { kind: \"constantTrue\" };\n\t\treturn {\n\t\t\tkind: \"exists\",\n\t\t\tnotExists: true,\n\t\t\twhere: and(joinWhere, not(childWhere))\n\t\t};\n\t}\n\tif (mode === \"none\") return {\n\t\tkind: \"exists\",\n\t\tnotExists: true,\n\t\twhere: childWhere ? and(joinWhere, childWhere) : joinWhere\n\t};\n\treturn {\n\t\tkind: \"exists\",\n\t\tnotExists: false,\n\t\twhere: childWhere ? and(joinWhere, childWhere) : joinWhere\n\t};\n}\nfunction firstJoinColumn(columns, label) {\n\tconst first = columns[0];\n\tif (!first) throw new InternalError(`Relation metadata is missing ${label}`);\n\treturn first;\n}\nfunction buildPairedColumnExprs(leftTable, leftColumns, rightTable, rightColumns) {\n\tif (leftColumns.length !== rightColumns.length) throw new InternalError(`Relation metadata has mismatched join column counts: ${leftColumns.length} left column(s), ${rightColumns.length} right column(s)`);\n\tif (leftColumns.length === 0) throw new InternalError(\"Relation metadata is missing join columns\");\n\tconst exprs = [];\n\tfor (let i = 0; i < leftColumns.length; i++) {\n\t\tconst left = leftColumns[i];\n\t\tconst right = rightColumns[i];\n\t\tif (!left || !right) throw new InternalError(`Relation metadata is missing a join column pair at index ${i}`);\n\t\texprs.push(BinaryExpr.eq(leftTable.column(left), rightTable.column(right)));\n\t}\n\tif (exprs.length === 1 && exprs[0]) return exprs[0];\n\treturn and(...exprs);\n}\nfunction toRelationWhereExpr(context, relatedNamespaceId, relatedModelName, predicate, scope) {\n\tif (!predicate) return;\n\tconst accessor = createModelAccessorInScope(context, relatedNamespaceId, relatedModelName, void 0, scope);\n\tif (typeof predicate === \"function\") return predicate(accessor);\n\tconst exprs = [];\n\tfor (const [fieldName, value] of Object.entries(predicate)) {\n\t\tif (value === void 0) continue;\n\t\tconst fieldAccessor = blindCast(accessor)[fieldName];\n\t\tif (!fieldAccessor) throw ormError(\"ORM.FIELD_UNKNOWN\", `Shorthand filter on \"${relatedModelName}.${fieldName}\": field is not defined on the model`, { meta: {\n\t\t\tmodel: relatedModelName,\n\t\t\tfield: fieldName\n\t\t} });\n\t\tif (value === null) {\n\t\t\tif (!fieldAccessor.isNull) throw new InternalError(`Shorthand filter on \"${relatedModelName}.${fieldName}\": isNull is unexpectedly missing — this is a bug in trait gating`);\n\t\t\texprs.push(fieldAccessor.isNull());\n\t\t\tcontinue;\n\t\t}\n\t\tif (!fieldAccessor.eq) throw ormError(\"ORM.FILTER_UNSUPPORTED\", `Shorthand filter on \"${relatedModelName}.${fieldName}\": field does not support equality comparisons`, { meta: {\n\t\t\tmodel: relatedModelName,\n\t\t\tfield: fieldName,\n\t\t\ttrait: \"equality\"\n\t\t} });\n\t\texprs.push(fieldAccessor.eq(value));\n\t}\n\tif (exprs.length === 0) return;\n\treturn exprs.length === 1 ? exprs[0] : and(...exprs);\n}\nfunction buildJoinWhere(contract, parentNamespaceId, parentModelName, parentTable, relatedTable, relation) {\n\tconst localFields = relation.on?.localFields ?? [];\n\tconst targetFields = relation.on?.targetFields ?? [];\n\tconst joinExprs = [];\n\tconst count = Math.min(localFields.length, targetFields.length);\n\tfor (let i = 0; i < count; i++) {\n\t\tconst localField = localFields[i];\n\t\tconst targetField = targetFields[i];\n\t\tif (!localField || !targetField) continue;\n\t\tconst localColumn = resolveFieldToColumn(contract, parentNamespaceId, parentModelName, localField);\n\t\tconst targetColumn = resolveFieldToColumn(contract, relation.toNamespace, relation.to, targetField);\n\t\tjoinExprs.push(BinaryExpr.eq(relatedTable.column(targetColumn), parentTable.column(localColumn)));\n\t}\n\tif (joinExprs.length === 0) throw new InternalError(\"Relation metadata is missing join columns\");\n\tconst firstExpr = joinExprs[0];\n\tif (joinExprs.length === 1 && firstExpr !== void 0) return firstExpr;\n\treturn and(...joinExprs);\n}\nfunction firstTargetColumn(contract, relation) {\n\tconst firstField = (relation.on?.targetFields)?.[0];\n\tif (!firstField) return;\n\treturn resolveFieldToColumn(contract, relation.toNamespace, relation.to, firstField);\n}\n//#endregion\n//#region src/grouped-collection.ts\nvar GroupedCollection = class GroupedCollection {\n\tctx;\n\tcontract;\n\tmodelName;\n\ttableName;\n\tnamespaceId;\n\tpreGroupState;\n\tgroupByFields;\n\tgroupByColumns;\n\thavingFilters;\n\tpostGroup;\n\tconstructor(ctx, modelName, options) {\n\t\tthis.ctx = ctx;\n\t\tthis.contract = ctx.context.contract;\n\t\tthis.modelName = modelName;\n\t\tthis.tableName = options.tableName;\n\t\tthis.namespaceId = blindCast(options.namespaceId);\n\t\tthis.preGroupState = options.preGroupState;\n\t\tthis.groupByFields = options.groupByFields;\n\t\tthis.groupByColumns = options.groupByColumns;\n\t\tthis.havingFilters = options.havingFilters;\n\t\tthis.postGroup = options.postGroup;\n\t}\n\t#clone(overrides) {\n\t\treturn blindCast(new GroupedCollection(this.ctx, this.modelName, {\n\t\t\ttableName: this.tableName,\n\t\t\tnamespaceId: this.namespaceId,\n\t\t\tpreGroupState: this.preGroupState,\n\t\t\tgroupByFields: this.groupByFields,\n\t\t\tgroupByColumns: this.groupByColumns,\n\t\t\thavingFilters: this.havingFilters,\n\t\t\tpostGroup: this.postGroup,\n\t\t\t...overrides\n\t\t}));\n\t}\n\thaving(predicate) {\n\t\tconst havingExpr = predicate(createHavingBuilder(this.contract, this.ctx.context.aggregateDescriptors, this.namespaceId, this.modelName, this.tableName));\n\t\treturn this.#clone({ havingFilters: [...this.havingFilters, havingExpr] });\n\t}\n\t/**\n\t* Append an `ORDER BY` clause on the grouped rows themselves — orders by\n\t* group key. Ordering by an aggregate alias needs a builder surface over\n\t* the aliases and isn't supported here. Unlocks post-group `limit(...)` /\n\t* `offset(...)`, which page a group order that would otherwise be undefined.\n\t*/\n\torderBy(selection) {\n\t\tconst selectors = Array.isArray(selection) ? selection : [selection];\n\t\tif (selectors.length === 0) throw ormError(\"ORM.ARGUMENT_INVALID\", `orderBy() for model \"${this.modelName}\" requires at least one selector`, { meta: {\n\t\t\tmethod: \"orderBy\",\n\t\t\tmodel: this.modelName\n\t\t} });\n\t\tconst accessor = createModelAccessor(this.ctx.context, this.namespaceId, this.modelName);\n\t\tconst nextOrders = selectors.map((selector) => selector(accessor));\n\t\treturn this.#clone({ postGroup: {\n\t\t\t...this.postGroup,\n\t\t\torderBy: [...this.postGroup.orderBy, ...nextOrders]\n\t\t} });\n\t}\n\t/**\n\t* Apply `LIMIT n` to the grouped rows. Replaces any previous post-group\n\t* limit. Requires a prior `orderBy(...)` — a database may return groups in\n\t* any order, so \"the first n groups\" is undefined without one.\n\t*/\n\tlimit(n) {\n\t\treturn this.#clone({ postGroup: {\n\t\t\t...this.postGroup,\n\t\t\tlimit: typeof n === \"number\" ? n : toExpr(n)\n\t\t} });\n\t}\n\t/**\n\t* Apply `OFFSET n` to the grouped rows. Replaces any previous post-group\n\t* offset. Requires a prior `orderBy(...)`, same as `limit(...)` — both\n\t* pagination methods need a deterministic group order.\n\t*/\n\toffset(n) {\n\t\treturn this.#clone({ postGroup: {\n\t\t\t...this.postGroup,\n\t\t\toffset: typeof n === \"number\" ? n : toExpr(n)\n\t\t} });\n\t}\n\t/**\n\t* Read terminal: run a grouped aggregate query.\n\t*\n\t* Accepts an optional `configure` callback that receives a\n\t* `MetaBuilder<'read'>` for attaching typed annotations.\n\t* Annotations are merged into the compiled plan's `meta.annotations`.\n\t*/\n\tget prepared() {\n\t\treturn { aggregate: (fn, configure) => this.#describeAggregate(fn, configure) };\n\t}\n\tasync aggregate(fn, configure) {\n\t\tconst description = this.#describeAggregate(fn, configure);\n\t\treturn description.consume(queryPlanRows(this.ctx.runtime, description.plan));\n\t}\n\t#describeAggregate(fn, configure) {\n\t\tconst aggregateSpec = fn(createAggregateBuilder(this.contract, this.ctx.context.aggregateDescriptors, this.namespaceId, this.modelName));\n\t\tconst aggregateEntries = Object.entries(aggregateSpec);\n\t\tif (aggregateEntries.length === 0) throw ormError(\"ORM.AGGREGATE_SELECTOR_MISSING\", \"groupBy().aggregate() requires at least one aggregation selector\", { meta: {\n\t\t\tmethod: \"groupBy.aggregate\",\n\t\t\tmodel: this.modelName\n\t\t} });\n\t\tfor (const [alias, selector] of aggregateEntries) if (!isAggregateSelector(selector)) throw ormError(\"ORM.AGGREGATE_SELECTOR_INVALID\", `groupBy().aggregate() selector \"${alias}\" is invalid`, { meta: {\n\t\t\tmethod: \"groupBy.aggregate\",\n\t\t\tmodel: this.modelName,\n\t\t\talias\n\t\t} });\n\t\tlet annotationsMap;\n\t\tif (configure !== void 0) {\n\t\t\tconst meta = createMetaBuilder(\"read\", \"groupBy.aggregate\");\n\t\t\tconfigure(meta);\n\t\t\tif (meta.annotations.size > 0) annotationsMap = meta.annotations;\n\t\t}\n\t\tconst compiled = mergeAnnotations(compileGroupedAggregate(this.contract, this.ctx.context.aggregateDescriptors, this.namespaceId, this.tableName, this.preGroupState, this.groupByColumns, aggregateSpec, combineWhereExprs(this.havingFilters), this.modelName, this.postGroup), annotationsMap);\n\t\tconst mapRow = createStorageRowMapper(this.contract, this.namespaceId, this.modelName);\n\t\treturn {\n\t\t\tplan: compiled,\n\t\t\tasync consume(source) {\n\t\t\t\treturn (await source.toArray()).map((row) => {\n\t\t\t\t\tconst mapped = mapRow(row);\n\t\t\t\t\tfor (const [alias] of aggregateEntries) mapped[alias] = row[alias];\n\t\t\t\t\treturn blindCast(mapped);\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t}\n};\n/**\n* The having metric methods, one per operation the registry contributes —\n* the runtime mirror of the contract's emitted aggregate map, which is what\n* types the surface as {@link HavingBuilder}. HAVING compares the value\n* inside the database, so only an operation's plain `AggregateExpr` form is\n* sound here: an operation outside the SQL aggregate alphabet exists only in\n* its descriptor-lowered form — a rendering for the driver boundary — and is\n* refused. The typed surface already excludes it; the runtime refusal covers\n* dynamic invocation.\n*/\nfunction createHavingBuilder(contract, aggregates, namespaceId, modelName, tableName) {\n\tconst fieldToColumn = getFieldToColumnMap(contract, namespaceId, modelName);\n\tconst builder = {};\n\tfor (const operation of aggregateOperationNames(aggregates)) builder[operation] = (field) => {\n\t\tif (!isAggregateFn(operation)) throw ormError(\"ORM.AGGREGATE_PROJECTION_ONLY\", `Aggregate operation '${operation}' is projection-only: it has no plain SQL form for HAVING, ORDER BY, or comparison positions.`, {\n\t\t\twhy: \"An operation outside the SQL aggregate alphabet reaches SQL only through its descriptor's lowering hook — a rendering for the driver boundary. HAVING and ORDER BY compare the value inside the database, where that rendering would change SQL semantics.\",\n\t\t\tfix: `Project '${operation}' in a select and filter or order on the projected value, or use an operation from the SQL aggregate alphabet.`,\n\t\t\tmeta: { operation }\n\t\t});\n\t\treturn createHavingComparisonMethods(new AggregateExpr(operation, field === void 0 ? void 0 : ColumnRef.of(tableName, fieldToColumn[field] ?? field)), () => resolveAggregate({\n\t\t\taggregates,\n\t\t\tcontract,\n\t\t\tnamespaceId,\n\t\t\ttableName,\n\t\t\tfn: operation,\n\t\t\tcolumn: field === void 0 ? void 0 : fieldToColumn[field] ?? field\n\t\t}).codec.codecId);\n\t};\n\treturn blindCast(builder);\n}\nfunction createHavingComparisonMethods(metric, outputCodecId) {\n\tconst buildBinaryExpr = (op, value) => {\n\t\tconst expression = predicateExpression(value);\n\t\tif (expression !== void 0 && (expression.kind !== \"prepared-param-ref\" || expression.codec.codecId !== outputCodecId())) throw ormError(\"ORM.HAVING_EXPRESSION_UNSUPPORTED\", \"HAVING comparands require a prepared parameter with the aggregate output codec\", { meta: { kind: expression.kind } });\n\t\treturn predicateComparison(op, metric, expression ?? LiteralExpr.of(value));\n\t};\n\treturn {\n\t\teq(value) {\n\t\t\treturn buildBinaryExpr(\"eq\", value);\n\t\t},\n\t\tneq(value) {\n\t\t\treturn buildBinaryExpr(\"neq\", value);\n\t\t},\n\t\tgt(value) {\n\t\t\treturn buildBinaryExpr(\"gt\", value);\n\t\t},\n\t\tlt(value) {\n\t\t\treturn buildBinaryExpr(\"lt\", value);\n\t\t},\n\t\tgte(value) {\n\t\t\treturn buildBinaryExpr(\"gte\", value);\n\t\t},\n\t\tlte(value) {\n\t\t\treturn buildBinaryExpr(\"lte\", value);\n\t\t}\n\t};\n}\n//#endregion\n//#region src/include-descriptors.ts\nfunction createIncludeScalar(fn, state, column) {\n\treturn {\n\t\tkind: \"includeScalar\",\n\t\tfn,\n\t\tstate,\n\t\t...column !== void 0 ? { column } : {}\n\t};\n}\nfunction createIncludeCombine(branches) {\n\treturn {\n\t\tkind: \"includeCombine\",\n\t\tbranches\n\t};\n}\nfunction isIncludeScalar(value) {\n\tif (typeof value !== \"object\" || value === null) return false;\n\tconst candidate = value;\n\treturn candidate.kind === \"includeScalar\" && typeof candidate.fn === \"string\" && isCollectionState(candidate.state);\n}\nfunction isIncludeCombine(value) {\n\tif (typeof value !== \"object\" || value === null) return false;\n\tconst candidate = value;\n\tif (candidate.kind !== \"includeCombine\") return false;\n\tif (typeof candidate.branches !== \"object\" || candidate.branches === null) return false;\n\treturn true;\n}\nfunction isCollectionStateCarrier(value) {\n\tif (typeof value !== \"object\" || value === null) return false;\n\treturn isCollectionState(value.state);\n}\nfunction isCollectionState(value) {\n\tif (typeof value !== \"object\" || value === null) return false;\n\tconst candidate = value;\n\treturn Array.isArray(candidate.filters) && Array.isArray(candidate.includes);\n}\n//#endregion\n//#region src/relation-mutator.ts\nfunction createRelationMutator() {\n\treturn {\n\t\tcreate(data) {\n\t\t\treturn {\n\t\t\t\tkind: \"create\",\n\t\t\t\tdata: Array.isArray(data) ? [...data] : [data]\n\t\t\t};\n\t\t},\n\t\tconnect(criteria) {\n\t\t\treturn {\n\t\t\t\tkind: \"connect\",\n\t\t\t\tcriteria: Array.isArray(criteria) ? [...criteria] : [criteria]\n\t\t\t};\n\t\t},\n\t\tdisconnect(criteria) {\n\t\t\tif (!criteria) return { kind: \"disconnect\" };\n\t\t\treturn {\n\t\t\t\tkind: \"disconnect\",\n\t\t\t\tcriteria: [...criteria]\n\t\t\t};\n\t\t}\n\t};\n}\nfunction isRelationMutationDescriptor(value) {\n\tif (!value || typeof value !== \"object\") return false;\n\tconst candidate = value;\n\tif (candidate.kind !== \"create\" && candidate.kind !== \"connect\" && candidate.kind !== \"disconnect\") return false;\n\treturn true;\n}\nfunction isRelationMutationCallback(value) {\n\treturn typeof value === \"function\";\n}\n//#endregion\n//#region src/mutation-executor.ts\nfunction hasThrough(relation) {\n\treturn relation.through !== void 0;\n}\nfunction hasNestedMutationCallbacks(contract, namespaceId, modelName, data) {\n\tconst relationNames = new Set(Object.keys(resolveModelRelations(contract, namespaceId, modelName)));\n\tfor (const [fieldName, value] of Object.entries(data)) {\n\t\tif (!relationNames.has(fieldName)) continue;\n\t\tif (isRelationMutationCallback(value)) return true;\n\t}\n\treturn false;\n}\nasync function executeNestedCreateMutation(options) {\n\treturn withMutationScope(options.runtime, async (scope) => createGraph(scope, options.context, options.namespaceId, options.modelName, options.data));\n}\nasync function executeNestedUpdateMutation(options) {\n\treturn withMutationScope(options.runtime, async (scope) => updateFirstGraph(scope, options.context, options.namespaceId, options.modelName, options.filters, options.data));\n}\nfunction buildRowIdentityFilterFromRow(contract, namespaceId, modelName, row) {\n\tconst tableName = resolveModelTableName(contract, namespaceId, modelName);\n\tconst identityColumns = resolveRowIdentityColumns(contract, namespaceId, tableName);\n\tif (identityColumns.length === 0) throw ormError(\"ORM.ROW_IDENTITY_MISSING\", `Nested mutations on model \"${modelName}\" require table \"${tableName}\" to have a primary key or unique constraint`, { meta: {\n\t\tmodel: modelName,\n\t\ttable: tableName\n\t} });\n\tconst filter = {};\n\tfor (const column of identityColumns) {\n\t\tconst fieldName = toFieldName(contract, namespaceId, modelName, column);\n\t\tconst value = row[fieldName];\n\t\tif (value === void 0) throw new InternalError(`Missing identity field \"${fieldName}\" while reloading model \"${modelName}\"`);\n\t\tfilter[fieldName] = value;\n\t}\n\treturn filter;\n}\nasync function withMutationScope(runtime, run) {\n\tif (typeof runtime.transaction === \"function\") return runInTransaction(await runtime.transaction(), run);\n\tif (typeof runtime.connection === \"function\") {\n\t\tconst connection = await runtime.connection();\n\t\ttry {\n\t\t\tif (typeof connection.transaction === \"function\") return await runInTransaction(await connection.transaction(), run);\n\t\t\treturn await run(connection);\n\t\t} finally {\n\t\t\tawait connection.release?.();\n\t\t}\n\t}\n\treturn run(runtime);\n}\nasync function runInTransaction(transaction, run) {\n\ttry {\n\t\tconst result = await run(transaction);\n\t\tif (typeof transaction.commit === \"function\") await transaction.commit();\n\t\treturn result;\n\t} catch (error) {\n\t\tif (typeof transaction.rollback === \"function\") await transaction.rollback();\n\t\tthrow error;\n\t}\n}\nasync function createGraph(scope, context, namespaceId, modelName, input) {\n\tconst contract = context.contract;\n\tconst parsed = parseMutationInput(contract, namespaceId, modelName, input);\n\tconst { parentOwned, childOwned, junctionOwned } = partitionByOwnership(parsed.relationMutations);\n\tconst scalarData = { ...parsed.scalarData };\n\tfor (const relationMutation of parentOwned) {\n\t\tif (relationMutation.mutation.kind === \"disconnect\") throw ormError(\"ORM.RELATION_MUTATION_UNSUPPORTED\", \"disconnect() is only supported in update() nested mutations\", { meta: {\n\t\t\tkind: \"disconnect\",\n\t\t\trelation: relationMutation.relation.relationName\n\t\t} });\n\t\tawait applyParentOwnedMutation(scope, context, namespaceId, modelName, scalarData, relationMutation.relation, relationMutation.mutation);\n\t}\n\tfor (const relationMutation of junctionOwned) {\n\t\tif (relationMutation.mutation.kind === \"disconnect\") throw ormError(\"ORM.RELATION_MUTATION_UNSUPPORTED\", \"disconnect() is only supported in update() nested mutations\", { meta: {\n\t\t\tkind: \"disconnect\",\n\t\t\trelation: relationMutation.relation.relationName\n\t\t} });\n\t\tawait preflightJunctionOwnedCreateMutation(scope, context, relationMutation);\n\t}\n\tconst parentRow = await insertSingleRow(scope, context, namespaceId, modelName, scalarData);\n\tfor (const relationMutation of childOwned) {\n\t\tif (relationMutation.mutation.kind === \"disconnect\") throw ormError(\"ORM.RELATION_MUTATION_UNSUPPORTED\", \"disconnect() is only supported in update() nested mutations\", { meta: {\n\t\t\tkind: \"disconnect\",\n\t\t\trelation: relationMutation.relation.relationName\n\t\t} });\n\t\tawait applyChildOwnedMutation(scope, context, namespaceId, modelName, parentRow, relationMutation.relation, relationMutation.mutation);\n\t}\n\tfor (const relationMutation of junctionOwned) await applyJunctionOwnedMutation(scope, context, namespaceId, modelName, parentRow, relationMutation.relation, relationMutation.mutation);\n\treturn parentRow;\n}\nasync function updateFirstGraph(scope, context, namespaceId, modelName, filters, input) {\n\tconst contract = context.contract;\n\tconst existingRow = await findFirstByFilters(scope, contract, namespaceId, modelName, filters);\n\tif (!existingRow) return null;\n\tconst parsed = parseMutationInput(contract, namespaceId, modelName, input);\n\tconst { parentOwned, childOwned, junctionOwned } = partitionByOwnership(parsed.relationMutations);\n\tconst scalarData = { ...parsed.scalarData };\n\tfor (const relationMutation of parentOwned) await applyParentOwnedMutation(scope, context, namespaceId, modelName, scalarData, relationMutation.relation, relationMutation.mutation);\n\tfor (const relationMutation of junctionOwned) await preflightJunctionOwnedCreateMutation(scope, context, relationMutation);\n\tlet parentRow = existingRow;\n\tconst mappedUpdateData = mapModelDataToStorageRow(contract, namespaceId, modelName, scalarData);\n\tif (Object.keys(mappedUpdateData).length > 0) {\n\t\tconst tableName = resolveModelTableName(contract, namespaceId, modelName);\n\t\tconst appliedUpdateDefaults = context.applyMutationDefaults({\n\t\t\top: \"update\",\n\t\t\tentry: tableName,\n\t\t\tnamespace: namespaceId,\n\t\t\tvalues: mappedUpdateData\n\t\t});\n\t\tfor (const def of appliedUpdateDefaults) mappedUpdateData[def.field] = def.value;\n\t\tconst identityWhere = shorthandToWhereExpr(context, namespaceId, modelName, castAs(buildRowIdentityFilterFromRow(contract, namespaceId, modelName, existingRow)));\n\t\tif (!identityWhere) throw new InternalError(`Failed to build row identity filter for model \"${modelName}\"`);\n\t\tconst updatedRaw = (await queryPlanRows(scope, compileUpdateReturning(contract, namespaceId, tableName, mappedUpdateData, [identityWhere], void 0)).toArray())[0];\n\t\tif (updatedRaw) parentRow = mapStorageRowToModelFields(contract, namespaceId, modelName, updatedRaw);\n\t}\n\tfor (const relationMutation of childOwned) await applyChildOwnedMutation(scope, context, namespaceId, modelName, parentRow, relationMutation.relation, relationMutation.mutation);\n\tfor (const relationMutation of junctionOwned) await applyJunctionOwnedMutation(scope, context, namespaceId, modelName, parentRow, relationMutation.relation, relationMutation.mutation);\n\treturn parentRow;\n}\nfunction parseMutationInput(contract, namespaceId, modelName, input) {\n\tconst scalarData = {};\n\tconst relationDefinitions = new Map(getRelationDefinitions(contract, namespaceId, modelName).map((relation) => [relation.relationName, relation]));\n\tconst relationMutations = [];\n\tfor (const [fieldName, value] of Object.entries(input)) {\n\t\tconst relation = relationDefinitions.get(fieldName);\n\t\tif (!relation) {\n\t\t\tscalarData[fieldName] = value;\n\t\t\tcontinue;\n\t\t}\n\t\tif (!isRelationMutationCallback(value)) throw ormError(\"ORM.RELATION_MUTATION_INVALID\", `Relation field \"${fieldName}\" on model \"${modelName}\" expects a mutator callback`, { meta: {\n\t\t\trelation: fieldName,\n\t\t\tmodel: modelName,\n\t\t\tproblem: \"missing-callback\"\n\t\t} });\n\t\tconst mutation = value(createRelationMutator());\n\t\tif (!isRelationMutationDescriptor(mutation)) throw ormError(\"ORM.RELATION_MUTATION_INVALID\", `Relation field \"${fieldName}\" on model \"${modelName}\" returned an invalid mutation descriptor`, { meta: {\n\t\t\trelation: fieldName,\n\t\t\tmodel: modelName,\n\t\t\tproblem: \"invalid-descriptor\"\n\t\t} });\n\t\trelationMutations.push({\n\t\t\trelation,\n\t\t\tmutation\n\t\t});\n\t}\n\treturn {\n\t\tscalarData,\n\t\trelationMutations\n\t};\n}\nfunction partitionByOwnership(relationMutations) {\n\tconst parentOwned = [];\n\tconst childOwned = [];\n\tconst junctionOwned = [];\n\tfor (const relationMutation of relationMutations) {\n\t\tif (hasThrough(relationMutation.relation)) {\n\t\t\tjunctionOwned.push({\n\t\t\t\trelation: relationMutation.relation,\n\t\t\t\tmutation: relationMutation.mutation\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tif (relationMutation.relation.cardinality === \"N:1\") {\n\t\t\tparentOwned.push(relationMutation);\n\t\t\tcontinue;\n\t\t}\n\t\tchildOwned.push(relationMutation);\n\t}\n\treturn {\n\t\tparentOwned,\n\t\tchildOwned,\n\t\tjunctionOwned\n\t};\n}\nasync function applyParentOwnedMutation(scope, context, parentNamespaceId, parentModelName, scalarData, relation, mutation) {\n\tconst contract = context.contract;\n\tif (mutation.kind === \"disconnect\") {\n\t\tfor (const localColumn of relation.localColumns) {\n\t\t\tconst parentFieldName = toFieldName(contract, parentNamespaceId, parentModelName, localColumn);\n\t\t\tscalarData[parentFieldName] = null;\n\t\t}\n\t\treturn;\n\t}\n\tif (mutation.kind === \"create\") {\n\t\tconst row = mutation.data[0];\n\t\tif (!row) throw ormError(\"ORM.RELATION_MUTATION_INVALID\", `create() nested mutation for relation \"${relation.relationName}\" requires data`, { meta: {\n\t\t\tkind: \"create\",\n\t\t\trelation: relation.relationName,\n\t\t\tproblem: \"missing-data\"\n\t\t} });\n\t\tcopyRelatedValuesToParent(contract, parentNamespaceId, parentModelName, relation, scalarData, await createGraph(scope, context, relation.relatedNamespaceId, relation.relatedModelName, castAs(row)));\n\t\treturn;\n\t}\n\tconst criterion = mutation.criteria[0];\n\tif (!criterion) throw ormError(\"ORM.RELATION_MUTATION_INVALID\", `connect() nested mutation for relation \"${relation.relationName}\" requires criterion`, { meta: {\n\t\tkind: \"connect\",\n\t\trelation: relation.relationName,\n\t\tproblem: \"missing-criterion\"\n\t} });\n\tconst relatedRow = await findRowByCriterion(scope, context, relation.relatedNamespaceId, relation.relatedModelName, castAs(criterion));\n\tif (!relatedRow) throw ormError(\"ORM.RELATION_ROW_MISSING\", `connect() nested mutation for relation \"${relation.relationName}\" did not find a matching row`, { meta: {\n\t\tkind: \"connect\",\n\t\trelation: relation.relationName\n\t} });\n\tcopyRelatedValuesToParent(contract, parentNamespaceId, parentModelName, relation, scalarData, relatedRow);\n}\nfunction copyRelatedValuesToParent(contract, parentNamespaceId, parentModelName, relation, scalarData, relatedRow) {\n\tfor (let i = 0; i < relation.localColumns.length; i++) {\n\t\tconst localColumn = relation.localColumns[i];\n\t\tconst targetColumn = relation.targetColumns[i];\n\t\tif (!localColumn || !targetColumn) continue;\n\t\tconst parentFieldName = toFieldName(contract, parentNamespaceId, parentModelName, localColumn);\n\t\tscalarData[parentFieldName] = relatedRow[toFieldName(contract, relation.relatedNamespaceId, relation.relatedModelName, targetColumn)];\n\t}\n}\nasync function applyChildOwnedMutation(scope, context, parentNamespaceId, parentModelName, parentRow, relation, mutation) {\n\tconst contract = context.contract;\n\tconst parentValues = readParentColumnValues(contract, parentNamespaceId, parentModelName, relation, parentRow);\n\tif (mutation.kind === \"create\") {\n\t\tfor (const childInput of mutation.data) {\n\t\t\tconst payload = { ...castAs(childInput) };\n\t\t\tfor (const [childColumn, parentValue] of parentValues.entries()) {\n\t\t\t\tconst childFieldName = toFieldName(contract, relation.relatedNamespaceId, relation.relatedModelName, childColumn);\n\t\t\t\tpayload[childFieldName] = parentValue;\n\t\t\t}\n\t\t\tawait createGraph(scope, context, relation.relatedNamespaceId, relation.relatedModelName, castAs(payload));\n\t\t}\n\t\treturn;\n\t}\n\tif (mutation.kind === \"connect\") {\n\t\tfor (const criterion of mutation.criteria) {\n\t\t\tconst criterionWhere = shorthandToWhereExpr(context, relation.relatedNamespaceId, relation.relatedModelName, castAs(criterion));\n\t\t\tif (!criterionWhere) throw ormError(\"ORM.RELATION_MUTATION_INVALID\", `connect() nested mutation for relation \"${relation.relationName}\" requires non-empty criterion`, { meta: {\n\t\t\t\tkind: \"connect\",\n\t\t\t\trelation: relation.relationName,\n\t\t\t\tproblem: \"empty-criterion\"\n\t\t\t} });\n\t\t\tconst setValues = {};\n\t\t\tfor (const [childColumn, parentValue] of parentValues.entries()) setValues[childColumn] = parentValue;\n\t\t\tawait executeUpdateCount(scope, contract, relation.relatedNamespaceId, relation.relatedTableName, setValues, [criterionWhere]);\n\t\t}\n\t\treturn;\n\t}\n\tconst setValues = {};\n\tfor (const childColumn of parentValues.keys()) setValues[childColumn] = null;\n\tif (!mutation.criteria || mutation.criteria.length === 0) {\n\t\tconst parentJoinWhere = buildChildJoinWhere(relation, parentValues);\n\t\tawait executeUpdateCount(scope, contract, relation.relatedNamespaceId, relation.relatedTableName, setValues, [parentJoinWhere]);\n\t\treturn;\n\t}\n\tfor (const criterion of mutation.criteria) {\n\t\tconst criterionWhere = shorthandToWhereExpr(context, relation.relatedNamespaceId, relation.relatedModelName, castAs(criterion));\n\t\tif (!criterionWhere) throw ormError(\"ORM.RELATION_MUTATION_INVALID\", `disconnect() nested mutation for relation \"${relation.relationName}\" requires non-empty criterion`, { meta: {\n\t\t\tkind: \"disconnect\",\n\t\t\trelation: relation.relationName,\n\t\t\tproblem: \"empty-criterion\"\n\t\t} });\n\t\tconst parentJoinWhere = buildChildJoinWhere(relation, parentValues);\n\t\tawait executeUpdateCount(scope, contract, relation.relatedNamespaceId, relation.relatedTableName, setValues, [and(parentJoinWhere, criterionWhere)]);\n\t}\n}\nasync function applyJunctionOwnedMutation(scope, context, parentNamespaceId, parentModelName, parentRow, relation, mutation) {\n\tconst contract = context.contract;\n\tconst parentPkValues = readJunctionParentValues(contract, parentNamespaceId, parentModelName, relation, parentRow);\n\tassertJunctionPayloadWritable(relation, mutation.kind);\n\tif (mutation.kind === \"create\") {\n\t\tfor (const childInput of mutation.data) await insertJunctionLink(scope, context, relation, parentPkValues, readJunctionTargetValues(contract, relation, await createGraph(scope, context, relation.relatedNamespaceId, relation.relatedModelName, castAs(childInput))), \"create\");\n\t\treturn;\n\t}\n\tif (mutation.kind === \"connect\") {\n\t\tfor (const criterion of mutation.criteria) await insertJunctionLink(scope, context, relation, parentPkValues, await resolveJunctionTargetValues(scope, context, relation, \"connect\", criterion), \"connect\");\n\t\treturn;\n\t}\n\tif (!mutation.criteria || mutation.criteria.length === 0) throw ormError(\"ORM.RELATION_MUTATION_INVALID\", `disconnect() nested mutation for relation \"${relation.relationName}\" requires criterion`, { meta: {\n\t\tkind: \"disconnect\",\n\t\trelation: relation.relationName,\n\t\tproblem: \"missing-criterion\"\n\t} });\n\tfor (const criterion of mutation.criteria) await deleteJunctionLink(scope, context, relation, parentPkValues, await resolveJunctionTargetValues(scope, context, relation, \"disconnect\", criterion));\n}\nasync function preflightJunctionOwnedCreateMutation(scope, context, relationMutation) {\n\tconst { relation, mutation } = relationMutation;\n\tassertJunctionMetadataShape(relation);\n\tassertJunctionPayloadWritable(relation, mutation.kind);\n\tif (mutation.kind !== \"connect\") return;\n\tconst seenTargetKeys = /* @__PURE__ */ new Set();\n\tfor (const criterion of mutation.criteria) {\n\t\tconst targetValues = await resolveJunctionTargetValues(scope, context, relation, \"connect\", criterion);\n\t\tconst targetKey = JSON.stringify([...targetValues.entries()]);\n\t\tif (seenTargetKeys.has(targetKey)) throw ormError(\"ORM.RELATION_MUTATION_INVALID\", `connect() nested mutation for relation \"${relation.relationName}\" resolved duplicate junction link targets; remove the duplicate criteria`, { meta: {\n\t\t\tkind: \"connect\",\n\t\t\trelation: relation.relationName,\n\t\t\tproblem: \"duplicate-criteria\"\n\t\t} });\n\t\tseenTargetKeys.add(targetKey);\n\t}\n}\nfunction assertJunctionPayloadWritable(relation, mutationKind) {\n\tconst through = relation.through;\n\tif (mutationKind !== \"create\" && mutationKind !== \"connect\" || through.requiredPayloadColumns.length === 0) return;\n\tconst cols = through.requiredPayloadColumns.map((c) => `\\`${c}\\``).join(\", \");\n\tthrow ormError(\"ORM.RELATION_MUTATION_UNSUPPORTED\", `Cannot \\`${mutationKind}\\` on relation \\`${relation.relationName}\\`: its junction \\`${through.table}\\` has required column(s) ${cols} the relation API can't populate. Write the \\`${through.table}\\` junction directly or use the SQL builder.`, { meta: {\n\t\tkind: mutationKind,\n\t\trelation: relation.relationName,\n\t\treason: \"junction-required-columns\",\n\t\tjunction: through.table\n\t} });\n}\nasync function resolveJunctionTargetValues(scope, context, relation, kind, criterion) {\n\tconst relatedRow = await findRowByCriterion(scope, context, relation.relatedNamespaceId, relation.relatedModelName, criterion);\n\tif (!relatedRow) throw ormError(\"ORM.RELATION_ROW_MISSING\", `${kind}() nested mutation for relation \"${relation.relationName}\" did not find a matching row`, { meta: {\n\t\tkind,\n\t\trelation: relation.relationName\n\t} });\n\treturn readJunctionTargetValues(context.contract, relation, relatedRow);\n}\nfunction readJunctionParentValues(contract, parentNamespaceId, parentModelName, relation, parentRow) {\n\tconst values = /* @__PURE__ */ new Map();\n\tassertJunctionParentMetadataLength(relation);\n\tfor (let i = 0; i < relation.through.parentColumns.length; i++) {\n\t\tconst junctionColumn = relation.through.parentColumns[i];\n\t\tconst parentColumn = relation.localColumns[i];\n\t\tif (junctionColumn === void 0 || parentColumn === void 0) throw new InternalError(`Relation \"${relation.relationName}\" has incomplete junction metadata for parent columns`);\n\t\tconst parentFieldName = toFieldName(contract, parentNamespaceId, parentModelName, parentColumn);\n\t\tconst parentValue = parentRow[parentFieldName];\n\t\tif (parentValue === void 0) throw new InternalError(`Nested mutation requires parent field \"${parentFieldName}\" to be present in returned row`);\n\t\tvalues.set(junctionColumn, parentValue);\n\t}\n\treturn values;\n}\nfunction readJunctionTargetValues(contract, relation, relatedRow) {\n\tconst values = /* @__PURE__ */ new Map();\n\tassertJunctionTargetMetadataLength(relation);\n\tfor (let i = 0; i < relation.through.childColumns.length; i++) {\n\t\tconst junctionColumn = relation.through.childColumns[i];\n\t\tconst targetColumn = relation.through.targetColumns[i];\n\t\tif (junctionColumn === void 0 || targetColumn === void 0) throw new InternalError(`Relation \"${relation.relationName}\" has incomplete junction metadata for target columns`);\n\t\tconst targetFieldName = toFieldName(contract, relation.relatedNamespaceId, relation.relatedModelName, targetColumn);\n\t\tconst targetValue = relatedRow[targetFieldName];\n\t\tif (targetValue === void 0) throw new InternalError(`Nested mutation requires target field \"${targetFieldName}\" to be present in returned row`);\n\t\tvalues.set(junctionColumn, targetValue);\n\t}\n\treturn values;\n}\nfunction assertJunctionMetadataLength(relation, throughColumnName, throughColumns, pairedColumnName, pairedColumns) {\n\tif (throughColumns.length === pairedColumns.length) return;\n\tthrow new InternalError(`Relation \"${relation.relationName}\" has invalid junction metadata: ${throughColumnName} has ${throughColumns.length} column(s), but ${pairedColumnName} has ${pairedColumns.length}`);\n}\nfunction assertJunctionParentMetadataLength(relation) {\n\tassertJunctionMetadataLength(relation, \"parentColumns\", relation.through.parentColumns, \"localColumns\", relation.localColumns);\n}\nfunction assertJunctionTargetMetadataLength(relation) {\n\tassertJunctionMetadataLength(relation, \"childColumns\", relation.through.childColumns, \"targetColumns\", relation.through.targetColumns);\n}\nfunction assertJunctionMetadataShape(relation) {\n\tassertJunctionParentMetadataLength(relation);\n\tassertJunctionTargetMetadataLength(relation);\n}\nfunction writeJunctionColumn(junctionRow, through, column, value, relationName) {\n\tif (Object.hasOwn(junctionRow, column) && !Object.is(junctionRow[column], value)) throw ormError(\"ORM.RELATION_MUTATION_INVALID\", `Cannot write junction \"${through.table}\": conflicting values for junction column \"${column}\"`, { meta: {\n\t\trelation: relationName,\n\t\tjunction: through.table,\n\t\tcolumn\n\t} });\n\tjunctionRow[column] = value;\n}\nasync function insertJunctionLink(scope, context, relation, parentPkValues, targetPkValues, mutationKind) {\n\tconst through = relation.through;\n\tconst junctionRow = {};\n\tfor (const [column, value] of parentPkValues.entries()) writeJunctionColumn(junctionRow, through, column, value, relation.relationName);\n\tfor (const [column, value] of targetPkValues.entries()) writeJunctionColumn(junctionRow, through, column, value, relation.relationName);\n\tconst applied = context.applyMutationDefaults({\n\t\top: \"create\",\n\t\tentry: through.table,\n\t\tnamespace: through.namespaceId,\n\t\tvalues: junctionRow\n\t});\n\tfor (const def of applied) junctionRow[def.field] = def.value;\n\tconst compiled = compileInsertCount(context.contract, through.namespaceId, through.table, [junctionRow]);\n\ttry {\n\t\tawait scope.execute(compiled);\n\t} catch (error) {\n\t\tif (mutationKind === \"connect\" && isUniqueConstraintViolation(error)) throw ormError(\"ORM.RELATION_LINK_DUPLICATE\", `connect() nested mutation for relation \"${relation.relationName}\" violated a unique constraint on junction \"${through.table}\"; the junction link may already be present`, {\n\t\t\tmeta: {\n\t\t\t\trelation: relation.relationName,\n\t\t\t\tjunction: through.table\n\t\t\t},\n\t\t\tcause: error\n\t\t});\n\t\tthrow error;\n\t}\n}\nasync function deleteJunctionLink(scope, context, relation, parentPkValues, targetPkValues) {\n\tconst through = relation.through;\n\tconst junctionRow = {};\n\tfor (const [column, value] of parentPkValues.entries()) writeJunctionColumn(junctionRow, through, column, value, relation.relationName);\n\tfor (const [column, value] of targetPkValues.entries()) writeJunctionColumn(junctionRow, through, column, value, relation.relationName);\n\tconst exprs = [];\n\tfor (const [column, value] of Object.entries(junctionRow)) exprs.push(BinaryExpr.eq(ColumnRef.of(through.table, column), LiteralExpr.of(value)));\n\tconst first = exprs[0];\n\tconst where = exprs.length === 1 && first !== void 0 ? first : and(...exprs);\n\tconst compiled = compileDeleteCount(context.contract, through.namespaceId, through.table, [where]);\n\tawait scope.execute(compiled);\n}\nfunction readParentColumnValues(contract, parentNamespaceId, parentModelName, relation, parentRow) {\n\tconst values = /* @__PURE__ */ new Map();\n\tfor (let i = 0; i < relation.localColumns.length; i++) {\n\t\tconst localColumn = relation.localColumns[i];\n\t\tconst targetColumn = relation.targetColumns[i];\n\t\tif (!localColumn || !targetColumn) continue;\n\t\tconst parentFieldName = toFieldName(contract, parentNamespaceId, parentModelName, localColumn);\n\t\tconst parentValue = parentRow[parentFieldName];\n\t\tif (parentValue === void 0) throw new InternalError(`Nested mutation requires parent field \"${parentFieldName}\" to be present in returned row`);\n\t\tvalues.set(targetColumn, parentValue);\n\t}\n\treturn values;\n}\nfunction buildChildJoinWhere(relation, childValues) {\n\tconst exprs = [];\n\tfor (const [childColumn, parentValue] of childValues.entries()) exprs.push(BinaryExpr.eq(ColumnRef.of(relation.relatedTableName, childColumn), LiteralExpr.of(parentValue)));\n\tconst first = exprs[0];\n\tif (exprs.length === 1 && first !== void 0) return first;\n\treturn and(...exprs);\n}\nasync function insertSingleRow(scope, context, namespaceId, modelName, data) {\n\tconst contract = context.contract;\n\tconst tableName = resolveModelTableName(contract, namespaceId, modelName);\n\tconst mappedData = mapModelDataToStorageRow(contract, namespaceId, modelName, data);\n\tconst applied = context.applyMutationDefaults({\n\t\top: \"create\",\n\t\tentry: tableName,\n\t\tnamespace: namespaceId,\n\t\tvalues: mappedData\n\t});\n\tfor (const def of applied) mappedData[def.field] = def.value;\n\tconst firstRow = (await queryPlanRows(scope, compileInsertReturning(contract, namespaceId, tableName, [mappedData], void 0)).toArray())[0];\n\tif (!firstRow) throw ormError(\"ORM.MUTATION_ROW_MISSING\", `Nested create for model \"${modelName}\" did not return a row`, { meta: {\n\t\toperation: \"create\",\n\t\tmodel: modelName,\n\t\tphase: \"nested\"\n\t} });\n\treturn mapStorageRowToModelFields(contract, namespaceId, modelName, firstRow);\n}\nasync function findRowByCriterion(scope, context, namespaceId, modelName, criterion) {\n\tconst contract = context.contract;\n\tconst whereExpr = shorthandToWhereExpr(context, namespaceId, modelName, castAs(criterion));\n\tif (!whereExpr) throw ormError(\"ORM.RELATION_MUTATION_INVALID\", `Nested connect for model \"${modelName}\" requires non-empty criterion`, { meta: {\n\t\tkind: \"connect\",\n\t\tmodel: modelName,\n\t\tproblem: \"empty-criterion\"\n\t} });\n\tconst firstRow = (await queryPlanRows(scope, compileSelect(contract, namespaceId, resolveModelTableName(contract, namespaceId, modelName), {\n\t\t...emptyState(),\n\t\tfilters: [whereExpr],\n\t\tlimit: 1\n\t})).toArray())[0];\n\tif (!firstRow) return null;\n\treturn mapStorageRowToModelFields(contract, namespaceId, modelName, firstRow);\n}\nasync function findFirstByFilters(scope, contract, namespaceId, modelName, filters) {\n\tconst firstRow = (await queryPlanRows(scope, compileSelect(contract, namespaceId, resolveModelTableName(contract, namespaceId, modelName), {\n\t\t...emptyState(),\n\t\tfilters,\n\t\tlimit: 1\n\t})).toArray())[0];\n\tif (!firstRow) return null;\n\treturn mapStorageRowToModelFields(contract, namespaceId, modelName, firstRow);\n}\nasync function executeUpdateCount(scope, contract, namespaceId, tableName, setValues, filters) {\n\tconst compiled = compileUpdateCount(contract, namespaceId, tableName, setValues, filters);\n\tawait scope.execute(compiled);\n}\nconst relationDefsCache = /* @__PURE__ */ new WeakMap();\nfunction getRelationDefinitions(contract, namespaceId, modelName) {\n\tlet perContract = relationDefsCache.get(contract);\n\tif (!perContract) {\n\t\tperContract = /* @__PURE__ */ new Map();\n\t\trelationDefsCache.set(contract, perContract);\n\t}\n\tconst cacheKey = JSON.stringify([namespaceId, modelName]);\n\tconst cached = perContract.get(cacheKey);\n\tif (cached) return cached;\n\tconst relations = resolveModelRelations(contract, namespaceId, modelName);\n\tconst definitions = Object.entries(relations).map(([relationName, relation]) => ({\n\t\trelationName,\n\t\trelatedModelName: relation.to,\n\t\trelatedNamespaceId: relation.toNamespace,\n\t\trelatedTableName: resolveModelTableName(contract, relation.toNamespace, relation.to),\n\t\tcardinality: relation.cardinality,\n\t\tlocalColumns: relation.on.localFields.map((f) => resolveFieldToColumn(contract, namespaceId, modelName, f)),\n\t\ttargetColumns: relation.on.targetFields.map((f) => resolveFieldToColumn(contract, relation.toNamespace, relation.to, f)),\n\t\tthrough: relation.through ? {\n\t\t\ttable: relation.through.table,\n\t\t\tnamespaceId: relation.through.namespaceId,\n\t\t\tparentColumns: relation.through.parentColumns,\n\t\t\tchildColumns: relation.through.childColumns,\n\t\t\ttargetColumns: relation.through.targetColumns,\n\t\t\trequiredPayloadColumns: relation.through.requiredPayloadColumns\n\t\t} : void 0\n\t}));\n\tperContract.set(cacheKey, definitions);\n\treturn definitions;\n}\nfunction toFieldName(contract, namespaceId, modelName, columnName) {\n\treturn getColumnToFieldMap(contract, namespaceId, modelName)[columnName] ?? columnName;\n}\n//#endregion\n//#region src/where-interop.ts\nfunction normalizeWhereArg(arg, options) {\n\tif (arg === void 0) return;\n\tif (arg === null) throw ormError(\"ORM.ARGUMENT_INVALID\", \"WhereArg cannot be null. Pass undefined or a valid WhereExpr/ToWhereExpr payload.\", { meta: { argument: \"where\" } });\n\tif (isToWhereExpr(arg)) return arg.toWhereExpr();\n\tif (options?.contract) return bindWhereExpr(options.contract, arg, options.namespaceId);\n\treturn arg;\n}\nfunction isToWhereExpr(arg) {\n\treturn typeof arg === \"object\" && arg !== null && \"toWhereExpr\" in arg && !isWhereExpr(arg);\n}\n//#endregion\n//#region src/write-guards.ts\nconst CHAIN_PARTS = {\n\torderBy: {\n\t\tnoun: \"an order\",\n\t\tcall: \"orderBy()\"\n\t},\n\tlimit: {\n\t\tnoun: \"a limit\",\n\t\tcall: \"limit()\"\n\t},\n\toffset: {\n\t\tnoun: \"an offset\",\n\t\tcall: \"offset()\"\n\t},\n\tcursor: {\n\t\tnoun: \"a cursor\",\n\t\tcall: \"cursor()\"\n\t},\n\tdistinct: {\n\t\tnoun: \"a distinct selection\",\n\t\tcall: \"distinct()\"\n\t},\n\tdistinctOn: {\n\t\tnoun: \"a distinctOn selection\",\n\t\tcall: \"distinctOn()\"\n\t}\n};\nfunction presentParts(state, names) {\n\tconst present = names.filter((name) => {\n\t\tconst value = state[name];\n\t\treturn Array.isArray(value) ? value.length > 0 : value !== void 0;\n\t});\n\treturn {\n\t\tnouns: present.map((name) => CHAIN_PARTS[name].noun),\n\t\tcalls: present.map((name) => CHAIN_PARTS[name].call)\n\t};\n}\nfunction listed(items, conjunction) {\n\tconst last = items.at(-1) ?? \"\";\n\treturn items.length > 1 ? `${items.slice(0, -1).join(\", \")} ${conjunction} ${last}` : last;\n}\nconst HIDDEN_BY_A_FRAGMENT = \"A fragment passed to with can add one without showing it at the call site.\";\n/** Throws `ORM.ARGUMENT_INVALID` when the collection has a limit, an offset, a cursor or a distinct selection, which `method`, a write of every matching row, would ignore. */\nfunction assertBulkWriteIgnoresNothing(state, modelName, method) {\n\tconst { nouns, calls } = presentParts(state, [\n\t\t\"limit\",\n\t\t\"offset\",\n\t\t\"cursor\",\n\t\t\"distinct\",\n\t\t\"distinctOn\"\n\t]);\n\tif (nouns.length === 0) return;\n\tconst { limit, offset, cursor, distinct, distinctOn } = state;\n\tthrow ormError(\"ORM.ARGUMENT_INVALID\", `Cannot ${method} ${modelName}: the collection has ${listed(nouns, \"and\")}`, {\n\t\twhy: `${method} changes every row that matches the filter. The statement it runs cannot apply ${listed(nouns, \"or\")}, so it would change more rows than the chain asks for. ${HIDDEN_BY_A_FRAGMENT}`,\n\t\tfix: `Remove ${listed(calls, \"and\")} before ${method}, or read the rows first and change them by their ids.`,\n\t\tmeta: {\n\t\t\tmodel: modelName,\n\t\t\tmethod,\n\t\t\tlimit,\n\t\t\toffset,\n\t\t\tcursor,\n\t\t\tdistinct,\n\t\t\tdistinctOn\n\t\t}\n\t});\n}\n/** Throws `ORM.ARGUMENT_INVALID` when the collection has an order, a limit, an offset, a cursor or a distinct selection, which an update with a relation callback would ignore. */\nfunction assertRelationUpdateIgnoresNothing(state, modelName) {\n\tconst { nouns, calls } = presentParts(state, [\n\t\t\"orderBy\",\n\t\t\"limit\",\n\t\t\"offset\",\n\t\t\"cursor\",\n\t\t\"distinct\",\n\t\t\"distinctOn\"\n\t]);\n\tif (nouns.length === 0) return;\n\tconst { orderBy, limit, offset, cursor, distinct, distinctOn } = state;\n\tthrow ormError(\"ORM.ARGUMENT_INVALID\", `Cannot update ${modelName} with a relation mutation: the collection has ${listed(nouns, \"and\")}`, {\n\t\twhy: `An update that changes a relation finds its row by the filter alone. It would ignore ${listed(nouns, \"and\")}, and could change another row than first() returns. ${HIDDEN_BY_A_FRAGMENT}`,\n\t\tfix: `Remove ${listed(calls, \"and\")} before update, or filter to the one row, such as by its id.`,\n\t\tmeta: {\n\t\t\tmodel: modelName,\n\t\t\tmethod: \"update\",\n\t\t\tordered: orderBy !== void 0 && orderBy.length > 0,\n\t\t\tlimit,\n\t\t\toffset,\n\t\t\tcursor,\n\t\t\tdistinct,\n\t\t\tdistinctOn\n\t\t}\n\t});\n}\n//#endregion\n//#region src/collection.ts\nfunction applyCreateDefaults(ctx, namespaceId, tableName, rows, defaultValueCache = /* @__PURE__ */ new Map()) {\n\tfor (const row of rows) {\n\t\tconst applied = ctx.context.applyMutationDefaults({\n\t\t\top: \"create\",\n\t\t\tentry: tableName,\n\t\t\tnamespace: namespaceId,\n\t\t\tvalues: row,\n\t\t\tdefaultValueCache\n\t\t});\n\t\tfor (const def of applied) row[def.field] = def.value;\n\t}\n}\nfunction applyUpdateDefaults(ctx, namespaceId, tableName, values) {\n\tconst applied = ctx.context.applyMutationDefaults({\n\t\top: \"update\",\n\t\tentry: tableName,\n\t\tnamespace: namespaceId,\n\t\tvalues\n\t});\n\tfor (const def of applied) values[def.field] = def.value;\n}\nfunction isToWhereExprInput(value) {\n\treturn typeof value === \"object\" && value !== null && \"toWhereExpr\" in value && typeof value.toWhereExpr === \"function\";\n}\nfunction isWhereDirectInput(value) {\n\treturn isWhereExpr(value) && typeof value === \"object\" && value !== null && \"accept\" in value && typeof value.accept === \"function\" || isToWhereExprInput(value);\n}\nfunction splitCreateArguments(optionsOrConfigure, configure) {\n\tif (typeof optionsOrConfigure === \"function\") return {\n\t\toptions: void 0,\n\t\tconfigureCallback: optionsOrConfigure\n\t};\n\treturn {\n\t\toptions: optionsOrConfigure,\n\t\tconfigureCallback: configure\n\t};\n}\nfunction isMtiVariantInfo(variant) {\n\treturn variant?.strategy === \"mti\";\n}\nvar CollectionBase = class CollectionBase {\n\t/** @internal */\n\tctx;\n\t/** @internal */\n\tcontract;\n\t/** @internal */\n\tmodelName;\n\t/** @internal */\n\ttableName;\n\t/** @internal */\n\tnamespaceId;\n\t/** @internal */\n\tstate;\n\t/** @internal */\n\tregistry;\n\t/** @internal */\n\tincludeRefinementMode;\n\tconstructor(ctx, modelName, options) {\n\t\tthis.ctx = ctx;\n\t\tthis.contract = ctx.context.contract;\n\t\tthis.modelName = modelName;\n\t\tthis.namespaceId = options.namespaceId;\n\t\tthis.tableName = options.tableName ?? resolveModelTableName(this.contract, options.namespaceId, modelName);\n\t\tthis.state = options.state ?? emptyState();\n\t\tthis.registry = options.registry ?? /* @__PURE__ */ new Map();\n\t\tthis.includeRefinementMode = options.includeRefinementMode ?? false;\n\t\tthis.#installAggregateReducers();\n\t}\n\t/**\n\t* Install one include-scalar reducer per operation the composed registry\n\t* contributes — the runtime mirror of the contract's emitted aggregate map,\n\t* which is what types the reducers as {@link AggregateIncludeReducers} on\n\t* the public {@link Collection} surface. The reducers live on the instance\n\t* because their names are the registry's, not the class declaration's.\n\t*\n\t* A name the collection already carries is skipped, and which member holds\n\t* it decides what the skip means. A `CollectionBase` member is rejected at\n\t* ORM composition with `ORM.AGGREGATE_OPERATION_RESERVED`, since\n\t* {@link reservedCollectionMemberNames} scans this class. A member declared\n\t* by a custom collection class registered through `orm({ collections })`\n\t* falls outside that set, so it keeps the name and the operation gets no\n\t* reducer. The type level is what guards that case: {@link Collection}\n\t* intersects the class with {@link AggregateIncludeReducers}, so for any\n\t* contract whose emitted map carries the operation, a subclass member that\n\t* does not match the reducer's signature is a type error.\n\t*/\n\t#installAggregateReducers() {\n\t\tfor (const operation of aggregateOperationNames(this.ctx.context.aggregateDescriptors)) {\n\t\t\tif (operation in this) continue;\n\t\t\tObject.defineProperty(this, operation, {\n\t\t\t\tvalue: (field) => this.#includeScalarReducer(operation, field),\n\t\t\t\twritable: true,\n\t\t\t\tenumerable: false,\n\t\t\t\tconfigurable: true\n\t\t\t});\n\t\t}\n\t}\n\t/**\n\t* Scalar reducer — reduces a to-many relation to the operation's value over\n\t* the related rows. Use inside an `include(...)` refinement callback as\n\t* `include(..., (rel) => rel.count())`; throws if called elsewhere. The\n\t* parent row's relation field becomes that value instead of an array. A\n\t* call without a field aggregates over rows; a call with one aggregates the\n\t* field's storage column.\n\t*/\n\t#includeScalarReducer(operation, field) {\n\t\tthis.#assertIncludeRefinementMode(`${operation}()`);\n\t\tconst column = field === void 0 ? void 0 : resolveFieldToColumn(this.contract, this.namespaceId, this.modelName, field);\n\t\treturn createIncludeScalar(operation, this.state, column);\n\t}\n\twhere(input) {\n\t\tconst filter = normalizeWhereArg(typeof input === \"function\" ? input(createModelAccessor(this.ctx.context, this.namespaceId, this.modelName, this.state.variantName)) : isWhereDirectInput(input) ? input : shorthandToWhereExpr(this.ctx.context, this.namespaceId, this.modelName, input), {\n\t\t\tcontract: this.contract,\n\t\t\tnamespaceId: this.namespaceId\n\t\t});\n\t\tif (!filter) return blindCast(this);\n\t\treturn this.#cloneSelf({ filters: [...this.state.filters, filter] });\n\t}\n\twith(fn) {\n\t\treturn fn(this);\n\t}\n\t/**\n\t* Define a query fragment for this collection's model, such as a shared `select` and `include`. The body is typed once, against the model's plain collection. The fragment accepts any collection of the model that `select` and `variant` have not narrowed.\n\t*\n\t* ```ts\n\t* const summary = db.Post.fragment((posts) => posts.select('id', 'title').include('user'));\n\t* db.User.include('posts', (posts) => posts.with(summary));\n\t* ```\n\t*/\n\tfragment(body) {\n\t\tassertFragmentBody(body);\n\t\tconst source = {\n\t\t\tmodelName: this.modelName,\n\t\t\tnamespaceId: this.namespaceId\n\t\t};\n\t\treturn (collection) => {\n\t\t\tassertModelFragmentReceiver(source, collection);\n\t\t\treturn body(blindCast(collection));\n\t\t};\n\t}\n\tvariant(value) {\n\t\tconst polyInfo = resolvePolymorphismInfo(this.contract, this.namespaceId, this.modelName);\n\t\tconst selectedVariantName = this.state.variantName;\n\t\tif (selectedVariantName !== void 0) {\n\t\t\tconst selectedValue = polyInfo?.variants.get(selectedVariantName)?.value;\n\t\t\tthrow ormError(\"ORM.OPERATION_UNSUPPORTED\", `variant(\"${value}\") cannot be called on model \"${this.modelName}\" because variant(\"${selectedValue}\") is already selected; call variant() on the base collection instead`, { meta: {\n\t\t\t\tmethod: \"variant\",\n\t\t\t\tmodel: this.modelName,\n\t\t\t\tvariant: selectedVariantName,\n\t\t\t\tselectedValue,\n\t\t\t\treason: \"variant-already-selected\"\n\t\t\t} });\n\t\t}\n\t\tconst variantInfo = polyInfo?.variantsByValue.get(value);\n\t\tif (!polyInfo || !variantInfo) {\n\t\t\tconst declaredValues = [...polyInfo?.variantsByValue.keys() ?? []];\n\t\t\tthrow ormError(\"ORM.ARGUMENT_INVALID\", declaredValues.length === 0 ? `variant(\"${value}\") cannot narrow model \"${this.modelName}\": it declares no discriminator values` : `variant(\"${value}\") cannot narrow model \"${this.modelName}\": the declared discriminator values are ${declaredValues.map((declared) => `\"${declared}\"`).join(\", \")}`, { meta: {\n\t\t\t\tmethod: \"variant\",\n\t\t\t\targument: \"value\",\n\t\t\t\tmodel: this.modelName,\n\t\t\t\tvalue,\n\t\t\t\tdeclaredValues\n\t\t\t} });\n\t\t}\n\t\tconst columnName = polyInfo.discriminatorColumn;\n\t\tconst filter = BinaryExpr.eq(ColumnRef.of(this.tableName, columnName), LiteralExpr.of(variantInfo.value));\n\t\treturn this.#cloneWithRow({\n\t\t\tfilters: [...this.state.filters, filter],\n\t\t\tvariantName: variantInfo.modelName\n\t\t});\n\t}\n\tinclude(relationName, refineFn) {\n\t\tconst relation = resolveIncludeRelation(this.contract, this.namespaceId, this.modelName, relationName, this.state.variantName);\n\t\tlet nestedState = emptyState();\n\t\tlet scalarSelector;\n\t\tlet combineBranches;\n\t\tif (refineFn) {\n\t\t\tconst refined = refineFn(this.#createCollection(blindCast(relation.relatedModelName), {\n\t\t\t\ttableName: relation.relatedTableName,\n\t\t\t\tnamespaceId: relation.relatedNamespaceId,\n\t\t\t\tstate: emptyState(),\n\t\t\t\tincludeRefinementMode: true\n\t\t\t}));\n\t\t\tif (isIncludeScalar(refined)) {\n\t\t\t\tif (isToOneCardinality(relation.cardinality)) throw ormError(\"ORM.INCLUDE_UNSUPPORTED\", `include('${relationName}') scalar aggregations are only supported for to-many relations`, { meta: {\n\t\t\t\t\trelation: relationName,\n\t\t\t\t\tkind: \"scalar\"\n\t\t\t\t} });\n\t\t\t\tscalarSelector = refined;\n\t\t\t\tnestedState = refined.state;\n\t\t\t} else if (isIncludeCombine(refined)) {\n\t\t\t\tif (isToOneCardinality(relation.cardinality)) throw ormError(\"ORM.INCLUDE_UNSUPPORTED\", `include('${relationName}') combine() is only supported for to-many relations`, { meta: {\n\t\t\t\t\trelation: relationName,\n\t\t\t\t\tkind: \"combine\"\n\t\t\t\t} });\n\t\t\t\tcombineBranches = refined.branches;\n\t\t\t} else if (isCollectionStateCarrier(refined)) nestedState = refined.state;\n\t\t\telse throw ormError(\"ORM.INCLUDE_INVALID\", `include('${relationName}') refinement must return a collection, include scalar selector, or combine() descriptor`, { meta: { relation: relationName } });\n\t\t}\n\t\tconst includeExpr = {\n\t\t\trelationName,\n\t\t\trelatedModelName: relation.relatedModelName,\n\t\t\trelatedNamespaceId: relation.relatedNamespaceId,\n\t\t\trelatedTableName: relation.relatedTableName,\n\t\t\tlocalTableName: relation.localTableName,\n\t\t\ttargetColumns: relation.targetColumns,\n\t\t\tlocalColumns: relation.localColumns,\n\t\t\tcardinality: relation.cardinality,\n\t\t\t...ifDefined(\"through\", relation.through),\n\t\t\tnested: nestedState,\n\t\t\tscalar: scalarSelector,\n\t\t\tcombine: combineBranches\n\t\t};\n\t\treturn this.#cloneWithRow({ includes: [...this.state.includes, includeExpr] });\n\t}\n\tselect(...fields) {\n\t\tconst selectedFields = mapFieldsToColumns(this.contract, this.namespaceId, this.modelName, fields);\n\t\treturn this.#cloneWithRow({ selectedFields });\n\t}\n\torderBy(selection) {\n\t\tconst accessor = createModelAccessor(this.ctx.context, this.namespaceId, this.modelName, this.state.variantName);\n\t\tconst nextOrders = (Array.isArray(selection) ? selection : [selection]).map((selector) => selector(accessor));\n\t\tconst existing = this.state.orderBy ?? [];\n\t\treturn this.#cloneSelf({ orderBy: [...existing, ...nextOrders] });\n\t}\n\t/**\n\t* Switch to grouped-aggregate mode. Returns a `GroupedCollection`\n\t* whose `.aggregate(...)` terminal produces one row per group with\n\t* the chosen key columns plus the requested aggregates.\n\t*\n\t* ```typescript\n\t* const stats = await db.orm.Post\n\t* .where({ published: true })\n\t* .groupBy('userId')\n\t* .aggregate((agg) => ({ count: agg.count(), totalViews: agg.sum('views') }));\n\t* // [{ userId: 1, count: 3, totalViews: 120 }, ...]\n\t* ```\n\t*/\n\tgroupBy(...fields) {\n\t\tassertLockCompatible(this.state, \"groupBy\");\n\t\tconst groupByColumns = mapFieldsToColumns(this.contract, this.namespaceId, this.modelName, fields);\n\t\treturn new GroupedCollection(this.ctx, this.modelName, {\n\t\t\ttableName: this.tableName,\n\t\t\tnamespaceId: this.namespaceId,\n\t\t\tpreGroupState: this.state,\n\t\t\tgroupByFields: [...fields],\n\t\t\tgroupByColumns,\n\t\t\thavingFilters: [],\n\t\t\tpostGroup: emptyGroupPagingState()\n\t\t});\n\t}\n\t/**\n\t* Produce multiple named sub-views of a to-many relation in a\n\t* single `include(...)`. Each branch is either another refined\n\t* collection (mapped to a row array on the parent) or a scalar\n\t* reducer such as `count()`/`sum(...)`. Only valid inside an\n\t* `include(...)` refinement callback for to-many relations.\n\t*\n\t* ```typescript\n\t* const users = await db.orm.User.include('posts', (posts) =>\n\t* posts.combine({\n\t* recent: posts.where({ published: true }).limit(3),\n\t* total: posts.count(),\n\t* averageViews: posts.avg('views'),\n\t* }),\n\t* ).all();\n\t* // each user row: {\n\t* // ...user,\n\t* // posts: { recent: Post[]; total: number; averageViews: number | null };\n\t* // }\n\t* ```\n\t*/\n\tcombine(spec) {\n\t\tthis.#assertIncludeRefinementMode(\"combine()\");\n\t\tconst branches = {};\n\t\tfor (const [name, value] of Object.entries(spec)) {\n\t\t\tif (isIncludeScalar(value)) {\n\t\t\t\tbranches[name] = {\n\t\t\t\t\tkind: \"scalar\",\n\t\t\t\t\tselector: value\n\t\t\t\t};\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (isCollectionStateCarrier(value)) {\n\t\t\t\tbranches[name] = {\n\t\t\t\t\tkind: \"rows\",\n\t\t\t\t\tstate: value.state\n\t\t\t\t};\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tthrow ormError(\"ORM.INCLUDE_INVALID\", `include().combine() branch \"${name}\" is invalid`, { meta: { branch: name } });\n\t\t}\n\t\treturn createIncludeCombine(branches);\n\t}\n\tcursor(cursorValues) {\n\t\tassertCursorCompatibleOrder(this.state.orderBy);\n\t\tconst mappedCursor = mapCursorValuesToColumns(this.contract, this.namespaceId, this.modelName, cursorValues);\n\t\tif (Object.keys(mappedCursor).length === 0) return this;\n\t\treturn this.#cloneSelf({ cursor: mappedCursor });\n\t}\n\tdistinct(...fields) {\n\t\tconst distinctFields = mapFieldsToColumns(this.contract, this.namespaceId, this.modelName, fields);\n\t\treturn this.#cloneSelf({\n\t\t\tdistinct: distinctFields,\n\t\t\tdistinctOn: void 0\n\t\t});\n\t}\n\tdistinctOn(...fields) {\n\t\tassertDistinctOnCapability(this.contract, \"distinctOn\");\n\t\tassertDistinctOnCompatibleOrder(this.state.orderBy, fields.length);\n\t\tconst distinctOnFields = mapFieldsToColumns(this.contract, this.namespaceId, this.modelName, fields);\n\t\treturn this.#cloneSelf({\n\t\t\tdistinct: void 0,\n\t\t\tdistinctOn: distinctOnFields\n\t\t});\n\t}\n\t/**\n\t* Lock the selected rows of this model with `FOR UPDATE` until the transaction ends.\n\t*\n\t* Requires the `sql.forUpdate` and `sql.lockOf` capabilities, because the lock always names the model's table with `OF`.\n\t*\n\t* ```typescript\n\t* const job = await tx.orm.Job.where({ state: 'queued' }).limit(1).forUpdate({ skipLocked: true }).first();\n\t* ```\n\t*/\n\tforUpdate(...options) {\n\t\treturn this.#lock(\"forUpdate\", options[0]);\n\t}\n\t/**\n\t* Lock the selected rows of this model with `FOR NO KEY UPDATE` until the transaction ends. Unlike `forUpdate`, it does not block foreign-key checks from rows that reference them.\n\t*\n\t* Requires the `postgres.forNoKeyUpdate` and `sql.lockOf` capabilities, because the lock always names the model's table with `OF`.\n\t*/\n\tforNoKeyUpdate(...options) {\n\t\treturn this.#lock(\"forNoKeyUpdate\", options[0]);\n\t}\n\t/**\n\t* Lock the selected rows of this model with `FOR SHARE` until the transaction ends; other transactions may share-lock them but not write them.\n\t*\n\t* Requires the `sql.forShare` and `sql.lockOf` capabilities, because the lock always names the model's table with `OF`.\n\t*/\n\tforShare(...options) {\n\t\treturn this.#lock(\"forShare\", options[0]);\n\t}\n\t/**\n\t* Lock the selected rows of this model with `FOR KEY SHARE` until the transaction ends; only deletes and key changes are blocked.\n\t*\n\t* Requires the `postgres.forKeyShare` and `sql.lockOf` capabilities, because the lock always names the model's table with `OF`.\n\t*/\n\tforKeyShare(...options) {\n\t\treturn this.#lock(\"forKeyShare\", options[0]);\n\t}\n\tlimit(n) {\n\t\treturn this.#cloneSelf({ limit: typeof n === \"number\" ? n : toExpr(n) });\n\t}\n\toffset(n) {\n\t\treturn this.#cloneSelf({ offset: typeof n === \"number\" ? n : toExpr(n) });\n\t}\n\tall(configure) {\n\t\treturn this.#withAnnotationsFromMeta(configure, \"all\").#dispatch();\n\t}\n\tget prepared() {\n\t\treturn blindCast({\n\t\t\taggregate: (fn, configure) => this.#describeAggregate(fn, configure),\n\t\t\tall: (configure) => {\n\t\t\t\treturn describeCollectionRows(this.#withAnnotationsFromMeta(configure, \"all\").#descriptionOptions());\n\t\t\t},\n\t\t\tfirst: (filter, configure) => {\n\t\t\t\treturn describeCollectionFirst(this.#forFirst(filter, configure, \"first\").#descriptionOptions());\n\t\t\t},\n\t\t\tfirstOrThrow: (filter, configure) => {\n\t\t\t\treturn describeCollectionFirstOrThrow(this.#forFirst(filter, configure, \"firstOrThrow\").#descriptionOptions());\n\t\t\t}\n\t\t});\n\t}\n\t#descriptionOptions() {\n\t\treturn {\n\t\t\tcontext: this.ctx.context,\n\t\t\tstate: this.state,\n\t\t\ttableName: this.tableName,\n\t\t\tmodelName: this.modelName,\n\t\t\tnamespaceId: this.namespaceId\n\t\t};\n\t}\n\t#forFirst(filter, configure, terminalName) {\n\t\treturn (filter === void 0 ? this : typeof filter === \"function\" ? this.where(filter) : this.where(filter)).limit(1).#withAnnotationsFromMeta(configure, terminalName);\n\t}\n\tasync first(filter, configure) {\n\t\treturn consumeFirstRow(this.#forFirst(filter, configure, \"first\").#dispatch());\n\t}\n\tasync firstOrThrow(filter, configure) {\n\t\treturn this.#forFirst(filter, configure, \"firstOrThrow\").#dispatch().firstOrThrow();\n\t}\n\t/**\n\t* Read terminal: run an aggregate query (count, sum, avg, min, max)\n\t* built via the `AggregateBuilder` callback. Returns one object\n\t* with the requested aggregate values keyed by the aliases supplied\n\t* in the spec.\n\t*\n\t* ```typescript\n\t* const stats = await db.orm.Post\n\t* .where({ published: true })\n\t* .aggregate((agg) => ({\n\t* total: agg.count(),\n\t* averageViews: agg.avg('views'),\n\t* maxViews: agg.max('views'),\n\t* }));\n\t* // { total: 42, averageViews: 17.3, maxViews: 9001 }\n\t* ```\n\t*\n\t* Accepts an optional `configure` callback that receives a\n\t* `MetaBuilder<'read'>` for attaching typed annotations.\n\t* Annotations are merged into the compiled plan's `meta.annotations`.\n\t*/\n\tasync aggregate(fn, configure) {\n\t\tconst description = this.#describeAggregate(fn, configure);\n\t\treturn description.consume(queryPlanRows(this.ctx.runtime, description.plan));\n\t}\n\t#describeAggregate(fn, configure) {\n\t\tassertLockCompatible(this.state, \"aggregate\");\n\t\tconst aggregateSpec = fn(createAggregateBuilder(this.contract, this.ctx.context.aggregateDescriptors, this.namespaceId, this.modelName));\n\t\tconst entries = Object.entries(aggregateSpec);\n\t\tif (entries.length === 0) throw ormError(\"ORM.AGGREGATE_SELECTOR_MISSING\", \"aggregate() requires at least one aggregation selector\", { meta: {\n\t\t\tmethod: \"aggregate\",\n\t\t\tmodel: this.modelName\n\t\t} });\n\t\tfor (const [alias, selector] of entries) if (!isAggregateSelector(selector)) throw ormError(\"ORM.AGGREGATE_SELECTOR_INVALID\", `aggregate() selector \"${alias}\" is invalid`, { meta: {\n\t\t\tmethod: \"aggregate\",\n\t\t\tmodel: this.modelName,\n\t\t\talias\n\t\t} });\n\t\tconst annotationsMap = this.#collectAnnotationsFromMeta(configure, \"read\", \"aggregate\");\n\t\tconst compiled = mergeAnnotations(compileAggregate(this.contract, this.ctx.context.aggregateDescriptors, this.namespaceId, this.tableName, this.state, aggregateSpec, this.modelName), annotationsMap);\n\t\tconst results = entries.map(([alias, selector]) => {\n\t\t\tconst resolved = resolveAggregate({\n\t\t\t\taggregates: this.ctx.context.aggregateDescriptors,\n\t\t\t\tcontract: this.contract,\n\t\t\t\tnamespaceId: this.namespaceId,\n\t\t\t\ttableName: this.tableName,\n\t\t\t\tfn: selector.fn,\n\t\t\t\tcolumn: selector.column\n\t\t\t});\n\t\t\treturn {\n\t\t\t\talias,\n\t\t\t\tresolved,\n\t\t\t\tcodec: this.ctx.context.contractCodecs.forCodecRef(resolved.codec)\n\t\t\t};\n\t\t});\n\t\treturn {\n\t\t\tplan: compiled,\n\t\t\tasync consume(source) {\n\t\t\t\tconst row = (await source.toArray())[0] ?? {};\n\t\t\t\treturn blindCast(Object.fromEntries(results.map(({ alias, resolved, codec }) => {\n\t\t\t\t\treturn [alias, (Object.hasOwn(row, alias) ? row[alias] : void 0) ?? emptyAggregateResult(resolved, codec)];\n\t\t\t\t})));\n\t\t\t}\n\t\t};\n\t}\n\tasync create(data, configure) {\n\t\tassertLockCompatible(this.state, \"mutation\");\n\t\tassertReturningCapability(this.contract, \"create()\");\n\t\tconst annotationsMap = this.#collectAnnotationsFromMeta(configure, \"write\", \"create\");\n\t\tif (hasNestedMutationCallbacks(this.contract, this.namespaceId, this.modelName, blindCast(data))) {\n\t\t\tconst createdRow = await executeNestedCreateMutation({\n\t\t\t\tcontext: this.ctx.context,\n\t\t\t\truntime: this.ctx.runtime,\n\t\t\t\tnamespaceId: this.namespaceId,\n\t\t\t\tmodelName: this.modelName,\n\t\t\t\tdata: blindCast(data)\n\t\t\t});\n\t\t\tconst identityCriterion = buildRowIdentityFilterFromRow(this.contract, this.namespaceId, this.modelName, createdRow);\n\t\t\tconst reloaded = await this.#reloadMutationRowByIdentity(identityCriterion);\n\t\t\tif (!reloaded) throw ormError(\"ORM.MUTATION_ROW_MISSING\", `create() for model \"${this.modelName}\" did not return a row`, { meta: {\n\t\t\t\toperation: \"create\",\n\t\t\t\tmodel: this.modelName\n\t\t\t} });\n\t\t\treturn reloaded;\n\t\t}\n\t\tconst created = (await this.#createAllWithAnnotations([blindCast(data)], annotationsMap))[0];\n\t\tif (created) return created;\n\t\tthrow ormError(\"ORM.MUTATION_ROW_MISSING\", `create() for model \"${this.modelName}\" did not return a row`, { meta: {\n\t\t\toperation: \"create\",\n\t\t\tmodel: this.modelName\n\t\t} });\n\t}\n\tcreateAll(data, optionsOrConfigure, configure) {\n\t\tassertLockCompatible(this.state, \"mutation\");\n\t\tconst { options, configureCallback } = splitCreateArguments(optionsOrConfigure, configure);\n\t\tconst conflictSkip = this.#resolveConflictSkip(options, \"createAll()\");\n\t\treturn this.#createAllWithAnnotations(data, this.#collectAnnotationsFromMeta(configureCallback, \"write\", \"createAll\"), conflictSkip);\n\t}\n\t#createAllWithAnnotations(data, annotationsMap, conflictSkip) {\n\t\tif (data.length === 0) {\n\t\t\tconst generator = async function* () {};\n\t\t\treturn new AsyncIterableResult(generator());\n\t\t}\n\t\tassertReturningCapability(this.contract, \"createAll()\");\n\t\tconst rows = blindCast(data);\n\t\tconst mtiContext = this.#resolveMtiCreateContext();\n\t\tif (mtiContext) return this.#executeMtiCreate(rows, mtiContext);\n\t\tconst mappedRows = this.#mapCreateRows(rows);\n\t\tapplyCreateDefaults(this.ctx, this.namespaceId, this.tableName, mappedRows);\n\t\tconst { selectedForQuery: selectedForInsert, hiddenColumns } = this.#augmentMutationSelection();\n\t\tif (this.contract.capabilities?.[\"sql\"]?.[\"defaultInInsert\"] !== true) {\n\t\t\tconst plans = compileInsertReturningSplit(this.contract, this.namespaceId, this.tableName, mappedRows, selectedForInsert, conflictSkip).map((plan) => mergeAnnotations(plan, annotationsMap));\n\t\t\treturn dispatchSplitMutationRows({\n\t\t\t\tcontext: this.ctx.context,\n\t\t\t\truntime: this.ctx.runtime,\n\t\t\t\tplans,\n\t\t\t\ttableName: this.tableName,\n\t\t\t\tmodelName: this.modelName,\n\t\t\t\tnamespaceId: this.namespaceId,\n\t\t\t\tvariantName: this.state.variantName,\n\t\t\t\tincludes: this.state.includes,\n\t\t\t\tselectedFields: this.state.selectedFields,\n\t\t\t\thiddenColumns,\n\t\t\t\tmapRow: (mapped) => blindCast(mapped)\n\t\t\t});\n\t\t}\n\t\tconst compiled = mergeAnnotations(compileInsertReturning(this.contract, this.namespaceId, this.tableName, mappedRows, selectedForInsert, conflictSkip), annotationsMap);\n\t\treturn dispatchMutationRows({\n\t\t\tcontext: this.ctx.context,\n\t\t\truntime: this.ctx.runtime,\n\t\t\tcompiled,\n\t\t\ttableName: this.tableName,\n\t\t\tmodelName: this.modelName,\n\t\t\tnamespaceId: this.namespaceId,\n\t\t\tvariantName: this.state.variantName,\n\t\t\tincludes: this.state.includes,\n\t\t\tselectedFields: this.state.selectedFields,\n\t\t\thiddenColumns,\n\t\t\tmapRow: (mapped) => blindCast(mapped)\n\t\t});\n\t}\n\t#resolveConflictSkip(options, method) {\n\t\tif (options === void 0) return void 0;\n\t\tif (options.onConflict !== \"skip\") throw ormError(\"ORM.ARGUMENT_INVALID\", `${method} onConflict must be \"skip\"; received ${JSON.stringify(options.onConflict)}`, { meta: {\n\t\t\tmethod,\n\t\t\tmodel: this.modelName\n\t\t} });\n\t\tif (method === \"createAll()\") this.#assertConflictSkipNotOnMtiVariant(method);\n\t\telse this.#assertNotMtiVariant(method);\n\t\tconst conflictOn = options.conflictOn ?? [];\n\t\tassertInsertConflictSkipCapability(this.contract, method, conflictOn.length > 0);\n\t\treturn { columns: resolveInsertConflictColumns(this.contract, this.namespaceId, this.modelName, conflictOn, method) };\n\t}\n\t#assertNotMtiVariant(method) {\n\t\tthis.#refuseOnMtiVariant(method, `${method} is not supported for MTI variant \"${this.state.variantName}\" on model \"${this.modelName}\". Use createAll() instead.`);\n\t}\n\t#assertConflictSkipNotOnMtiVariant(method) {\n\t\tthis.#refuseOnMtiVariant(method, `The onConflict option is not supported on variant \"${this.state.variantName}\" of model \"${this.modelName}\" because the variant is stored in its own table. Call createAll(rows) without the option; a duplicate row then makes the call fail.`);\n\t}\n\t#refuseOnMtiVariant(method, message) {\n\t\tif (!this.#resolveMtiCreateContext()) return;\n\t\tthrow ormError(\"ORM.OPERATION_UNSUPPORTED\", message, { meta: {\n\t\t\tmethod,\n\t\t\tmodel: this.modelName,\n\t\t\tvariant: this.state.variantName,\n\t\t\treason: \"mti-variant\"\n\t\t} });\n\t}\n\t#resolveMtiCreateContext() {\n\t\tconst variantName = this.state.variantName;\n\t\tif (!variantName) return null;\n\t\tconst polyInfo = resolvePolymorphismInfo(this.contract, this.namespaceId, this.modelName);\n\t\tif (!polyInfo) return null;\n\t\tconst variant = polyInfo.variants.get(variantName);\n\t\tif (!isMtiVariantInfo(variant)) return null;\n\t\treturn {\n\t\t\tpolyInfo,\n\t\t\tvariant,\n\t\t\tbaseFieldToColumn: getFieldToColumnMap(this.contract, this.namespaceId, this.modelName),\n\t\t\tvariantFieldToColumn: getFieldToColumnMap(this.contract, this.namespaceId, variant.modelName),\n\t\t\tpkColumns: resolvePrimaryKeyColumns(this.contract, this.namespaceId, this.tableName)\n\t\t};\n\t}\n\t#executeMtiCreate(data, mtiCtx) {\n\t\tconst { polyInfo, variant, baseFieldToColumn, variantFieldToColumn, pkColumns } = mtiCtx;\n\t\tconst contract = this.contract;\n\t\tconst collectionCtx = this.ctx;\n\t\tconst runtime = collectionCtx.runtime;\n\t\tconst tableName = this.tableName;\n\t\tconst modelName = this.modelName;\n\t\tconst namespaceId = this.namespaceId;\n\t\tconst baseFieldColumns = new Set(Object.values(baseFieldToColumn));\n\t\tconst variantFieldColumns = new Set(Object.values(variantFieldToColumn));\n\t\tconst mergedFieldToColumn = {\n\t\t\t...baseFieldToColumn,\n\t\t\t...variantFieldToColumn\n\t\t};\n\t\tconst generator = async function* () {\n\t\t\tconst defaultValueCache = /* @__PURE__ */ new Map();\n\t\t\tfor (const row of data) {\n\t\t\t\tconst allMapped = {};\n\t\t\t\tfor (const [fieldName, value] of Object.entries(row)) {\n\t\t\t\t\tif (value === void 0) continue;\n\t\t\t\t\tconst columnName = mergedFieldToColumn[fieldName] ?? fieldName;\n\t\t\t\t\tallMapped[columnName] = value;\n\t\t\t\t}\n\t\t\t\tallMapped[polyInfo.discriminatorColumn] = variant.value;\n\t\t\t\tconst baseRow = {};\n\t\t\t\tconst variantRow = {};\n\t\t\t\tfor (const [col, val] of Object.entries(allMapped)) {\n\t\t\t\t\tif (baseFieldColumns.has(col) || col === polyInfo.discriminatorColumn) baseRow[col] = val;\n\t\t\t\t\tif (variantFieldColumns.has(col)) variantRow[col] = val;\n\t\t\t\t}\n\t\t\t\tyield blindCast(await withMutationScope(runtime, async (scope) => {\n\t\t\t\t\tapplyCreateDefaults(collectionCtx, namespaceId, tableName, [baseRow], defaultValueCache);\n\t\t\t\t\tconst baseCreated = (await queryPlanRows(scope, compileInsertReturning(contract, namespaceId, tableName, [baseRow], void 0)).toArray())[0];\n\t\t\t\t\tif (!baseCreated) throw ormError(\"ORM.MUTATION_ROW_MISSING\", `MTI base INSERT for model \"${modelName}\" did not return a row`, { meta: {\n\t\t\t\t\t\toperation: \"create\",\n\t\t\t\t\t\tmodel: modelName,\n\t\t\t\t\t\ttable: tableName,\n\t\t\t\t\t\tphase: \"mti-base\"\n\t\t\t\t\t} });\n\t\t\t\t\tfor (const pkColumn of pkColumns) variantRow[pkColumn] = baseCreated[pkColumn];\n\t\t\t\t\tapplyCreateDefaults(collectionCtx, namespaceId, variant.table, [variantRow], defaultValueCache);\n\t\t\t\t\tconst variantCreated = (await queryPlanRows(scope, compileInsertReturning(contract, namespaceId, variant.table, [variantRow], void 0)).toArray())[0];\n\t\t\t\t\tif (!variantCreated) throw ormError(\"ORM.MUTATION_ROW_MISSING\", `MTI variant INSERT for model \"${modelName}\" into \"${variant.table}\" did not return a row`, { meta: {\n\t\t\t\t\t\toperation: \"create\",\n\t\t\t\t\t\tmodel: modelName,\n\t\t\t\t\t\ttable: variant.table,\n\t\t\t\t\t\tphase: \"mti-variant\"\n\t\t\t\t\t} });\n\t\t\t\t\tconst prefixedVariant = {};\n\t\t\t\t\tfor (const [col, val] of Object.entries(variantCreated)) {\n\t\t\t\t\t\tif (pkColumns.includes(col)) continue;\n\t\t\t\t\t\tprefixedVariant[`${variant.table}__${col}`] = val;\n\t\t\t\t\t}\n\t\t\t\t\treturn mapPolymorphicRow(contract, namespaceId, modelName, polyInfo, {\n\t\t\t\t\t\t...baseCreated,\n\t\t\t\t\t\t...prefixedVariant\n\t\t\t\t\t}, variant.modelName);\n\t\t\t\t}));\n\t\t\t}\n\t\t};\n\t\treturn new AsyncIterableResult(generator());\n\t}\n\t#mapCreateRows(data) {\n\t\tconst variantName = this.state.variantName;\n\t\tif (!variantName) return data.map((row) => mapModelDataToStorageRow(this.contract, this.namespaceId, this.modelName, row));\n\t\tconst polyInfo = resolvePolymorphismInfo(this.contract, this.namespaceId, this.modelName);\n\t\tif (!polyInfo) return data.map((row) => mapModelDataToStorageRow(this.contract, this.namespaceId, this.modelName, row));\n\t\tconst variant = polyInfo.variants.get(variantName);\n\t\tif (!variant) return data.map((row) => mapModelDataToStorageRow(this.contract, this.namespaceId, this.modelName, row));\n\t\tconst baseFieldToColumn = getFieldToColumnMap(this.contract, this.namespaceId, this.modelName);\n\t\tconst variantFieldToColumn = getFieldToColumnMap(this.contract, this.namespaceId, variant.modelName);\n\t\tconst mergedFieldToColumn = {\n\t\t\t...baseFieldToColumn,\n\t\t\t...variantFieldToColumn\n\t\t};\n\t\treturn data.map((row) => {\n\t\t\tconst mapped = {};\n\t\t\tfor (const [fieldName, value] of Object.entries(row)) {\n\t\t\t\tif (value === void 0) continue;\n\t\t\t\tconst columnName = mergedFieldToColumn[fieldName] ?? fieldName;\n\t\t\t\tmapped[columnName] = value;\n\t\t\t}\n\t\t\tmapped[polyInfo.discriminatorColumn] = variant.value;\n\t\t\treturn mapped;\n\t\t});\n\t}\n\t/**\n\t* Write terminal: insert many rows without materializing the\n\t* inserted rows, returning the number of rows the database reports\n\t* inserting.\n\t*\n\t* Prefer `createAll(...)` when you need the returned rows; prefer\n\t* this when you only need to know how many rows were inserted (the\n\t* compiled plan skips `RETURNING`).\n\t*\n\t* ```typescript\n\t* const inserted = await db.orm.User.createAndCount([\n\t* { email: 'a@example.com' },\n\t* { email: 'b@example.com' },\n\t* ]);\n\t* // inserted === 2\n\t*\n\t* // Let the database skip rows that collide with a unique\n\t* // constraint; the count is how many it actually inserted:\n\t* const added = await db.orm.User.createAndCount(seedUsers, {\n\t* onConflict: 'skip',\n\t* });\n\t* ```\n\t*\n\t* Not supported on MTI variants — use `createAll(...)` instead.\n\t*/\n\tasync createAndCount(data, optionsOrConfigure, configure) {\n\t\tassertLockCompatible(this.state, \"mutation\");\n\t\tconst { options, configureCallback } = splitCreateArguments(optionsOrConfigure, configure);\n\t\tconst conflictSkip = this.#resolveConflictSkip(options, \"createAndCount()\");\n\t\tif (data.length === 0) return 0;\n\t\tthis.#assertNotMtiVariant(\"createAndCount()\");\n\t\tconst annotationsMap = this.#collectAnnotationsFromMeta(configureCallback, \"write\", \"createAndCount\");\n\t\tconst rows = blindCast(data);\n\t\tconst mappedRows = this.#mapCreateRows(rows);\n\t\tapplyCreateDefaults(this.ctx, this.namespaceId, this.tableName, mappedRows);\n\t\tif (this.contract.capabilities?.[\"sql\"]?.[\"defaultInInsert\"] !== true) {\n\t\t\tconst plans = compileInsertCountSplit(this.contract, this.namespaceId, this.tableName, mappedRows, conflictSkip).map((plan) => mergeAnnotations(plan, annotationsMap));\n\t\t\tlet affectedRows = 0;\n\t\t\tfor (const plan of plans) {\n\t\t\t\tconst stats = await this.ctx.runtime.execute(plan);\n\t\t\t\taffectedRows += stats.affectedRows;\n\t\t\t}\n\t\t\treturn affectedRows;\n\t\t}\n\t\tconst compiled = mergeAnnotations(compileInsertCount(this.contract, this.namespaceId, this.tableName, mappedRows, conflictSkip), annotationsMap);\n\t\treturn (await this.ctx.runtime.execute(compiled)).affectedRows;\n\t}\n\tasync upsert(input, configure) {\n\t\tassertLockCompatible(this.state, \"mutation\");\n\t\tassertReturningCapability(this.contract, \"upsert()\");\n\t\tthis.#assertNotMtiVariant(\"upsert()\");\n\t\tconst annotationsMap = this.#collectAnnotationsFromMeta(configure, \"write\", \"upsert\");\n\t\tconst createValues = this.#mapCreateRows([blindCast(input.create)])[0] ?? {};\n\t\tapplyCreateDefaults(this.ctx, this.namespaceId, this.tableName, [createValues]);\n\t\tconst updateValues = mapModelDataToStorageRow(this.contract, this.namespaceId, this.modelName, input.update);\n\t\tconst hasUpdateValues = Object.keys(updateValues).length > 0;\n\t\tif (hasUpdateValues) applyUpdateDefaults(this.ctx, this.namespaceId, this.tableName, updateValues);\n\t\tconst conflictColumns = resolveUpsertConflictColumns(this.contract, this.namespaceId, this.modelName, blindCast(input.conflictOn));\n\t\tif (conflictColumns.length === 0) throw ormError(\"ORM.ARGUMENT_INVALID\", `upsert() for model \"${this.modelName}\" requires conflict columns`, { meta: {\n\t\t\tmethod: \"upsert\",\n\t\t\tmodel: this.modelName\n\t\t} });\n\t\tconst { selectedForQuery: selectedForUpsert, hiddenColumns } = this.#augmentMutationSelection();\n\t\tconst compiled = mergeAnnotations(compileUpsertReturning(this.contract, this.namespaceId, this.tableName, createValues, updateValues, conflictColumns, selectedForUpsert), annotationsMap);\n\t\tconst row = await executeMutationReturningSingleRow({\n\t\t\tcontext: this.ctx.context,\n\t\t\truntime: this.ctx.runtime,\n\t\t\tcompiled,\n\t\t\ttableName: this.tableName,\n\t\t\tmodelName: this.modelName,\n\t\t\tnamespaceId: this.namespaceId,\n\t\t\tvariantName: this.state.variantName,\n\t\t\tincludes: this.state.includes,\n\t\t\tselectedFields: this.state.selectedFields,\n\t\t\thiddenColumns,\n\t\t\tmapRow: (mapped) => blindCast(mapped),\n\t\t\toperation: \"upsert\",\n\t\t\tonMissingRowMessage: `upsert() for model \"${this.modelName}\" did not return a row`\n\t\t});\n\t\tif (row) return row;\n\t\tif (!hasUpdateValues) {\n\t\t\tconst conflictCriterion = this.#buildUpsertConflictCriterion(createValues, conflictColumns);\n\t\t\tconst existing = await this.#reloadMutationRowByCriterion(conflictCriterion, \"upsert conflict\");\n\t\t\tif (existing) return existing;\n\t\t}\n\t\tthrow ormError(\"ORM.MUTATION_ROW_MISSING\", `upsert() for model \"${this.modelName}\" did not return a row`, { meta: {\n\t\t\toperation: \"upsert\",\n\t\t\tmodel: this.modelName\n\t\t} });\n\t}\n\tasync update(data, configure) {\n\t\tassertLockCompatible(this.state, \"mutation\");\n\t\tassertReturningCapability(this.contract, \"update()\");\n\t\tconst annotationsMap = this.#collectAnnotationsFromMeta(configure, \"write\", \"update\");\n\t\tif (hasNestedMutationCallbacks(this.contract, this.namespaceId, this.modelName, blindCast(data))) {\n\t\t\tassertRelationUpdateIgnoresNothing(this.state, this.modelName);\n\t\t\tconst updatedRow = await executeNestedUpdateMutation({\n\t\t\t\tcontext: this.ctx.context,\n\t\t\t\truntime: this.ctx.runtime,\n\t\t\t\tnamespaceId: this.namespaceId,\n\t\t\t\tmodelName: this.modelName,\n\t\t\t\tfilters: this.state.filters,\n\t\t\t\tdata: blindCast(data)\n\t\t\t});\n\t\t\tif (!updatedRow) return null;\n\t\t\tconst identityCriterion = buildRowIdentityFilterFromRow(this.contract, this.namespaceId, this.modelName, updatedRow);\n\t\t\treturn this.#reloadMutationRowByIdentity(identityCriterion);\n\t\t}\n\t\treturn withMutationScope(this.ctx.runtime, async (scope) => {\n\t\t\tconst scoped = this.#withRuntime(scope);\n\t\t\tconst identityWhere = await scoped.#findFirstMatchingRowIdentityWhere();\n\t\t\tif (!identityWhere) return null;\n\t\t\treturn (await scoped.#clone({ filters: [identityWhere] }).#updateAllWithAnnotations(blindCast(data), annotationsMap))[0] ?? null;\n\t\t});\n\t}\n\tupdateAll(data, configure) {\n\t\tassertBulkWriteIgnoresNothing(this.state, this.modelName, \"updateAll\");\n\t\tassertLockCompatible(this.state, \"mutation\");\n\t\treturn this.#updateAllWithAnnotations(data, this.#collectAnnotationsFromMeta(configure, \"write\", \"updateAll\"));\n\t}\n\t#updateAllWithAnnotations(data, annotationsMap) {\n\t\tassertReturningCapability(this.contract, \"updateAll()\");\n\t\tconst mappedData = mapModelDataToStorageRow(this.contract, this.namespaceId, this.modelName, data);\n\t\tif (Object.keys(mappedData).length === 0) {\n\t\t\tconst generator = async function* () {};\n\t\t\treturn new AsyncIterableResult(generator());\n\t\t}\n\t\tapplyUpdateDefaults(this.ctx, this.namespaceId, this.tableName, mappedData);\n\t\tconst { selectedForQuery: selectedForUpdate, hiddenColumns } = this.#augmentMutationSelection();\n\t\tconst compiled = mergeAnnotations(compileUpdateReturning(this.contract, this.namespaceId, this.tableName, mappedData, this.state.filters, selectedForUpdate), annotationsMap);\n\t\treturn dispatchMutationRows({\n\t\t\tcontext: this.ctx.context,\n\t\t\truntime: this.ctx.runtime,\n\t\t\tcompiled,\n\t\t\ttableName: this.tableName,\n\t\t\tmodelName: this.modelName,\n\t\t\tnamespaceId: this.namespaceId,\n\t\t\tvariantName: this.state.variantName,\n\t\t\tincludes: this.state.includes,\n\t\t\tselectedFields: this.state.selectedFields,\n\t\t\thiddenColumns,\n\t\t\tmapRow: (mapped) => blindCast(mapped)\n\t\t});\n\t}\n\tasync updateAndCount(data, configure) {\n\t\tassertBulkWriteIgnoresNothing(this.state, this.modelName, \"updateAndCount\");\n\t\tassertLockCompatible(this.state, \"mutation\");\n\t\tconst mappedData = mapModelDataToStorageRow(this.contract, this.namespaceId, this.modelName, data);\n\t\tif (Object.keys(mappedData).length === 0) return 0;\n\t\tapplyUpdateDefaults(this.ctx, this.namespaceId, this.tableName, mappedData);\n\t\tconst annotationsMap = this.#collectAnnotationsFromMeta(configure, \"write\", \"updateAndCount\");\n\t\tconst compiled = mergeAnnotations(compileUpdateCount(this.contract, this.namespaceId, this.tableName, mappedData, this.state.filters, this.state.variantName, this.modelName), annotationsMap);\n\t\treturn (await this.ctx.runtime.execute(compiled)).affectedRows;\n\t}\n\tasync delete(configure) {\n\t\tassertLockCompatible(this.state, \"mutation\");\n\t\tassertReturningCapability(this.contract, \"delete()\");\n\t\tconst annotationsMap = this.#collectAnnotationsFromMeta(configure, \"write\", \"delete\");\n\t\treturn withMutationScope(this.ctx.runtime, async (scope) => {\n\t\t\tconst scoped = this.#withRuntime(scope);\n\t\t\tconst identityWhere = await scoped.#findFirstMatchingRowIdentityWhere();\n\t\t\tif (!identityWhere) return null;\n\t\t\treturn (await scoped.#clone({\n\t\t\t\tfilters: [identityWhere],\n\t\t\t\tlimit: void 0,\n\t\t\t\toffset: void 0\n\t\t\t}).#executeDeleteReturning(annotationsMap).toArray())[0] ?? null;\n\t\t});\n\t}\n\tdeleteAll(configure) {\n\t\tassertBulkWriteIgnoresNothing(this.state, this.modelName, \"deleteAll\");\n\t\tassertLockCompatible(this.state, \"mutation\");\n\t\treturn this.#deleteAllWithAnnotations(this.#collectAnnotationsFromMeta(configure, \"write\", \"deleteAll\"));\n\t}\n\t#deleteAllWithAnnotations(annotationsMap) {\n\t\tassertReturningCapability(this.contract, \"deleteAll()\");\n\t\treturn this.#executeDeleteReturning(annotationsMap);\n\t}\n\t#executeDeleteReturning(annotationsMap) {\n\t\tif (this.state.includes.length > 0) return this.#executeDeleteReturningWithIncludes(annotationsMap);\n\t\tconst { selectedForQuery: selectedForDelete, hiddenColumns } = this.#augmentMutationSelection();\n\t\tconst compiled = mergeAnnotations(compileDeleteReturning(this.contract, this.namespaceId, this.tableName, this.state.filters, selectedForDelete), annotationsMap);\n\t\treturn dispatchMutationRows({\n\t\t\tcontext: this.ctx.context,\n\t\t\truntime: this.ctx.runtime,\n\t\t\tcompiled,\n\t\t\ttableName: this.tableName,\n\t\t\tmodelName: this.modelName,\n\t\t\tnamespaceId: this.namespaceId,\n\t\t\tvariantName: this.state.variantName,\n\t\t\tincludes: this.state.includes,\n\t\t\tselectedFields: this.state.selectedFields,\n\t\t\thiddenColumns,\n\t\t\tmapRow: (mapped) => blindCast(mapped)\n\t\t});\n\t}\n\t/**\n\t* Delete read-back with includes.\n\t*\n\t* A parent-anchored single-query include read can't observe a row\n\t* that has already been deleted, so this reads the rows together with\n\t* their relations BEFORE issuing the DELETE. The snapshot is fully\n\t* drained into a plain array with `.toArray()` while the rows still\n\t* exist; only then does the DELETE run. The yielded `for..of` walks\n\t* that in-memory array, not a live cursor, so nothing reads from the\n\t* deleted rows after the fact. Snapshot read and delete share one\n\t* `withMutationScope` so they are atomic; the returned relations\n\t* reflect the row's state at delete time.\n\t*/\n\t#executeDeleteReturningWithIncludes(annotationsMap) {\n\t\tconst collection = this;\n\t\tconst generator = async function* () {\n\t\t\tconst snapshot = await withMutationScope(collection.ctx.runtime, async (scope) => {\n\t\t\t\tconst rows = await dispatchCollectionRows({\n\t\t\t\t\tcontext: collection.ctx.context,\n\t\t\t\t\truntime: scope,\n\t\t\t\t\tstate: collection.state,\n\t\t\t\t\ttableName: collection.tableName,\n\t\t\t\t\tmodelName: collection.modelName,\n\t\t\t\t\tnamespaceId: collection.namespaceId\n\t\t\t\t}).toArray();\n\t\t\t\tconst deletePlan = mergeAnnotations(compileDeleteCount(collection.contract, collection.namespaceId, collection.tableName, collection.state.filters, collection.state.variantName, collection.modelName), annotationsMap);\n\t\t\t\tawait scope.execute(deletePlan);\n\t\t\t\treturn rows;\n\t\t\t});\n\t\t\tfor (const row of snapshot) yield row;\n\t\t};\n\t\treturn new AsyncIterableResult(generator());\n\t}\n\tasync deleteAndCount(configure) {\n\t\tassertBulkWriteIgnoresNothing(this.state, this.modelName, \"deleteAndCount\");\n\t\tassertLockCompatible(this.state, \"mutation\");\n\t\tconst annotationsMap = this.#collectAnnotationsFromMeta(configure, \"write\", \"deleteAndCount\");\n\t\tconst compiled = mergeAnnotations(compileDeleteCount(this.contract, this.namespaceId, this.tableName, this.state.filters, this.state.variantName, this.modelName), annotationsMap);\n\t\treturn (await this.ctx.runtime.execute(compiled)).affectedRows;\n\t}\n\t#buildUpsertConflictCriterion(createValues, conflictColumns) {\n\t\tconst columnToField = getColumnToFieldMap(this.contract, this.namespaceId, this.modelName);\n\t\tconst criterion = {};\n\t\tfor (const columnName of conflictColumns) {\n\t\t\tif (!(columnName in createValues)) throw ormError(\"ORM.ARGUMENT_INVALID\", `upsert() for model \"${this.modelName}\" requires create value for conflict column \"${columnName}\"`, { meta: {\n\t\t\t\tmethod: \"upsert\",\n\t\t\t\tmodel: this.modelName,\n\t\t\t\tcolumn: columnName\n\t\t\t} });\n\t\t\tconst fieldName = columnToField[columnName] ?? columnName;\n\t\t\tcriterion[fieldName] = createValues[columnName];\n\t\t}\n\t\treturn criterion;\n\t}\n\t/**\n\t* Shape the projection for a mutation's `RETURNING` clause.\n\t*\n\t* Without includes, the mutation returns the caller's projection\n\t* directly. With includes, it returns only the row identity columns\n\t* (PK / unique): those rows are reloaded through the read path\n\t* (`reloadMutationRowsByIdentities`), which re-selects the caller's\n\t* projection together with the relations, so the `RETURNING` clause\n\t* need only carry enough to key that read-back.\n\t*/\n\t#augmentMutationSelection() {\n\t\tif (this.state.includes.length > 0) {\n\t\t\tconst identityColumns = resolveRowIdentityColumns(this.contract, this.namespaceId, this.tableName);\n\t\t\tif (identityColumns.length === 0) throw ormError(\"ORM.ROW_IDENTITY_MISSING\", `Cannot load includes for the mutation result on model \"${this.modelName}\": table \"${this.tableName}\" has no primary key or unique constraint to key the include read-back on.`, { meta: {\n\t\t\t\tmodel: this.modelName,\n\t\t\t\ttable: this.tableName\n\t\t\t} });\n\t\t\treturn {\n\t\t\t\tselectedForQuery: identityColumns,\n\t\t\t\thiddenColumns: []\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\tselectedForQuery: this.state.selectedFields,\n\t\t\thiddenColumns: []\n\t\t};\n\t}\n\tasync #findFirstMatchingRowIdentityWhere() {\n\t\tconst identityColumns = resolveRowIdentityColumns(this.contract, this.namespaceId, this.tableName);\n\t\tif (identityColumns.length === 0) throw ormError(\"ORM.ROW_IDENTITY_MISSING\", `update()/delete() on model \"${this.modelName}\" requires the table to have a primary key or unique constraint`, { meta: {\n\t\t\tmodel: this.modelName,\n\t\t\ttable: this.tableName\n\t\t} });\n\t\tcheckLimitOffset(\"limit\", this.state.limit);\n\t\tif (this.state.limit === 0) return null;\n\t\tconst firstRow = await this.#clone({\n\t\t\tselectedFields: [...identityColumns],\n\t\t\tincludes: []\n\t\t}).first();\n\t\tif (!firstRow) return null;\n\t\tconst columnToField = getColumnToFieldMap(this.contract, this.namespaceId, this.modelName);\n\t\tconst criterion = {};\n\t\tfor (const column of identityColumns) {\n\t\t\tconst fieldName = columnToField[column] ?? column;\n\t\t\tconst value = blindCast(firstRow)[fieldName];\n\t\t\tif (value === void 0) throw new InternalError(`Missing identity field \"${fieldName}\" while resolving single-row scope for model \"${this.modelName}\"`);\n\t\t\tcriterion[fieldName] = value;\n\t\t}\n\t\treturn shorthandToWhereExpr(this.ctx.context, this.namespaceId, this.modelName, blindCast(criterion)) ?? null;\n\t}\n\tasync #reloadMutationRowByIdentity(criterion) {\n\t\treturn this.#reloadMutationRowByCriterion(criterion, \"row identity\");\n\t}\n\tasync #reloadMutationRowByCriterion(criterion, criterionLabel) {\n\t\tconst whereExpr = shorthandToWhereExpr(this.ctx.context, this.namespaceId, this.modelName, blindCast(criterion));\n\t\tif (!whereExpr) throw new InternalError(`Failed to build ${criterionLabel} filter for mutation result on model \"${this.modelName}\"`);\n\t\tconst resultState = {\n\t\t\t...emptyState(),\n\t\t\tfilters: [whereExpr],\n\t\t\tincludes: this.state.includes,\n\t\t\tselectedFields: this.state.selectedFields,\n\t\t\tlimit: 1\n\t\t};\n\t\treturn (await dispatchCollectionRows({\n\t\t\tcontext: this.ctx.context,\n\t\t\truntime: this.ctx.runtime,\n\t\t\tstate: resultState,\n\t\t\ttableName: this.tableName,\n\t\t\tmodelName: this.modelName,\n\t\t\tnamespaceId: this.namespaceId\n\t\t}))[0] ?? null;\n\t}\n\t#assertIncludeRefinementMode(action) {\n\t\tif (this.includeRefinementMode) return;\n\t\tthrow ormError(\"ORM.INCLUDE_INVALID\", `${action} is only available inside include() refinement callbacks`, { meta: { action } });\n\t}\n\t#lock(strength, options) {\n\t\tif (this.includeRefinementMode) throw lockIncompatible(\"includeRefinement\", `${strength}() cannot be called inside an include() refinement callback`);\n\t\tassertLockCapability(this.contract, lockStrengthCapabilities[strength], strength);\n\t\tassertLockCapability(this.contract, lockOptionCapabilities.of, strength);\n\t\tconst waitPolicy = lockWaitPolicyOf(strength, options);\n\t\tif (waitPolicy !== void 0) assertLockCapability(this.contract, lockOptionCapabilities[waitPolicy], strength);\n\t\tconst clause = LockingClause.of(strength, {\n\t\t\tof: [this.tableName],\n\t\t\t...ifDefined(\"waitPolicy\", waitPolicy)\n\t\t});\n\t\treturn this.#clone({ locking: [...this.state.locking ?? [], clause] });\n\t}\n\t#clone(overrides) {\n\t\treturn this.#createSelf({\n\t\t\t...this.state,\n\t\t\t...overrides\n\t\t});\n\t}\n\t#cloneSelf(overrides) {\n\t\treturn blindCast(this.#createSelf({\n\t\t\t...this.state,\n\t\t\t...overrides\n\t\t}));\n\t}\n\t#withRuntime(runtime) {\n\t\treturn blindCast(new (blindCast(this.constructor))({\n\t\t\t...this.ctx,\n\t\t\truntime\n\t\t}, this.modelName, {\n\t\t\ttableName: this.tableName,\n\t\t\tnamespaceId: this.namespaceId,\n\t\t\tstate: this.state,\n\t\t\tregistry: this.registry,\n\t\t\tincludeRefinementMode: this.includeRefinementMode\n\t\t}));\n\t}\n\t#cloneWithRow(overrides) {\n\t\treturn this.#createSelf({\n\t\t\t...this.state,\n\t\t\t...overrides\n\t\t});\n\t}\n\t#createSelf(state) {\n\t\treturn blindCast(new (blindCast(this.constructor))(this.ctx, this.modelName, {\n\t\t\ttableName: this.tableName,\n\t\t\tnamespaceId: this.namespaceId,\n\t\t\tstate,\n\t\t\tregistry: this.registry,\n\t\t\tincludeRefinementMode: this.includeRefinementMode\n\t\t}));\n\t}\n\t#createCollection(modelName, options) {\n\t\treturn blindCast(new ((this.registry.get(modelName)) ?? (blindCast(CollectionBase)))(this.ctx, modelName, {\n\t\t\ttableName: options.tableName,\n\t\t\tnamespaceId: options.namespaceId,\n\t\t\tstate: options.state,\n\t\t\tregistry: options.registry ?? this.registry,\n\t\t\tincludeRefinementMode: options.includeRefinementMode ?? this.includeRefinementMode\n\t\t}));\n\t}\n\t#dispatch() {\n\t\treturn dispatchCollectionRows({\n\t\t\tcontext: this.ctx.context,\n\t\t\truntime: this.ctx.runtime,\n\t\t\tstate: this.state,\n\t\t\ttableName: this.tableName,\n\t\t\tmodelName: this.modelName,\n\t\t\tnamespaceId: this.namespaceId\n\t\t});\n\t}\n\t/**\n\t* Invokes the user-supplied configurator (if any) against a freshly\n\t* constructed read meta builder, and returns a clone whose\n\t* `state.annotations` carries the recorded map. Used by read\n\t* terminals that flow annotations through state (`all`, `first`).\n\t*\n\t* Returns the receiver unchanged when no configurator was supplied\n\t* or when the configurator did not call `meta.annotate(...)`. The\n\t* meta builder's `annotate` method enforces applicability at the\n\t* type level and at runtime, so terminal code does not need to\n\t* re-validate.\n\t*/\n\t#withAnnotationsFromMeta(configure, terminalName) {\n\t\tif (configure === void 0) return this;\n\t\tconst meta = createMetaBuilder(\"read\", terminalName);\n\t\tconfigure(meta);\n\t\tif (meta.annotations.size === 0) return this;\n\t\tconst next = new Map(this.state.annotations);\n\t\tfor (const [namespace, value] of meta.annotations) next.set(namespace, value);\n\t\treturn blindCast(this.#clone({ annotations: next }));\n\t}\n\t/**\n\t* Invokes the user-supplied configurator (if any) against a freshly\n\t* constructed meta builder of the given operation kind, and returns\n\t* the recorded annotation map (or `undefined` when empty). Used by\n\t* terminals where annotations don't flow through `state` — the\n\t* compiled plan is post-wrapped via `mergeAnnotations` instead.\n\t* Read terminals `all` and `first` populate `state.annotations`\n\t* via `#withAnnotationsFromMeta` instead; `aggregate` uses this\n\t* post-wrap path because `compileAggregate` does not forward `state.annotations` into the plan.\n\t* The meta builder's `annotate` method enforces applicability at the\n\t* type level and at runtime.\n\t*/\n\t#collectAnnotationsFromMeta(configure, kind, terminalName) {\n\t\tif (configure === void 0) return;\n\t\tconst meta = createMetaBuilder(kind, terminalName);\n\t\tconfigure(meta);\n\t\treturn meta.annotations.size === 0 ? void 0 : meta.annotations;\n\t}\n};\nconst collectionInstanceMemberNames = [\n\t\"ctx\",\n\t\"contract\",\n\t\"modelName\",\n\t\"tableName\",\n\t\"namespaceId\",\n\t\"state\",\n\t\"registry\",\n\t\"includeRefinementMode\"\n];\n/**\n* Every member name the collection surface owns: the prototype's methods plus\n* the declared instance fields. A contributed aggregate operation may not\n* take one of these names — reducers install into the same flat namespace —\n* so ORM composition rejects any operation this set contains.\n*/\nfunction reservedCollectionMemberNames() {\n\treturn /* @__PURE__ */ new Set([...Object.getOwnPropertyNames(CollectionBase.prototype), ...collectionInstanceMemberNames]);\n}\nconst Collection = blindCast(CollectionBase);\n//#endregion\n//#region src/orm.ts\n/**\n* Reject a contributed aggregate operation whose name a collection member\n* already owns. Aggregate operations surface as reducer methods on the\n* collection, in one flat namespace with the builder members, so a same-named\n* operation would shadow the member it collides with — a client-surface\n* concern, enforced here where that surface is assembled.\n*/\nfunction assertAggregateOperationsNotReserved(registry) {\n\tconst reserved = reservedCollectionMemberNames();\n\tfor (const operation of aggregateOperationNames(registry)) {\n\t\tif (!reserved.has(operation)) continue;\n\t\tthrow ormError(\"ORM.AGGREGATE_OPERATION_RESERVED\", `Aggregate operation '${operation}' is reserved: the name is a collection builder member.`, {\n\t\t\twhy: \"Aggregate operations surface as reducer methods on the collection, in one namespace with the query-builder members; a same-named operation would shadow the member it collides with.\",\n\t\t\tfix: \"Rename the contributed aggregate operation.\",\n\t\t\tmeta: { operation }\n\t\t});\n\t}\n}\nfunction orm(options) {\n\tconst { runtime, collections, context } = options;\n\tassertAggregateOperationsNotReserved(context.aggregateDescriptors);\n\tconst contract = context.contract;\n\tconst ctx = {\n\t\truntime,\n\t\tcontext\n\t};\n\tconst collectionRegistry = createCollectionRegistry(contract, collections);\n\tfunction buildCollection(namespaceId, modelName, tableName) {\n\t\treturn new (blindCast(collectionRegistry.get(modelName) ?? CollectionBase))(ctx, modelName, {\n\t\t\tregistry: collectionRegistry,\n\t\t\tnamespaceId,\n\t\t\t...tableName !== void 0 ? { tableName } : {}\n\t\t});\n\t}\n\tconst namespaceFacets = /* @__PURE__ */ new Map();\n\tfunction namespaceFacet(namespaceId) {\n\t\tconst cached = namespaceFacets.get(namespaceId);\n\t\tif (cached) return cached;\n\t\tconst facetModelNames = new Set(domainModelNamesInNamespace(contract, namespaceId));\n\t\tconst facetCache = /* @__PURE__ */ new Map();\n\t\tconst facet = new Proxy({}, { get(_facetTarget, modelProp) {\n\t\t\tif (typeof modelProp !== \"string\") return;\n\t\t\tif (!facetModelNames.has(modelProp)) return;\n\t\t\tconst hit = facetCache.get(modelProp);\n\t\t\tif (hit) return hit;\n\t\t\tconst collection = buildCollection(namespaceId, modelProp, domainModelTableInNamespace(contract, namespaceId, modelProp));\n\t\t\tfacetCache.set(modelProp, collection);\n\t\t\treturn collection;\n\t\t} });\n\t\tnamespaceFacets.set(namespaceId, facet);\n\t\treturn facet;\n\t}\n\treturn new Proxy({}, { get(_target, prop) {\n\t\tif (typeof prop !== \"string\") return;\n\t\tif (Object.hasOwn(contract.domain.namespaces, prop)) return namespaceFacet(prop);\n\t\treturn prop === \"fragment\" ? defineDeclaredFieldsFragment : void 0;\n\t} });\n}\nfunction createCollectionRegistry(contract, collections) {\n\tconst registry = /* @__PURE__ */ new Map();\n\tif (!collections) return registry;\n\tconst models = domainModelsAtDefaultNamespace(contract.domain);\n\tfor (const [key, collectionClass] of Object.entries(collections)) {\n\t\tif (!collectionClass) continue;\n\t\tif (!isCollectionClass(collectionClass)) throw ormError(\"ORM.ARGUMENT_INVALID\", `Custom collection '${key}' must be a Collection class (constructor), not an instance`, { meta: {\n\t\t\tmethod: \"orm\",\n\t\t\targument: \"collections\",\n\t\t\tkey\n\t\t} });\n\t\tif (!Object.hasOwn(models, key)) throw ormError(\"ORM.ARGUMENT_INVALID\", `No model found for custom collection '${key}'. Available models: ${Object.keys(models).join(\", \")}`, { meta: {\n\t\t\tmethod: \"orm\",\n\t\t\targument: \"collections\",\n\t\t\tkey\n\t\t} });\n\t\tregistry.set(key, collectionClass);\n\t}\n\treturn registry;\n}\nfunction isCollectionClass(value) {\n\tif (typeof value !== \"function\") return false;\n\tconst candidate = value;\n\tif (!candidate.prototype || typeof candidate.prototype !== \"object\") return false;\n\treturn candidate.prototype instanceof CollectionBase;\n}\n//#endregion\n//#region src/prepared-row-query.ts\nasync function prepareQuery(runtime, declaration, callback) {\n\tlet description;\n\tconst statement = await runtime.prepare(declaration, (params) => {\n\t\tconst authored = callback(params);\n\t\tif (\"plan\" in authored) {\n\t\t\tdescription = authored;\n\t\t\treturn authored.plan;\n\t\t}\n\t\treturn authored;\n\t});\n\treturn blindCast(description ? createPreparedRowQuery(description, statement) : statement);\n}\nfunction createPreparedRowQuery(description, statement) {\n\treturn Object.freeze({ query(target, params, options) {\n\t\treturn description.consume(statement.query(target, params, options));\n\t} });\n}\n//#endregion\nexport { Collection, GroupedCollection, all, and, createModelAccessor, createPreparedRowQuery, emptyState, not, or, orderByField, orm, prepareQuery };\n\n//# sourceMappingURL=index.mjs.map"],"mappings":";;;;;;;;;;;;;;;AAaA,MAAM,2CAA2C,IAAI,QAAQ;;;;;;;AAO7D,SAAS,wBAAwB,UAAU;CAC1C,MAAM,SAAS,yBAAyB,IAAI,QAAQ;CACpD,IAAI,WAAW,KAAK,GAAG,OAAO;CAC9B,MAAM,QAAQ,CAAC;CACf,MAAM,uBAAuB,IAAI,IAAI;CACrC,KAAK,MAAM,EAAE,eAAe,SAAS,OAAO,GAAG;EAC9C,IAAI,KAAK,IAAI,SAAS,GAAG;EACzB,KAAK,IAAI,SAAS;EAClB,MAAM,KAAK,SAAS;CACrB;CACA,yBAAyB,IAAI,UAAU,KAAK;CAC5C,OAAO;AACR;AAGA,SAAS,SAAS,MAAM,SAAS,SAAS;CACzC,OAAO,gBAAgB,MAAM,SAAS,OAAO;AAC9C;AAGA,SAAS,wBAAwB,UAAU,aA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