import { A as RuntimeTelemetryEvent, B as PreparedStatement, C as SqlRuntimeTargetDescriptor, D as createSqlExecutionStack, E as createExecutionContext, F as DeclaredCodecId, G as deriveParamMetadata, I as DeclaredNullable, K as encodeParamsWithMetadata, L as ParamSpec, M as VerifyMarkerOption, N as BindSiteParams, O as MarkerReader, P as Declaration, R as ParamsFromDeclaration, S as SqlRuntimeExtensionInstance, T as TypeHelperRegistry, U as SqlMiddleware, W as SqlMiddlewareContext, _ as SqlExecutionStackWithDriver, a as RuntimeConnection, b as SqlRuntimeDriverInstance, c as RuntimeTransaction, d as withTransaction, f as ExecutionContext, g as SqlExecutionStack, h as RuntimeParameterizedCodecDescriptor, i as Runtime, j as TelemetryOutcome, k as RuntimeFamilyAdapter, l as SqlRuntimeBase, m as RuntimeMutationDefaultGenerator, n as PreparedStatementInternals, p as GeneratorStability, r as ConnectionProvider, s as RuntimeQueryable, t as PreparedStatementImpl, u as TransactionContext, v as SqlRuntimeAdapterDescriptor, w as SqlStaticContributions, x as SqlRuntimeExtensionDescriptor, y as SqlRuntimeAdapterInstance, z as PrepareCallback } from "./prepared-statement-BuDdY11z.mjs"; import { AfterExecuteResult, RuntimeLog as Log } from "@prisma-next/framework-components/runtime"; import { Adapter, AnyQueryAst, ContractCodecRegistry, LoweredStatement, MarkerReadResult } from "@prisma-next/sql-relational-core/ast"; import { Contract } from "@prisma-next/contract/types"; import { SqlStorage } from "@prisma-next/sql-contract/types"; import { CodecDescriptorRegistry } from "@prisma-next/sql-relational-core/query-lane-context"; import { SqlExecutionPlan, SqlQueryPlan } from "@prisma-next/sql-relational-core/plan"; //#region src/codecs/ast-codec-registry.d.ts /** * Build a contract-free {@link ContractCodecRegistry} that resolves codecs * purely from AST-supplied {@link import('@prisma-next/framework-components/codec').CodecRef}s * against a target's descriptor registry. * * Dispatch is driven entirely by `CodecRef`s embedded in AST nodes; no * contract walk is needed. `forColumn` always returns `undefined` — this * registry carries no column-to-codec mappings. */ declare function createAstCodecRegistry(descriptors: CodecDescriptorRegistry): ContractCodecRegistry; //#endregion //#region src/codecs/validation.d.ts declare function extractCodecIds(contract: Contract): Set; declare function validateContractCodecMappings(registry: CodecDescriptorRegistry, contract: Contract): void; declare function validateCodecRegistryCompleteness(registry: CodecDescriptorRegistry, contract: Contract): void; //#endregion //#region src/lower-sql-plan.d.ts /** * Lowers a SQL query plan to an executable Plan by calling the adapter's lower method. * * Ad-hoc lowerings produce only `{kind: 'literal'}` slots; this helper * unwraps them into the bare-value array `SqlExecutionPlan` exposes. * Encountering a `{kind: 'bind'}` slot here means the caller passed an * AST containing `PreparedParamRef` to the ad-hoc execute path — that's a * caller error, surfaced as `RUNTIME.PREPARE_BIND_ON_ADHOC`. */ declare function lowerSqlPlan(adapter: Adapter, LoweredStatement>, contract: Contract, queryPlan: SqlQueryPlan): SqlExecutionPlan; //#endregion //#region src/middleware/budgets.d.ts interface BudgetsOptions { readonly maxRows?: number; readonly defaultTableRows?: number; readonly tableRows?: Record; readonly maxLatencyMs?: number; readonly severities?: { readonly rowCount?: 'warn' | 'error'; readonly latency?: 'warn' | 'error'; }; } declare function budgets(options?: BudgetsOptions): SqlMiddleware; //#endregion //#region src/middleware/lints.d.ts interface LintsOptions { readonly severities?: { readonly selectStar?: 'warn' | 'error'; readonly noLimit?: 'warn' | 'error'; readonly deleteWithoutWhere?: 'warn' | 'error'; readonly updateWithoutWhere?: 'warn' | 'error'; readonly readOnlyMutation?: 'warn' | 'error'; }; readonly fallbackWhenAstMissing?: 'raw' | 'skip'; } /** * AST-first lint middleware for SQL plans. When `plan.ast` is a SQL QueryAst, inspects * the AST structurally. When `plan.ast` is missing, falls back to raw heuristic * guardrails or skips linting depending on `fallbackWhenAstMissing`. * * Rules (AST-based): * - DELETE without WHERE: blocks execution (configurable severity, default error) * - UPDATE without WHERE: blocks execution (configurable severity, default error) * - Unbounded SELECT: warn/error (severity from noLimit) * - SELECT * intent: warn/error (severity from selectStar) * * Fallback: When ast is missing, `fallbackWhenAstMissing: 'raw'` uses heuristic * SQL parsing; `'skip'` skips all lints. Default is `'raw'`. */ declare function lints(options?: LintsOptions): SqlMiddleware; //#endregion export { type AfterExecuteResult, type BindSiteParams, type BudgetsOptions, type ConnectionProvider, type Declaration, type DeclaredCodecId, type DeclaredNullable, type ExecutionContext, type GeneratorStability, type LintsOptions, type Log, type MarkerReadResult, type MarkerReader, type ParamSpec, type ParamsFromDeclaration, type PrepareCallback, type PreparedStatement, PreparedStatementImpl, type PreparedStatementInternals, type Runtime, type RuntimeConnection, type RuntimeFamilyAdapter, type RuntimeMutationDefaultGenerator, type RuntimeParameterizedCodecDescriptor, type RuntimeQueryable, type RuntimeTelemetryEvent, type RuntimeTransaction, type SqlExecutionStack, type SqlExecutionStackWithDriver, type SqlMiddleware, type SqlMiddlewareContext, type SqlRuntimeAdapterDescriptor, type SqlRuntimeAdapterInstance, SqlRuntimeBase, type SqlRuntimeDriverInstance, type SqlRuntimeExtensionDescriptor, type SqlRuntimeExtensionInstance, type SqlRuntimeTargetDescriptor, type SqlStaticContributions, type TelemetryOutcome, type TransactionContext, type TypeHelperRegistry, type VerifyMarkerOption, budgets, createAstCodecRegistry, createExecutionContext, createSqlExecutionStack, deriveParamMetadata, encodeParamsWithMetadata, extractCodecIds, lints, lowerSqlPlan, validateCodecRegistryCompleteness, validateContractCodecMappings, withTransaction }; //# sourceMappingURL=index.d.mts.map