@prisma-next/sql-relational-core 0.5.0-dev.3 → 0.5.0-dev.31

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.
Files changed (62) hide show
  1. package/README.md +67 -1
  2. package/dist/codec-types-DJEaWT36.d.mts +313 -0
  3. package/dist/codec-types-DJEaWT36.d.mts.map +1 -0
  4. package/dist/{errors-ChY_dHam.d.mts → errors-BRt5yHo9.d.mts} +2 -2
  5. package/dist/errors-BRt5yHo9.d.mts.map +1 -0
  6. package/dist/{errors-D3xmG4h-.mjs → errors-D6kqqjHM.mjs} +1 -1
  7. package/dist/{errors-D3xmG4h-.mjs.map → errors-D6kqqjHM.mjs.map} +1 -1
  8. package/dist/exports/ast.d.mts +27 -12
  9. package/dist/exports/ast.d.mts.map +1 -1
  10. package/dist/exports/ast.mjs +63 -1089
  11. package/dist/exports/ast.mjs.map +1 -1
  12. package/dist/exports/errors.d.mts +4 -4
  13. package/dist/exports/errors.mjs +1 -1
  14. package/dist/exports/expression.d.mts +79 -0
  15. package/dist/exports/expression.d.mts.map +1 -0
  16. package/dist/exports/expression.mjs +41 -0
  17. package/dist/exports/expression.mjs.map +1 -0
  18. package/dist/exports/plan.d.mts +3 -2
  19. package/dist/exports/plan.mjs +1 -17
  20. package/dist/exports/query-lane-context.d.mts +3 -3
  21. package/dist/exports/types.d.mts +5 -4
  22. package/dist/index.d.mts +11 -9
  23. package/dist/index.mjs +6 -4
  24. package/dist/plan-C7SiEWkN.d.mts +25 -0
  25. package/dist/plan-C7SiEWkN.d.mts.map +1 -0
  26. package/dist/{query-lane-context-UlR8vOkd.d.mts → query-lane-context-BF-wuc0r.d.mts} +53 -3
  27. package/dist/query-lane-context-BF-wuc0r.d.mts.map +1 -0
  28. package/dist/sql-execution-plan-Dgx7BGin.d.mts +33 -0
  29. package/dist/sql-execution-plan-Dgx7BGin.d.mts.map +1 -0
  30. package/dist/{types-C3Hg-CVz.d.mts → types-B4dL4lc3.d.mts} +17 -22
  31. package/dist/types-B4dL4lc3.d.mts.map +1 -0
  32. package/dist/types-BUlUvdIU.d.mts +24 -0
  33. package/dist/types-BUlUvdIU.d.mts.map +1 -0
  34. package/dist/{types-k9pir8XY.d.mts → types-BWOCTYd8.d.mts} +12 -19
  35. package/dist/types-BWOCTYd8.d.mts.map +1 -0
  36. package/dist/types-DUL-3vy6.mjs +1064 -0
  37. package/dist/types-DUL-3vy6.mjs.map +1 -0
  38. package/package.json +11 -10
  39. package/src/ast/adapter-types.ts +8 -0
  40. package/src/ast/codec-types.ts +251 -45
  41. package/src/ast/sql-codecs.ts +20 -3
  42. package/src/ast/types.ts +142 -172
  43. package/src/ast/util.ts +23 -0
  44. package/src/exports/expression.ts +1 -0
  45. package/src/exports/plan.ts +1 -0
  46. package/src/exports/types.ts +1 -0
  47. package/src/expression.ts +117 -0
  48. package/src/index.ts +1 -0
  49. package/src/plan.ts +11 -30
  50. package/src/query-lane-context.ts +52 -1
  51. package/src/runtime-scope.ts +20 -0
  52. package/src/sql-execution-plan.ts +28 -0
  53. package/src/types.ts +9 -22
  54. package/dist/codec-types-DcEITed4.d.mts +0 -144
  55. package/dist/codec-types-DcEITed4.d.mts.map +0 -1
  56. package/dist/errors-ChY_dHam.d.mts.map +0 -1
  57. package/dist/exports/plan.mjs.map +0 -1
  58. package/dist/plan-Cs65hb-E.d.mts +0 -28
  59. package/dist/plan-Cs65hb-E.d.mts.map +0 -1
  60. package/dist/query-lane-context-UlR8vOkd.d.mts.map +0 -1
  61. package/dist/types-C3Hg-CVz.d.mts.map +0 -1
  62. package/dist/types-k9pir8XY.d.mts.map +0 -1
package/README.md CHANGED
@@ -89,7 +89,73 @@ flowchart TD
89
89
 
90
90
  ### Plan Helpers (`plan.ts`)
91
91
  - Defines `SqlQueryPlan<Row>` interface for SQL query plans produced by lanes before lowering
92
- - Provides `augmentDescriptorWithColumnMeta(descriptors, columnMeta)` helper to update ParamDescriptor with `codecId` and `nativeType` from column metadata
92
+ - Per [ADR 205](../../../../docs/architecture%20docs/adrs/ADR%20205%20-%20Execution%20metadata%20lives%20on%20AST.md), codec IDs travel on `ProjectionItem.codecId` (output) and `ParamRef.codecId` (parameters) on the AST itself, not on plan-level descriptor lists
93
+
94
+ ### Codec Factory (`ast/codec-types.ts` via `exports/ast.ts`)
95
+
96
+ - `codec({...})` is the SQL-side factory for constructing `Codec` values. It accepts `encode` and `decode` author functions in **either sync or async form** with no annotations; the constructed codec exposes Promise-returning query-time methods regardless of which form was used. Both `encode` and `decode` are required so `TInput` and `TWire` are always covered by an explicit author function — the factory installs no identity fallback.
97
+ - Build-time methods (`encodeJson`, `decodeJson`, `renderOutputType?`) are synchronous and pass through unchanged.
98
+ - This is the only public entry point for SQL codecs. There is no separate `codecSync` / `codecAsync` factory and no per-codec async marker on the resulting value.
99
+
100
+ ```ts
101
+ // Sync authoring:
102
+ const textCodec = codec({
103
+ typeId: 'pg/text@1',
104
+ targetTypes: ['text'],
105
+ encode: (v: string) => v,
106
+ decode: (w: string) => w,
107
+ encodeJson: (v: string) => v,
108
+ decodeJson: (j: string) => j as string,
109
+ });
110
+
111
+ // Async authoring (e.g. KMS-backed encryption): same factory, same shape.
112
+ const secretCodec = codec({
113
+ typeId: 'pg/secret@1',
114
+ targetTypes: ['text'],
115
+ encode: async (v: string) => encrypt(v, await getKey()),
116
+ decode: async (w: string) => decrypt(w, await getKey()),
117
+ encodeJson: (v: string) => v,
118
+ decodeJson: (j: string) => j as string,
119
+ });
120
+ ```
121
+
122
+ #### Codec call context (`ctx`)
123
+
124
+ Codecs receive a second `ctx` options argument; you may ignore it. The runtime allocates one `SqlCodecCallContext` per `runtime.execute(plan, { signal })` call and threads the same reference to every codec dispatch site as a non-optional argument — when no `signal` is supplied the runtime still threads an empty `{}`, never `undefined`. The internal `Codec` interface declares the parameter as required (`encode(value, ctx: SqlCodecCallContext)` / `decode(wire, ctx: SqlCodecCallContext)`); single-arg author functions `(value) => …` continue to compile via TypeScript's bivariance for trailing parameters, so codec ergonomics are unchanged.
125
+
126
+ - **`ctx.signal`** — the same `AbortSignal` reference at every codec call in one execute. Forward it to network SDKs so aborted queries stop talking to the underlying service.
127
+ - **`ctx.column`** (decode-side only) — `{ table, name }` for cells the runtime can resolve to a single column ref; `undefined` for aggregate aliases, computed projections, and other unresolvable cells. Encode-side `ctx.column` is always `undefined` (encode-time column enrichment is the middleware's domain).
128
+
129
+ ```ts
130
+ // Forward ctx.signal to a network call so aborted queries stop the SDK.
131
+ const kmsSecretCodec = codec({
132
+ typeId: 'pg/kms-secret@1',
133
+ targetTypes: ['text'],
134
+ encode: async (v: string, ctx) =>
135
+ kms.encrypt({ plaintext: v }, { signal: ctx?.signal }),
136
+ decode: async (w: string, ctx) =>
137
+ kms.decrypt({ ciphertext: w }, { signal: ctx?.signal }),
138
+ encodeJson: (v: string) => v,
139
+ decodeJson: (j: string) => j as string,
140
+ });
141
+
142
+ // Use ctx.column on decode to construct an envelope value carrying (table, name).
143
+ const envelopeCodec = codec({
144
+ typeId: 'pg/envelope@1',
145
+ targetTypes: ['text'],
146
+ encode: async (v: string) => v,
147
+ decode: async (w: string, ctx) => ({
148
+ value: w,
149
+ column: ctx?.column,
150
+ }),
151
+ encodeJson: (v: string) => v,
152
+ decodeJson: (j: string) => j as string,
153
+ });
154
+ ```
155
+
156
+ Codec bodies that ignore `ctx.signal` complete in the background (cooperative cancellation); aborts still surface to the caller as `RUNTIME.ABORTED` with `details.phase ∈ { 'encode', 'decode', 'stream' }`.
157
+
158
+ See [ADR 204 — Single-Path Async Codec Runtime](../../../../docs/architecture%20docs/adrs/ADR%20204%20-%20Single-Path%20Async%20Codec%20Runtime.md) and [ADR 207 — Codec call context: per-query `AbortSignal` and column metadata](../../../../docs/architecture%20docs/adrs/ADR%20207%20-%20Codec%20call%20context%20per-query%20AbortSignal%20and%20column%20metadata.md).
93
159
 
94
160
  ### AST Surface (`ast/*` via `exports/ast.ts`)
95
161
  - Query roots: `SelectAst`, `InsertAst`, `UpdateAst`, `DeleteAst`
@@ -0,0 +1,313 @@
1
+ import { Type } from "arktype";
2
+ import { JsonValue } from "@prisma-next/contract/types";
3
+ import { Codec, CodecCallContext, CodecCallContext as CodecCallContext$1, CodecInstanceContext, CodecTrait, CodecTrait as CodecTrait$1 } from "@prisma-next/framework-components/codec";
4
+ import { O } from "ts-toolbelt";
5
+
6
+ //#region src/ast/codec-types.d.ts
7
+
8
+ /**
9
+ * SQL-family addressing of a single column. The decode site populates a
10
+ * `SqlColumnRef` whenever it can resolve the cell to a single underlying
11
+ * `(table, column)` (the typical case for projected columns from a
12
+ * single-table source); cells the runtime cannot resolve (aggregate
13
+ * aliases, include aggregate fields, computed projections without a
14
+ * simple ref) get `column = undefined`.
15
+ *
16
+ * The shape is a structural projection of the runtime's `ColumnRef` so
17
+ * the SQL decode site can reuse the resolution it already performs for
18
+ * `RUNTIME.DECODE_FAILED` envelope construction without allocating
19
+ * twice per cell.
20
+ */
21
+ interface SqlColumnRef {
22
+ readonly table: string;
23
+ readonly name: string;
24
+ }
25
+ /**
26
+ * SQL-family per-call context. Extends the framework {@link CodecCallContext}
27
+ * (which carries `signal` only) with `column?: SqlColumnRef`, populated
28
+ * on **decode** call sites that can resolve a single underlying column
29
+ * ref. Encode call sites currently leave `column` undefined (encode-time
30
+ * column context is the middleware's domain).
31
+ *
32
+ * SQL codec authors writing a `(value, ctx)` author function for the SQL
33
+ * `codec()` factory observe this type. The framework codec dispatch
34
+ * surface (and Mongo) sees only the base `CodecCallContext`.
35
+ */
36
+ interface SqlCodecCallContext extends CodecCallContext {
37
+ readonly column?: SqlColumnRef;
38
+ }
39
+ /**
40
+ * SQL-family per-instance context. Extends the framework
41
+ * {@link CodecInstanceContext} (`name` only) with `usedAt`, the set of
42
+ * `(table, column)` pairs the resolved codec serves.
43
+ *
44
+ * - For `typeRef` columns sharing one named `storage.types` instance, the
45
+ * array lists every referencing column — a column-scoped stateful codec
46
+ * (e.g. encryption) can derive aggregated per-instance state across all
47
+ * the columns sharing the named instance.
48
+ * - For inline-`typeParams` columns, the array has exactly one entry —
49
+ * the column that owns the inline params.
50
+ * - For shared non-parameterized codecs, the array carries one
51
+ * representative entry (the column that triggered materialization);
52
+ * the codec is shared across every column with that codec id, so the
53
+ * `usedAt` is informational only.
54
+ *
55
+ * SQL extensions consuming `usedAt` (e.g. column-scoped state derivation)
56
+ * type their factory parameter as `SqlCodecInstanceContext`. Extensions
57
+ * that don't read `usedAt` type their factory parameter as the
58
+ * family-agnostic {@link CodecInstanceContext} — a `SqlCodecInstanceContext`
59
+ * is structurally assignable to the base.
60
+ */
61
+ interface SqlCodecInstanceContext extends CodecInstanceContext {
62
+ readonly usedAt: ReadonlyArray<{
63
+ readonly table: string;
64
+ readonly column: string;
65
+ }>;
66
+ }
67
+ /**
68
+ * Legacy adapter-level descriptor for parameterized codecs that require
69
+ * type-parameter validation at compile time. The runtime descriptor
70
+ * (`RuntimeParameterizedCodecDescriptor` in `@prisma-next/sql-runtime`)
71
+ * has migrated to the unified `CodecDescriptor<P>` shape with
72
+ * `factory: (P) => (CodecInstanceContext) => Codec`; this descriptor stays only because
73
+ * the SQL `Adapter.parameterizedCodecs()` surface still returns
74
+ * `CodecParamsDescriptor[]` (compile-time typeParams validation only,
75
+ * not runtime materialization).
76
+ *
77
+ * Retirement is tracked under TML-2357 T3.5.4 (single registration slot)
78
+ * — the adapter-level `parameterizedCodecs()` collapses into the unified
79
+ * runtime descriptor map once contributors migrate fully.
80
+ *
81
+ * @template TParams - The shape of the type parameters (e.g., `{ length: number }`)
82
+ * @template THelper - The type returned by the optional `init` hook
83
+ */
84
+ interface CodecParamsDescriptor<TParams = Record<string, unknown>, THelper = unknown> {
85
+ /** The codec ID this descriptor applies to (e.g., 'pg/vector@1') */
86
+ readonly codecId: string;
87
+ /**
88
+ * Arktype schema for validating typeParams.
89
+ * Used to validate both storage.types entries and inline column typeParams.
90
+ */
91
+ readonly paramsSchema: Type<TParams>;
92
+ /**
93
+ * Optional init hook called during runtime context creation.
94
+ * Receives validated params and returns a helper object to be stored in context.types.
95
+ * If not provided, the validated params are stored directly.
96
+ *
97
+ * Predecessor pattern. The runtime descriptor's curried
98
+ * `factory: (P) => (CodecInstanceContext) => Codec` subsumes this hook — per-instance
99
+ * state lives on the resolved codec rather than in a parallel
100
+ * `TypeHelperRegistry` entry. Retirement tracked under TML-2357 T3.5.2
101
+ * (narrow runtime `Codec` interface) and T3.5.4 (single registration
102
+ * slot). Adapter-level callers reading codec-self-carried `init` should
103
+ * migrate to the runtime descriptor map's factory instead.
104
+ */
105
+ readonly init?: (params: TParams) => THelper;
106
+ }
107
+ /**
108
+ * Codec metadata for database-specific type information.
109
+ * Used for schema introspection and verification.
110
+ */
111
+ interface CodecMeta {
112
+ readonly db?: {
113
+ readonly sql?: {
114
+ readonly postgres?: {
115
+ readonly nativeType: string;
116
+ };
117
+ };
118
+ };
119
+ }
120
+ /**
121
+ * SQL codec — extends the framework codec base with SQL-specific metadata:
122
+ * driver-native type info (`meta.db.sql.<dialect>.nativeType`) and an
123
+ * optional parameterized-codec descriptor (`paramsSchema` + `init`) for
124
+ * codecs that require type-parameter validation (e.g. `pg/vector@1`).
125
+ *
126
+ * `encode` and `decode` are redeclared here to narrow the per-call
127
+ * context to the SQL-family {@link SqlCodecCallContext} (adds
128
+ * `column?: SqlColumnRef`). TypeScript treats method-syntax declarations
129
+ * bivariantly, so the SQL narrowing is structurally compatible with the
130
+ * framework {@link BaseCodec} super-interface.
131
+ *
132
+ * Note: `paramsSchema` and `init` here are the legacy adapter-level slots
133
+ * mirrored from {@link CodecParamsDescriptor}. The runtime materialization
134
+ * path uses `RuntimeParameterizedCodecDescriptor` (in
135
+ * `@prisma-next/sql-runtime`) via the unified `CodecDescriptor<P>` shape;
136
+ * codec-self-carried `paramsSchema`/`init` retire under TML-2357 (T3.5.2
137
+ * narrows the runtime `Codec` interface; T3.5.4 collapses the parallel
138
+ * registration slots).
139
+ *
140
+ * See `Codec` in `@prisma-next/framework-components/codec` for the codec
141
+ * contract that this interface extends.
142
+ */
143
+ interface Codec$1<Id$1 extends string = string, TTraits$1 extends readonly CodecTrait[] = readonly CodecTrait[], TWire = unknown, TInput = unknown, TParams = Record<string, unknown>, THelper = unknown> extends Codec<Id$1, TTraits$1, TWire, TInput> {
144
+ encode(value: TInput, ctx: SqlCodecCallContext): Promise<TWire>;
145
+ decode(wire: TWire, ctx: SqlCodecCallContext): Promise<TInput>;
146
+ readonly meta?: CodecMeta;
147
+ readonly paramsSchema?: Type<TParams>;
148
+ /**
149
+ * Predecessor init hook. Retirement tracked under TML-2357 (T3.5.2 /
150
+ * T3.5.4); the unified runtime descriptor's
151
+ * `factory: (P) => (CodecInstanceContext) => Codec` is the replacement.
152
+ */
153
+ readonly init?: (params: TParams) => THelper;
154
+ }
155
+ /**
156
+ * Contract-bound codec registry.
157
+ *
158
+ * The dispatch interface for encode/decode at runtime: built once at
159
+ * `ExecutionContext` construction time by walking the contract's
160
+ * `storage.tables[].columns[]` and resolving each column to either a per-
161
+ * instance parameterized codec (via `descriptor.factory(typeParams)(ctx)`)
162
+ * or the shared codec instance from the legacy `CodecRegistry` (for non-
163
+ * parameterized codecs). The dispatch path calls
164
+ * `forColumn(table, column).encode/decode(...)` and doesn't know whether
165
+ * the codec is parameterized.
166
+ *
167
+ * `forCodecId(codecId)` is a fallback for sites that don't carry the
168
+ * `(table, column)` ref through to the encode/decode call site —
169
+ * primarily the param-encoding path, where `ParamRef.refs` is not
170
+ * populated by the SQL builder today (every `ParamRef` carries `codecId`
171
+ * but not the column it relates to). For the parameterized codecs shipped
172
+ * at Phase B, encode is per-instance-stateless (pgvector formats
173
+ * `[v1,v2,v3]` regardless of length; JSON's `encode` is `JSON.stringify`
174
+ * regardless of schema), so a codec-id-keyed lookup yields a structurally
175
+ * equivalent encoder; the fallback is the bridge that lets the legacy
176
+ * `codecs:` registration retire from the dispatch path while staying as
177
+ * the codec-id-only source for now.
178
+ *
179
+ * The encode-side fallback is the AC-5-deferred carve-out documented in
180
+ * the codec-registry-unification spec § Non-functional constraints.
181
+ * TML-2357 retires the fallback by threading `ParamRef.refs` through
182
+ * column-bound construction sites.
183
+ */
184
+ interface ContractCodecRegistry {
185
+ /**
186
+ * Resolve the codec for `(table, column)`. Returns the per-instance
187
+ * parameterized codec for parameterized columns, the shared codec for
188
+ * non-parameterized columns, or `undefined` if the column is unknown
189
+ * or the codec isn't registered.
190
+ */
191
+ forColumn(table: string, column: string): Codec$1 | undefined;
192
+ /**
193
+ * Resolve a codec by id. Returns the same codec instance the legacy
194
+ * `CodecRegistry.get(codecId)` would return — for non-parameterized
195
+ * codecs that's the shared instance; for parameterized codecs that's
196
+ * a representative resolved instance. Used by sites that don't carry
197
+ * `(table, column)` through to the encode/decode call site (the AC-5
198
+ * carve-out path).
199
+ */
200
+ forCodecId(codecId: string): Codec$1 | undefined;
201
+ }
202
+ /**
203
+ * Registry interface for codecs organized by ID and by contract scalar type.
204
+ *
205
+ * The registry allows looking up codecs by their namespaced ID or by the
206
+ * contract scalar types they handle. Multiple codecs may handle the same
207
+ * scalar type; ordering in byScalar reflects preference (adapter first,
208
+ * then packs, then app overrides).
209
+ */
210
+ interface CodecRegistry {
211
+ get(id: string): Codec$1<string> | undefined;
212
+ has(id: string): boolean;
213
+ getByScalar(scalar: string): readonly Codec$1<string>[];
214
+ getDefaultCodec(scalar: string): Codec$1<string> | undefined;
215
+ register(codec: Codec$1<string>): void;
216
+ /** Returns true if the codec with this ID has the given trait. */
217
+ hasTrait(codecId: string, trait: CodecTrait): boolean;
218
+ /** Returns all traits for a codec, or an empty array if not found. */
219
+ traitsOf(codecId: string): readonly CodecTrait[];
220
+ [Symbol.iterator](): Iterator<Codec$1<string>>;
221
+ values(): IterableIterator<Codec$1<string>>;
222
+ }
223
+ /**
224
+ * Conditional bundle for `encodeJson`/`decodeJson`: when `TInput` is
225
+ * structurally assignable to `JsonValue` the identity defaults are
226
+ * sound and both fields are optional; otherwise both fields are
227
+ * required so an author cannot silently produce a non-JSON-safe
228
+ * contract artifact.
229
+ */
230
+ type JsonRoundTripConfig<TInput> = [TInput] extends [JsonValue] ? {
231
+ encodeJson?: (value: TInput) => JsonValue;
232
+ decodeJson?: (json: JsonValue) => TInput;
233
+ } : {
234
+ encodeJson: (value: TInput) => JsonValue;
235
+ decodeJson: (json: JsonValue) => TInput;
236
+ };
237
+ /**
238
+ * Construct a SQL codec from author functions and optional metadata.
239
+ *
240
+ * Author `encode` and `decode` as sync or async functions; the factory
241
+ * produces a {@link Codec} whose query-time methods follow the boundary
242
+ * contract documented on `Codec`. Authors receive a second `ctx` options
243
+ * argument carrying the SQL-family per-call context; ignore it if you
244
+ * don't need it.
245
+ *
246
+ * Both `encode` and `decode` are required so `TInput` and `TWire` are
247
+ * always covered by an explicit author function — the factory installs
248
+ * no identity fallback. `encodeJson` and `decodeJson` default to identity
249
+ * **only when `TInput` is assignable to `JsonValue`**; otherwise both are
250
+ * required so the contract artifact stays JSON-safe.
251
+ */
252
+ declare function codec<Id$1 extends string, const TTraits$1 extends readonly CodecTrait[] = readonly [], TWire = unknown, TInput = unknown, TParams = Record<string, unknown>, THelper = unknown>(config: {
253
+ typeId: Id$1;
254
+ targetTypes: readonly string[];
255
+ encode: (value: TInput, ctx: SqlCodecCallContext) => TWire | Promise<TWire>;
256
+ decode: (wire: TWire, ctx: SqlCodecCallContext) => TInput | Promise<TInput>;
257
+ meta?: CodecMeta;
258
+ paramsSchema?: Type<TParams>;
259
+ init?: (params: TParams) => THelper;
260
+ traits?: TTraits$1;
261
+ renderOutputType?: (typeParams: Record<string, unknown>) => string | undefined;
262
+ } & JsonRoundTripConfig<TInput>): Codec$1<Id$1, TTraits$1, TWire, TInput, TParams, THelper>;
263
+ /**
264
+ * Type helpers to extract codec types.
265
+ */
266
+ type CodecId<T> = T extends Codec$1<infer Id> ? Id : T extends {
267
+ readonly id: infer Id;
268
+ } ? Id : never;
269
+ type CodecInput<T> = T extends Codec$1<string, readonly CodecTrait[], unknown, infer In> ? In : never;
270
+ type CodecTraits<T> = T extends Codec$1<string, infer TTraits> ? TTraits[number] & CodecTrait : never;
271
+ /**
272
+ * Type helper to extract codec types from builder instance.
273
+ */
274
+ type ExtractCodecTypes<ScalarNames extends { readonly [K in keyof ScalarNames]: Codec$1<string> } = Record<never, never>> = { readonly [K in keyof ScalarNames as ScalarNames[K] extends Codec$1<infer Id> ? Id : never]: {
275
+ readonly input: CodecInput<ScalarNames[K]>;
276
+ readonly output: CodecInput<ScalarNames[K]>;
277
+ readonly traits: CodecTraits<ScalarNames[K]>;
278
+ } };
279
+ /**
280
+ * Type helper to extract data type IDs from builder instance.
281
+ * Uses ExtractCodecTypes which preserves literal types as keys.
282
+ * Since ExtractCodecTypes<Record<K, ScalarNames[K]>> has exactly one key (the Id),
283
+ * we extract it by creating a mapped type that uses the Id as both key and value,
284
+ * then extract the value type. This preserves literal types.
285
+ */
286
+ type ExtractDataTypes<ScalarNames extends { readonly [K in keyof ScalarNames]: Codec$1<string> }> = { readonly [K in keyof ScalarNames]: { readonly [Id in keyof ExtractCodecTypes<Record<K, ScalarNames[K]>>]: Id }[keyof ExtractCodecTypes<Record<K, ScalarNames[K]>>] };
287
+ /**
288
+ * Builder interface for declaring codecs.
289
+ */
290
+ interface CodecDefBuilder<ScalarNames extends { readonly [K in keyof ScalarNames]: Codec$1<string> } = Record<never, never>> {
291
+ readonly CodecTypes: ExtractCodecTypes<ScalarNames>;
292
+ add<ScalarName extends string, CodecImpl extends Codec$1<string>>(scalarName: ScalarName, codecImpl: CodecImpl): CodecDefBuilder<O.Overwrite<ScalarNames, Record<ScalarName, CodecImpl>> & Record<ScalarName, CodecImpl>>;
293
+ readonly codecDefinitions: { readonly [K in keyof ScalarNames]: {
294
+ readonly typeId: ScalarNames[K] extends Codec$1<infer Id extends string> ? Id : never;
295
+ readonly scalar: K;
296
+ readonly codec: ScalarNames[K];
297
+ readonly input: CodecInput<ScalarNames[K]>;
298
+ readonly output: CodecInput<ScalarNames[K]>;
299
+ readonly jsType: CodecInput<ScalarNames[K]>;
300
+ } };
301
+ readonly dataTypes: { readonly [K in keyof ScalarNames]: { readonly [Id in keyof ExtractCodecTypes<Record<K, ScalarNames[K]>>]: Id }[keyof ExtractCodecTypes<Record<K, ScalarNames[K]>>] };
302
+ }
303
+ /**
304
+ * Create a new codec registry.
305
+ */
306
+ declare function createCodecRegistry(): CodecRegistry;
307
+ /**
308
+ * Create a new codec definition builder.
309
+ */
310
+ declare function defineCodecs(): CodecDefBuilder<Record<never, never>>;
311
+ //#endregion
312
+ export { codec as _, CodecInput as a, CodecRegistry as c, ContractCodecRegistry as d, ExtractCodecTypes as f, SqlColumnRef as g, SqlCodecInstanceContext as h, CodecId as i, CodecTrait$1 as l, SqlCodecCallContext as m, CodecCallContext$1 as n, CodecMeta as o, ExtractDataTypes as p, CodecDefBuilder as r, CodecParamsDescriptor as s, Codec$1 as t, CodecTraits as u, createCodecRegistry as v, defineCodecs as y };
313
+ //# sourceMappingURL=codec-types-DJEaWT36.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codec-types-DJEaWT36.d.mts","names":[],"sources":["../src/ast/codec-types.ts"],"sourcesContent":[],"mappings":";;;;;;;;AA0BA;AAgBA;AA0BA;AAqBA;;;;;;;AA8BA;AAiCA;AAE2B,UAhIV,YAAA,CAgIU;EAAwB,SAAA,KAAA,EAAA,MAAA;EAGvC,SAAA,IAAA,EAAA,MAAA;;;;;;;;;;;;;AAKM,UAxHD,mBAAA,SAA4B,gBAwH3B,CAAA;EACa,SAAA,MAAA,CAAA,EAxHX,YAwHW;;;;;;AAsC/B;AA4BA;;;;;;;;;;;;AAYC;;;;;AAwGyB,UArRT,uBAAA,SAAgC,oBAqRvB,CAAA;EAAc,SAAA,MAAA,EApRrB,aAoRqB,CAAA;IAGd,SAAA,KAAA,EAAA,MAAA;IAAW,SAAA,MAAA,EAAA,MAAA;EACZ,CAAA,CAAA;;;AAkBzB;;;;;;;;;;;;;;;;AAcmB,UApSF,qBAoSE,CAAA,UApS8B,MAoS9B,CAAA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AY,OAAO,WAC/D,kBAAkB,OAAO,GAAG,YAAY;;;;;iBAyHpC,mBAAA,CAAA,GAAuB;;;;iBAOvB,YAAA,CAAA,GAAgB,gBAAgB"}
@@ -1,8 +1,8 @@
1
- import { b as RuntimeError } from "./types-k9pir8XY.mjs";
1
+ import { y as RuntimeError } from "./types-BWOCTYd8.mjs";
2
2
 
3
3
  //#region src/errors.d.ts
4
4
  declare function planInvalid(message: string, details?: Record<string, unknown>, hints?: readonly string[], docs?: readonly string[]): RuntimeError;
5
5
  declare function planUnsupported(message: string, details?: Record<string, unknown>, hints?: readonly string[], docs?: readonly string[]): RuntimeError;
6
6
  //#endregion
7
7
  export { planUnsupported as n, planInvalid as t };
8
- //# sourceMappingURL=errors-ChY_dHam.d.mts.map
8
+ //# sourceMappingURL=errors-BRt5yHo9.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors-BRt5yHo9.d.mts","names":[],"sources":["../src/errors.ts"],"sourcesContent":[],"mappings":";;;iBAEgB,WAAA,4BAEJ,+EAGT;iBAkBa,eAAA,4BAEJ,+EAGT"}
@@ -32,4 +32,4 @@ function planUnsupported(message, details, hints, docs) {
32
32
 
33
33
  //#endregion
34
34
  export { planUnsupported as n, planInvalid as t };
35
- //# sourceMappingURL=errors-D3xmG4h-.mjs.map
35
+ //# sourceMappingURL=errors-D6kqqjHM.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"errors-D3xmG4h-.mjs","names":[],"sources":["../src/errors.ts"],"sourcesContent":["import type { RuntimeError } from './types';\n\nexport function planInvalid(\n message: string,\n details?: Record<string, unknown>,\n hints?: readonly string[],\n docs?: readonly string[],\n): RuntimeError {\n const error = new Error(message) as RuntimeError;\n\n Object.defineProperty(error, 'name', {\n value: 'RuntimeError',\n configurable: true,\n });\n\n return Object.assign(error, {\n code: 'PLAN.INVALID',\n category: 'PLAN' as const,\n severity: 'error' as const,\n details,\n hints,\n docs,\n });\n}\n\nexport function planUnsupported(\n message: string,\n details?: Record<string, unknown>,\n hints?: readonly string[],\n docs?: readonly string[],\n): RuntimeError {\n const error = new Error(message) as RuntimeError;\n\n Object.defineProperty(error, 'name', {\n value: 'RuntimeError',\n configurable: true,\n });\n\n return Object.assign(error, {\n code: 'PLAN.UNSUPPORTED',\n category: 'PLAN' as const,\n severity: 'error' as const,\n details,\n hints,\n docs,\n });\n}\n"],"mappings":";AAEA,SAAgB,YACd,SACA,SACA,OACA,MACc;CACd,MAAM,QAAQ,IAAI,MAAM,QAAQ;AAEhC,QAAO,eAAe,OAAO,QAAQ;EACnC,OAAO;EACP,cAAc;EACf,CAAC;AAEF,QAAO,OAAO,OAAO,OAAO;EAC1B,MAAM;EACN,UAAU;EACV,UAAU;EACV;EACA;EACA;EACD,CAAC;;AAGJ,SAAgB,gBACd,SACA,SACA,OACA,MACc;CACd,MAAM,QAAQ,IAAI,MAAM,QAAQ;AAEhC,QAAO,eAAe,OAAO,QAAQ;EACnC,OAAO;EACP,cAAc;EACf,CAAC;AAEF,QAAO,OAAO,OAAO,OAAO;EAC1B,MAAM;EACN,UAAU;EACV,UAAU;EACV;EACA;EACA;EACD,CAAC"}
1
+ {"version":3,"file":"errors-D6kqqjHM.mjs","names":[],"sources":["../src/errors.ts"],"sourcesContent":["import type { RuntimeError } from './types';\n\nexport function planInvalid(\n message: string,\n details?: Record<string, unknown>,\n hints?: readonly string[],\n docs?: readonly string[],\n): RuntimeError {\n const error = new Error(message) as RuntimeError;\n\n Object.defineProperty(error, 'name', {\n value: 'RuntimeError',\n configurable: true,\n });\n\n return Object.assign(error, {\n code: 'PLAN.INVALID',\n category: 'PLAN' as const,\n severity: 'error' as const,\n details,\n hints,\n docs,\n });\n}\n\nexport function planUnsupported(\n message: string,\n details?: Record<string, unknown>,\n hints?: readonly string[],\n docs?: readonly string[],\n): RuntimeError {\n const error = new Error(message) as RuntimeError;\n\n Object.defineProperty(error, 'name', {\n value: 'RuntimeError',\n configurable: true,\n });\n\n return Object.assign(error, {\n code: 'PLAN.UNSUPPORTED',\n category: 'PLAN' as const,\n severity: 'error' as const,\n details,\n hints,\n docs,\n });\n}\n"],"mappings":";AAEA,SAAgB,YACd,SACA,SACA,OACA,MACc;CACd,MAAM,QAAQ,IAAI,MAAM,QAAQ;AAEhC,QAAO,eAAe,OAAO,QAAQ;EACnC,OAAO;EACP,cAAc;EACf,CAAC;AAEF,QAAO,OAAO,OAAO,OAAO;EAC1B,MAAM;EACN,UAAU;EACV,UAAU;EACV;EACA;EACA;EACD,CAAC;;AAGJ,SAAgB,gBACd,SACA,SACA,OACA,MACc;CACd,MAAM,QAAQ,IAAI,MAAM,QAAQ;AAEhC,QAAO,eAAe,OAAO,QAAQ;EACnC,OAAO;EACP,cAAc;EACf,CAAC;AAEF,QAAO,OAAO,OAAO,OAAO;EAC1B,MAAM;EACN,UAAU;EACV,UAAU;EACV;EACA;EACA;EACD,CAAC"}
@@ -1,5 +1,6 @@
1
- import { a as CodecMeta, c as CodecRegistry, d as ExtractCodecTypes, f as ExtractDataTypes, h as defineCodecs, i as CodecInput, l as CodecTrait, m as createCodecRegistry, n as CodecDefBuilder, o as CodecOutput, p as codec, r as CodecId, s as CodecParamsDescriptor, t as Codec, u as CodecTraits } from "../codec-types-DcEITed4.mjs";
2
- import { $ as ToWhereExpr, A as InsertOnConflict, B as NotExpr, C as ExistsExpr, D as ExpressionSource, E as ExpressionRewriter, F as JsonObjectEntry, G as ParamRef, H as OperationExpr, I as JsonObjectExpr, J as SelectAst, K as ProjectionExpr, L as ListExpression, M as JoinAst, N as JoinOnExpr, O as IdentifierRef, P as JsonArrayAggExpr, Q as TableSource, R as LiteralExpr, S as EqColJoinOn, T as ExpressionFolder, U as OrExpr, V as NullCheckExpr, W as OrderByItem, X as SubqueryExpr, Y as SelectAstOptions, Z as TableRef, _ as DeleteAst, a as AndExpr, at as whereExprKinds, b as DoNothingConflictAction, c as AnyInsertOnConflictAction, d as AnyQueryAst, et as UpdateAst, f as AstRewriter, g as DefaultValueExpr, h as ColumnRef, i as AggregateOpFn, it as queryAstKinds, j as InsertValue, k as InsertAst, l as AnyInsertValue, m as BinaryOp, n as AggregateExpr, nt as isQueryAst, o as AnyExpression, p as BinaryExpr, q as ProjectionItem, r as AggregateFn, rt as isWhereExpr, s as AnyFromSource, t as AggregateCountFn, tt as WhereArg, u as AnyOperationArg, v as DerivedTableSource, w as ExprVisitor, x as DoUpdateSetConflictAction, y as Direction, z as LoweredStatement } from "../types-C3Hg-CVz.mjs";
1
+ import { _ as codec, a as CodecInput, c as CodecRegistry, d as ContractCodecRegistry, f as ExtractCodecTypes, g as SqlColumnRef, h as SqlCodecInstanceContext, i as CodecId, l as CodecTrait, m as SqlCodecCallContext, n as CodecCallContext, o as CodecMeta, p as ExtractDataTypes, r as CodecDefBuilder, s as CodecParamsDescriptor, t as Codec, u as CodecTraits, v as createCodecRegistry, y as defineCodecs } from "../codec-types-DJEaWT36.mjs";
2
+ import { $ as ToWhereExpr, A as InsertOnConflict, B as NotExpr, C as ExistsExpr, D as ExpressionSource, E as ExpressionRewriter, F as JsonObjectEntry, G as ParamRef, H as OperationExpr, I as JsonObjectExpr, J as SelectAst, K as ProjectionExpr, L as ListExpression, M as JoinAst, N as JoinOnExpr, O as IdentifierRef, P as JsonArrayAggExpr, Q as TableSource, R as LiteralExpr, S as EqColJoinOn, T as ExpressionFolder, U as OrExpr, V as NullCheckExpr, W as OrderByItem, X as SubqueryExpr, Y as SelectAstOptions, Z as TableRef, _ as DeleteAst, a as AndExpr, at as whereExprKinds, b as DoNothingConflictAction, c as AnyInsertOnConflictAction, d as AnyQueryAst, et as UpdateAst, f as AstRewriter, g as DefaultValueExpr, h as ColumnRef, i as AggregateOpFn, it as queryAstKinds, j as InsertValue, k as InsertAst, l as AnyInsertValue, m as BinaryOp, n as AggregateExpr, nt as isQueryAst, o as AnyExpression, p as BinaryExpr, q as ProjectionItem, r as AggregateFn, rt as isWhereExpr, s as AnyFromSource, t as AggregateCountFn, tt as WhereArg, u as AnyOperationArg, v as DerivedTableSource, w as ExprVisitor, x as DoUpdateSetConflictAction, y as Direction, z as LoweredStatement } from "../types-B4dL4lc3.mjs";
3
+ import { ContractMarkerRecord } from "@prisma-next/contract/types";
3
4
 
4
5
  //#region src/ast/adapter-types.d.ts
5
6
  type AdapterTarget = string;
@@ -23,6 +24,13 @@ interface AdapterProfile<TTarget extends AdapterTarget = AdapterTarget> {
23
24
  * parameter placeholder style).
24
25
  */
25
26
  readMarkerStatement(): MarkerStatement;
27
+ /**
28
+ * Parses a row returned by the adapter's `readMarkerStatement()` into a
29
+ * `ContractMarkerRecord`. Each adapter is responsible for any
30
+ * target-specific decoding before delegating to the shared row schema.
31
+ * Throws on shape violation.
32
+ */
33
+ parseMarkerRow(row: unknown): ContractMarkerRecord;
26
34
  }
27
35
  interface LowererContext<TContract = unknown> {
28
36
  readonly contract: TContract;
@@ -118,9 +126,7 @@ declare const codecs: CodecDefBuilder<{
118
126
  int: Codec<"sql/int@1", readonly ["equality", "order", "numeric"], number, number, Record<string, unknown>, unknown>;
119
127
  float: Codec<"sql/float@1", readonly ["equality", "order", "numeric"], number, number, Record<string, unknown>, unknown>;
120
128
  text: Codec<"sql/text@1", readonly ["equality", "order", "textual"], string, string, Record<string, unknown>, unknown>;
121
- } & Record<"timestamp", Codec<"sql/timestamp@1", readonly ["equality", "order"], string, string, {
122
- precision?: number;
123
- }, unknown>>>;
129
+ } & Record<"timestamp", Codec<"sql/timestamp@1", readonly ["equality", "order"], Date, Date, Record<string, unknown>, unknown>>>;
124
130
  declare const sqlCodecDefinitions: {
125
131
  readonly char: {
126
132
  readonly typeId: "sql/char@1";
@@ -165,12 +171,10 @@ declare const sqlCodecDefinitions: {
165
171
  readonly timestamp: {
166
172
  readonly typeId: "sql/timestamp@1";
167
173
  readonly scalar: "timestamp";
168
- readonly codec: Codec<"sql/timestamp@1", readonly ["equality", "order"], string, string, {
169
- precision?: number;
170
- }, unknown>;
171
- readonly input: string;
172
- readonly output: string;
173
- readonly jsType: string;
174
+ readonly codec: Codec<"sql/timestamp@1", readonly ["equality", "order"], Date, Date, Record<string, unknown>, unknown>;
175
+ readonly input: Date;
176
+ readonly output: Date;
177
+ readonly jsType: Date;
174
178
  };
175
179
  };
176
180
  declare const sqlDataTypes: {
@@ -185,6 +189,17 @@ type SqlCodecTypes = typeof codecs.CodecTypes;
185
189
  //#endregion
186
190
  //#region src/ast/util.d.ts
187
191
  declare function compact<T extends Record<string, unknown>>(o: T): T;
192
+ /**
193
+ * Walks an AST's parameter references in first-encounter order and dedupes
194
+ * by ParamRef identity. The single canonical helper used by every consumer
195
+ * that aligns `plan.params` with metadata-by-index — the SQL builder lane,
196
+ * the SQL ORM client, the SQL runtime encoder, and the Postgres renderer's
197
+ * `$N` index map — so the four walks cannot drift in dedupe semantics.
198
+ *
199
+ * SQLite's `?`-placeholder renderer intentionally does NOT use this helper
200
+ * because it needs one params entry per occurrence in the SQL.
201
+ */
202
+ declare function collectOrderedParamRefs(ast: AnyQueryAst): ReadonlyArray<ParamRef>;
188
203
  //#endregion
189
- export { Adapter, AdapterProfile, AdapterTarget, AggregateCountFn, AggregateExpr, AggregateFn, AggregateOpFn, AndExpr, AnyExpression, AnyFromSource, AnyInsertOnConflictAction, AnyInsertValue, AnyOperationArg, AnyQueryAst, AstRewriter, BinaryExpr, BinaryOp, Codec, CodecDefBuilder, CodecId, CodecInput, CodecMeta, CodecOutput, CodecParamsDescriptor, CodecRegistry, CodecTrait, CodecTraits, ColumnRef, DefaultValueExpr, DeleteAst, DerivedTableSource, Direction, DoNothingConflictAction, DoUpdateSetConflictAction, EqColJoinOn, ExistsExpr, ExprVisitor, ExpressionFolder, ExpressionRewriter, ExpressionSource, ExtractCodecTypes, ExtractDataTypes, IdentifierRef, InsertAst, InsertOnConflict, InsertValue, JoinAst, JoinOnExpr, JsonArrayAggExpr, JsonObjectEntry, JsonObjectExpr, ListExpression, LiteralExpr, LoweredStatement, Lowerer, LowererContext, MarkerStatement, NotExpr, NullCheckExpr, OperationExpr, OrExpr, OrderByItem, ParamRef, ProjectionExpr, ProjectionItem, SQL_CHAR_CODEC_ID, SQL_FLOAT_CODEC_ID, SQL_INT_CODEC_ID, SQL_TEXT_CODEC_ID, SQL_TIMESTAMP_CODEC_ID, SQL_VARCHAR_CODEC_ID, SelectAst, SelectAstOptions, SqlCodecTypes, SqlConnection, SqlDriver, SqlDriverState, SqlExecuteRequest, SqlExplainResult, SqlQueryResult, SqlQueryable, SqlTransaction, SubqueryExpr, TableRef, TableSource, ToWhereExpr, UpdateAst, WhereArg, codec, compact, createCodecRegistry, defineCodecs, isQueryAst, isWhereExpr, queryAstKinds, sqlCodecDefinitions, sqlDataTypes, whereExprKinds };
204
+ export { Adapter, AdapterProfile, AdapterTarget, AggregateCountFn, AggregateExpr, AggregateFn, AggregateOpFn, AndExpr, AnyExpression, AnyFromSource, AnyInsertOnConflictAction, AnyInsertValue, AnyOperationArg, AnyQueryAst, AstRewriter, BinaryExpr, BinaryOp, Codec, CodecCallContext, CodecDefBuilder, CodecId, CodecInput, CodecMeta, CodecParamsDescriptor, CodecRegistry, CodecTrait, CodecTraits, ColumnRef, ContractCodecRegistry, DefaultValueExpr, DeleteAst, DerivedTableSource, Direction, DoNothingConflictAction, DoUpdateSetConflictAction, EqColJoinOn, ExistsExpr, ExprVisitor, ExpressionFolder, ExpressionRewriter, ExpressionSource, ExtractCodecTypes, ExtractDataTypes, IdentifierRef, InsertAst, InsertOnConflict, InsertValue, JoinAst, JoinOnExpr, JsonArrayAggExpr, JsonObjectEntry, JsonObjectExpr, ListExpression, LiteralExpr, LoweredStatement, Lowerer, LowererContext, MarkerStatement, NotExpr, NullCheckExpr, OperationExpr, OrExpr, OrderByItem, ParamRef, ProjectionExpr, ProjectionItem, SQL_CHAR_CODEC_ID, SQL_FLOAT_CODEC_ID, SQL_INT_CODEC_ID, SQL_TEXT_CODEC_ID, SQL_TIMESTAMP_CODEC_ID, SQL_VARCHAR_CODEC_ID, SelectAst, SelectAstOptions, SqlCodecCallContext, SqlCodecInstanceContext, SqlCodecTypes, SqlColumnRef, SqlConnection, SqlDriver, SqlDriverState, SqlExecuteRequest, SqlExplainResult, SqlQueryResult, SqlQueryable, SqlTransaction, SubqueryExpr, TableRef, TableSource, ToWhereExpr, UpdateAst, WhereArg, codec, collectOrderedParamRefs, compact, createCodecRegistry, defineCodecs, isQueryAst, isWhereExpr, queryAstKinds, sqlCodecDefinitions, sqlDataTypes, whereExprKinds };
190
205
  //# sourceMappingURL=ast.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ast.d.mts","names":[],"sources":["../../src/ast/adapter-types.ts","../../src/ast/driver-types.ts","../../src/ast/sql-codecs.ts","../../src/ast/util.ts"],"sourcesContent":[],"mappings":";;;;KAGY,aAAA;UAEK,eAAA;EAFL,SAAA,GAAA,EAAA,MAAa;EAER,SAAA,MAAA,EAAA,SAAe,OAAA,EAAA;AAKhC;AAAgD,UAA/B,cAA+B,CAAA,gBAAA,aAAA,GAAgB,aAAhB,CAAA,CAAA;EAAgB,SAAA,EAAA,EAAA,MAAA;EAE7C,SAAA,MAAA,EAAA,OAAA;EACM,SAAA,YAAA,EAAA,MAAA,CAAA,MAAA,EAAA,OAAA,CAAA;EAMb;;;AASZ;AAKA;EAAgE,MAAA,EAAA,EAdpD,aAcoD;EACzD;;;;;EAWU,mBAAO,EAAA,EApBC,eAoBD;;AACJ,UAlBH,cAkBG,CAAA,YAAA,OAAA,CAAA,CAAA;EACP,SAAA,QAAA,EAlBQ,SAkBR;EAA6B,SAAA,MAAA,CAAA,EAAA,SAAA,OAAA,EAAA;;AAAa,KAd3C,OAc2C,CAAA,MAAA,OAAA,EAAA,YAAA,OAAA,EAAA,QAdS,gBAcT,CAAA,GAAA,CAAA,GAAA,EAbhD,GAagD,EAAA,OAAA,EAZ5C,cAY4C,CAZ7B,SAY6B,CAAA,EAAA,GAXlD,KAWkD;;;;;AC/CvD;AAKA;;AAC+B,UDuCd,OCvCc,CAAA,MAAA,OAAA,EAAA,YAAA,OAAA,EAAA,QDuC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KAAA,EAAA,MAAA;IACE,SAAA,MAAA,EAAA,MAAA;IAF0B,SAAA,MAAA,EAAA,MAAA;EAAY,CAAA;AAKpD,CAAA;AACgB,cC2EH,YD3EG,EAAA;EAAkC,SAAA,IAAA,EAAA,YAAA;EAAkC,SAAA,OAAA,EAAA,eAAA;EAAd,SAAA,GAAA,EAAA,WAAA;EAClD,SAAA,KAAA,EAAA,aAAA;EAA4B,SAAA,IAAA,EAAA,YAAA;EAAR,SAAA,SAAA,EAAA,iBAAA;CAC1B;AAGc,KCuEhB,aAAA,GDvEgB,OCuEO,MAAA,CAAO,UDvEd;;;iBEtEZ,kBAAkB,4BAA4B,IAAI"}
1
+ {"version":3,"file":"ast.d.mts","names":[],"sources":["../../src/ast/adapter-types.ts","../../src/ast/driver-types.ts","../../src/ast/sql-codecs.ts","../../src/ast/util.ts"],"sourcesContent":[],"mappings":";;;;;KAIY,aAAA;UAEK,eAAA;EAFL,SAAA,GAAA,EAAA,MAAa;EAER,SAAA,MAAA,EAAA,SAAe,OAAA,EAAA;AAKhC;AAAgD,UAA/B,cAA+B,CAAA,gBAAA,aAAA,GAAgB,aAAhB,CAAA,CAAA;EAAgB,SAAA,EAAA,EAAA,MAAA;EAE7C,SAAA,MAAA,EAAA,OAAA;EACM,SAAA,YAAA,EAAA,MAAA,CAAA,MAAA,EAAA,OAAA,CAAA;EAMb;;;;AAgBZ;EAKY,MAAA,EAAA,EArBA,aAqBO;EAA6C;;;;;EAGtD,mBAAA,EAAA,EAlBe,eAkBf;EASO;;;;;;EAEsC,cAAA,CAAA,GAAA,EAAA,OAAA,CAAA,EAtBvB,oBAsBuB;;UAnBtC;qBACI;;ACrCrB;AAKiB,KDoCL,OCpCK,CAAA,MAAc,OAAA,EAAA,YAAA,OAAA,EAAA,QDoCiC,gBCpCjC,CAAA,GAAA,CAAA,GAAA,EDqCxB,GCrCwB,EAAA,OAAA,EDsCpB,cCtCoB,CDsCL,SCtCK,CAAA,EAAA,GDuC1B,KCvC0B;;;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