@prisma-next/sql-relational-core 0.3.0-dev.43 → 0.3.0-dev.44
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/README.md +12 -0
- package/dist/exports/ast.d.mts +6 -3
- package/dist/exports/ast.d.mts.map +1 -1
- package/dist/exports/ast.mjs +2 -1
- package/dist/exports/ast.mjs.map +1 -1
- package/dist/exports/guards.d.mts +3 -3
- package/dist/exports/operations-registry.d.mts +3 -3
- package/dist/exports/param.d.mts +3 -3
- package/dist/exports/plan.d.mts +1 -1
- package/dist/exports/schema.d.mts +3 -3
- package/dist/exports/types.d.mts +2 -2
- package/dist/exports/utils/guards.d.mts +3 -3
- package/dist/{guards-l1R3q8pA.d.mts → guards-BsJlVzBS.d.mts} +3 -3
- package/dist/{guards-l1R3q8pA.d.mts.map → guards-BsJlVzBS.d.mts.map} +1 -1
- package/dist/index.d.mts +5 -5
- package/dist/{operations-registry-0GuSkOCC.d.mts → operations-registry-DegkI6a0.d.mts} +2 -2
- package/dist/{operations-registry-0GuSkOCC.d.mts.map → operations-registry-DegkI6a0.d.mts.map} +1 -1
- package/dist/{param-ChBZwVcw.d.mts → param-DiyorjKd.d.mts} +2 -2
- package/dist/param-DiyorjKd.d.mts.map +1 -0
- package/dist/{plan-cjDF_yFX.d.mts → plan-Oh1MFY8z.d.mts} +19 -16
- package/dist/plan-Oh1MFY8z.d.mts.map +1 -0
- package/dist/query-lane-context-CgkPuKaR.d.mts.map +1 -1
- package/dist/{schema-CEpzzWNY.d.mts → schema-zFAQbkk1.d.mts} +3 -3
- package/dist/{schema-CEpzzWNY.d.mts.map → schema-zFAQbkk1.d.mts.map} +1 -1
- package/dist/{types-DicmXfBm.d.mts → types-n9-v4xao.d.mts} +2 -2
- package/dist/{types-DicmXfBm.d.mts.map → types-n9-v4xao.d.mts.map} +1 -1
- package/package.json +10 -10
- package/src/ast/select.ts +2 -0
- package/src/ast/types.ts +25 -22
- package/src/ast/update.ts +1 -1
- package/dist/param-ChBZwVcw.d.mts.map +0 -1
- package/dist/plan-cjDF_yFX.d.mts.map +0 -1
package/README.md
CHANGED
|
@@ -44,6 +44,7 @@ flowchart TD
|
|
|
44
44
|
PARAM[Parameter Helpers]
|
|
45
45
|
OPS[Operations Registry]
|
|
46
46
|
TYPES[Type Definitions]
|
|
47
|
+
AST[AST Types]
|
|
47
48
|
end
|
|
48
49
|
|
|
49
50
|
subgraph "Consumers"
|
|
@@ -61,6 +62,8 @@ flowchart TD
|
|
|
61
62
|
OPS --> ORM
|
|
62
63
|
TYPES --> SQL
|
|
63
64
|
TYPES --> ORM
|
|
65
|
+
AST --> SQL
|
|
66
|
+
AST --> ORM
|
|
64
67
|
```
|
|
65
68
|
|
|
66
69
|
## Components
|
|
@@ -88,6 +91,14 @@ flowchart TD
|
|
|
88
91
|
- Defines `SqlQueryPlan<Row>` interface for SQL query plans produced by lanes before lowering
|
|
89
92
|
- Provides `augmentDescriptorWithColumnMeta(descriptors, columnMeta)` helper to update ParamDescriptor with `codecId` and `nativeType` from column metadata
|
|
90
93
|
|
|
94
|
+
### AST Surface (`ast/*` via `exports/ast.ts`)
|
|
95
|
+
- Query roots: `SelectAst`, `InsertAst`, `UpdateAst`, `DeleteAst`
|
|
96
|
+
- Expressions: `ColumnRef`, `ParamRef`, `LiteralExpr`, `OperationExpr`, `ListLiteralExpr`
|
|
97
|
+
- Predicates: `BinaryExpr` (ops: `eq`, `neq`, `gt`, `lt`, `gte`, `lte`, `like`, `ilike`, `in`, `notIn`), `AndExpr`, `OrExpr`, `ExistsExpr`, `NullCheckExpr`
|
|
98
|
+
- Joins: `JoinAst`, `JoinOnExpr` (eqCol or WhereExpr)
|
|
99
|
+
- `SelectAst.selectAllIntent` — preserves select-all intent when normalized to explicit columns
|
|
100
|
+
- `DeleteAst.where` and `UpdateAst.where` optional for mutation-without-WHERE lint support
|
|
101
|
+
|
|
91
102
|
### Type Definitions (`types.ts`)
|
|
92
103
|
- Defines TypeScript types for column builders, operations, projections
|
|
93
104
|
- Provides type inference utilities for extracting JavaScript types from codec types (e.g., `ExtractJsTypeFromColumnBuilder`)
|
|
@@ -115,6 +126,7 @@ This package follows the standard `exports/` directory pattern:
|
|
|
115
126
|
- `src/exports/types.ts` - Re-exports type definitions
|
|
116
127
|
- `src/exports/operations-registry.ts` - Re-exports operations registry
|
|
117
128
|
- `src/exports/plan.ts` - Re-exports plan types and helpers
|
|
129
|
+
- `src/exports/ast.ts` - Re-exports SQL AST types
|
|
118
130
|
- `src/exports/errors.ts` - Re-exports error helpers (from `@prisma-next/plan`)
|
|
119
131
|
- `src/index.ts` - Main entry point that re-exports from `exports/`
|
|
120
132
|
|
package/dist/exports/ast.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { S as defineCodecs, _ as CodecRegistry, b as codec, d as CodecDefBuilder, f as CodecId, g as CodecParamsDescriptor, h as CodecOutput, m as CodecMeta, p as CodecInput, u as Codec, v as ExtractCodecTypes, x as createCodecRegistry, y as ExtractDataTypes } from "../query-lane-context-CgkPuKaR.mjs";
|
|
2
|
-
import { C as ParamRef, D as UpdateAst, E as TableRef, O as WhereExpr, S as OrExpr, T as SelectAst, _ as ListLiteralExpr, a as BinaryOp, b as NullCheckExpr, c as Direction, d as ExpressionSource, f as IncludeAst, g as JoinOnExpr, h as JoinAst, i as BinaryExpr, k as isOperationExpr, l as ExistsExpr, m as InsertAst, o as ColumnRef, p as IncludeRef, r as AndExpr, s as DeleteAst, u as Expression, v as LiteralExpr, w as QueryAst, x as OperationExpr, y as LoweredStatement } from "../plan-
|
|
3
|
-
import { b as JoinOnBuilder } from "../types-
|
|
2
|
+
import { C as ParamRef, D as UpdateAst, E as TableRef, O as WhereExpr, S as OrExpr, T as SelectAst, _ as ListLiteralExpr, a as BinaryOp, b as NullCheckExpr, c as Direction, d as ExpressionSource, f as IncludeAst, g as JoinOnExpr, h as JoinAst, i as BinaryExpr, k as isOperationExpr, l as ExistsExpr, m as InsertAst, o as ColumnRef, p as IncludeRef, r as AndExpr, s as DeleteAst, u as Expression, v as LiteralExpr, w as QueryAst, x as OperationExpr, y as LoweredStatement } from "../plan-Oh1MFY8z.mjs";
|
|
3
|
+
import { b as JoinOnBuilder } from "../types-n9-v4xao.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/ast/adapter-types.d.ts
|
|
6
6
|
type AdapterTarget = string;
|
|
@@ -118,6 +118,9 @@ interface CreateSelectAstOptions {
|
|
|
118
118
|
dir: Direction;
|
|
119
119
|
}>;
|
|
120
120
|
readonly limit?: number;
|
|
121
|
+
readonly selectAllIntent?: {
|
|
122
|
+
table?: string;
|
|
123
|
+
};
|
|
121
124
|
}
|
|
122
125
|
declare function createSelectAst(options: CreateSelectAstOptions): SelectAst;
|
|
123
126
|
//#endregion
|
|
@@ -177,7 +180,7 @@ type SqlCodecTypes = typeof codecs.CodecTypes;
|
|
|
177
180
|
interface CreateUpdateAstOptions {
|
|
178
181
|
readonly table: TableRef;
|
|
179
182
|
readonly set: Record<string, ColumnRef | ParamRef>;
|
|
180
|
-
readonly where
|
|
183
|
+
readonly where?: WhereExpr;
|
|
181
184
|
readonly returning?: ReadonlyArray<ColumnRef>;
|
|
182
185
|
}
|
|
183
186
|
declare function createUpdateAst(options: CreateUpdateAstOptions): UpdateAst;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ast.d.mts","names":[],"sources":["../../src/ast/adapter-types.ts","../../src/ast/common.ts","../../src/ast/delete.ts","../../src/ast/driver-types.ts","../../src/ast/insert.ts","../../src/ast/join.ts","../../src/ast/order.ts","../../src/ast/predicate.ts","../../src/ast/select.ts","../../src/ast/sql-codecs.ts","../../src/ast/update.ts","../../src/ast/util.ts"],"sourcesContent":[],"mappings":";;;;;KAEY,aAAA;UAEK,+BAA+B,gBAAgB;;mBAE7C;EAJP,SAAA,YAAa,EAKA,MALA,CAAA,MAAA,EAAA,OAAA,CAAA;EAER;;;;;EASL,MAAA,EAAA,EAAA,aAA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AAY;QAET,YAAY;OAAoB;;;;iBCO3B,gBAAA,KACV,gBACE,mBACC,aAAa,WAAW,cAAc,kBAC5C;iBASa,gBAAA,yBAAyC,YAAY;iBAQrD,mBAAA,OAA0B,8BAA8B;;;UCpBvD,sBAAA;iBACA;mBACE,cAAc;sBACX,cAAc;ERdxB,SAAA,OAAa,EQeL,aRfK,CAAA;IAER,KAAA,EAAA,MAAc;IAAiB,IAAA,EQetC,SRfsC,GQe1B,URf0B,GQeb,aRfa;EAAgB,CAAA,CAAA;EAE7C,SAAA,KAAA,CAAA,EQeA,SRfA;EACM,SAAA,OAAA,CAAA,EQeJ,aRfI,CAAA;IAMb,IAAA,EQS+B,SRT/B,GQS2C,aRT3C;IAAa,GAAA,EQSkD,SRTlD;EAGR,CAAA,CAAA;EAMA,SAAA,KAAA,CAAA,EAAc,MAAA;
|
|
1
|
+
{"version":3,"file":"ast.d.mts","names":[],"sources":["../../src/ast/adapter-types.ts","../../src/ast/common.ts","../../src/ast/delete.ts","../../src/ast/driver-types.ts","../../src/ast/insert.ts","../../src/ast/join.ts","../../src/ast/order.ts","../../src/ast/predicate.ts","../../src/ast/select.ts","../../src/ast/sql-codecs.ts","../../src/ast/update.ts","../../src/ast/util.ts"],"sourcesContent":[],"mappings":";;;;;KAEY,aAAA;UAEK,+BAA+B,gBAAgB;;mBAE7C;EAJP,SAAA,YAAa,EAKA,MALA,CAAA,MAAA,EAAA,OAAA,CAAA;EAER;;;;;EASL,MAAA,EAAA,EAAA,aAAA;;AAGK,UAAA,cAAc,CAAA,QAEd,OACQ,CAAA,CAAA;EAGR,SAAA,SAAc,CAAA,EAAA,MAAA;EAKnB,SAAA,IAAO,EATF,KASE;EACZ,SAAA,WAAA,CAAA,EATkB,MASlB,CAAA,MAAA,EAAA,OAAA,CAAA;;AACI,UAPM,cAON,CAAA,YAAA,OAAA,CAAA,CAAA;EACS,SAAA,QAAA,EAPC,SAOD;EAAf,SAAA,MAAA,CAAA,EAAA,SAAA,OAAA,EAA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: unknown; readonly output: unknown }>","result: Record<\n string,\n {\n typeId: string;\n scalar: string;\n codec: Codec;\n input: unknown;\n output: unknown;\n jsType: unknown;\n }\n >","out: Record<string, unknown>","arktype"],"sources":["../../src/ast/codec-types.ts","../../src/ast/util.ts","../../src/ast/common.ts","../../src/ast/delete.ts","../../src/ast/insert.ts","../../src/ast/join.ts","../../src/ast/order.ts","../../src/ast/predicate.ts","../../src/ast/select.ts","../../src/ast/sql-codecs.ts","../../src/ast/types.ts","../../src/ast/update.ts"],"sourcesContent":["import { ifDefined } from '@prisma-next/utils/defined';\nimport type { Type } from 'arktype';\nimport type { O } from 'ts-toolbelt';\n\n/**\n * Descriptor for parameterized codecs that require type parameter validation.\n * Shared between adapter (compile-time) and runtime layers to avoid duplication.\n *\n * @template TParams - The shape of the type parameters (e.g., `{ length: number }`)\n * @template THelper - The type returned by the optional `init` hook\n */\nexport interface CodecParamsDescriptor<TParams = Record<string, unknown>, THelper = unknown> {\n /** The codec ID this descriptor applies to (e.g., 'pg/vector@1') */\n readonly codecId: string;\n\n /**\n * Arktype schema for validating typeParams.\n * Used to validate both storage.types entries and inline column typeParams.\n */\n readonly paramsSchema: Type<TParams>;\n\n /**\n * Optional init hook called during runtime context creation.\n * Receives validated params and returns a helper object to be stored in context.types.\n * If not provided, the validated params are stored directly.\n */\n readonly init?: (params: TParams) => THelper;\n}\n\n/**\n * Codec metadata for database-specific type information.\n * Used for schema introspection and verification.\n */\nexport interface CodecMeta {\n readonly db?: {\n readonly sql?: {\n readonly postgres?: {\n readonly nativeType: string; // e.g. 'integer', 'text', 'vector', 'timestamp with time zone'\n };\n };\n };\n}\n\n/**\n * Codec interface for encoding/decoding values between wire format and JavaScript types.\n *\n * Codecs are pure, synchronous functions with no side effects or IO.\n * They provide deterministic conversion between database wire types and JS values.\n */\nexport interface Codec<\n Id extends string = string,\n TWire = unknown,\n TJs = unknown,\n TParams = Record<string, unknown>,\n THelper = unknown,\n> {\n /**\n * Namespaced codec identifier in format 'namespace/name@version'\n * Examples: 'pg/text@1', 'pg/uuid@1', 'pg/timestamptz@1'\n */\n readonly id: Id;\n\n /**\n * Contract scalar type IDs that this codec can handle.\n * Examples: ['text'], ['int4', 'float8'], ['timestamp', 'timestamptz']\n */\n readonly targetTypes: readonly string[];\n\n /**\n * Optional metadata for database-specific type information.\n * Used for schema introspection and verification.\n */\n readonly meta?: CodecMeta;\n\n /**\n * Optional params schema for parameterized codecs.\n * If provided, typeParams are validated against this schema.\n */\n readonly paramsSchema?: Type<TParams>;\n\n /**\n * Optional init hook for building runtime helper state from validated params.\n *\n * Useful when parameterized types need derived data at runtime, for example:\n * - normalize typeParams into a stable helper shape consumed by lanes/adapters\n * - precompute reusable values once during context creation\n * - avoid repeating typeParams parsing logic during query execution\n *\n * Example:\n * { length: 255 } -> { kind: 'variable', maxLength: 255 }\n *\n * **Convention for JSON/JSONB codecs**: When the helper includes a `validate`\n * property of type `JsonSchemaValidateFn`, the runtime will use it to enforce\n * JSON Schema conformance during encoding and decoding. The property is\n * discovered via duck typing (`helper?.validate`) for flexibility across\n * different codec types.\n */\n readonly init?: (params: TParams) => THelper;\n\n /**\n * Decode a wire value (from database) to JavaScript type.\n * Must be synchronous and pure (no side effects).\n */\n decode(wire: TWire): TJs;\n\n /**\n * Encode a JavaScript value to wire format (for database).\n * Optional - if not provided, values pass through unchanged.\n * Must be synchronous and pure (no side effects).\n */\n encode?(value: TJs): TWire;\n}\n\n/**\n * Registry interface for codecs organized by ID and by contract scalar type.\n *\n * The registry allows looking up codecs by their namespaced ID or by the\n * contract scalar types they handle. Multiple codecs may handle the same\n * scalar type; ordering in byScalar reflects preference (adapter first,\n * then packs, then app overrides).\n */\nexport interface CodecRegistry {\n get(id: string): Codec<string> | undefined;\n has(id: string): boolean;\n getByScalar(scalar: string): readonly Codec<string>[];\n getDefaultCodec(scalar: string): Codec<string> | undefined;\n register(codec: Codec<string>): void;\n [Symbol.iterator](): Iterator<Codec<string>>;\n values(): IterableIterator<Codec<string>>;\n}\n\n/**\n * Implementation of CodecRegistry.\n */\nclass CodecRegistryImpl implements CodecRegistry {\n private readonly _byId = new Map<string, Codec<string>>();\n private readonly _byScalar = new Map<string, Codec<string>[]>();\n\n /**\n * Map-like interface for codec lookup by ID.\n * Example: registry.get('pg/text@1')\n */\n get(id: string): Codec<string> | undefined {\n return this._byId.get(id);\n }\n\n /**\n * Check if a codec with the given ID is registered.\n */\n has(id: string): boolean {\n return this._byId.has(id);\n }\n\n /**\n * Get all codecs that handle a given scalar type.\n * Returns an empty frozen array if no codecs are found.\n * Example: registry.getByScalar('text') → [codec1, codec2, ...]\n */\n getByScalar(scalar: string): readonly Codec<string>[] {\n return this._byScalar.get(scalar) ?? Object.freeze([]);\n }\n\n /**\n * Get the default codec for a scalar type (first registered codec).\n * Returns undefined if no codec handles this scalar type.\n */\n getDefaultCodec(scalar: string): Codec<string> | undefined {\n const _codecs = this._byScalar.get(scalar);\n return _codecs?.[0];\n }\n\n /**\n * Register a codec in the registry.\n * Throws an error if a codec with the same ID is already registered.\n *\n * @param codec - The codec to register\n * @throws Error if a codec with the same ID already exists\n */\n register(codec: Codec<string>): void {\n if (this._byId.has(codec.id)) {\n throw new Error(`Codec with ID '${codec.id}' is already registered`);\n }\n\n this._byId.set(codec.id, codec);\n\n // Update byScalar mapping\n for (const scalarType of codec.targetTypes) {\n const existing = this._byScalar.get(scalarType);\n if (existing) {\n existing.push(codec);\n } else {\n this._byScalar.set(scalarType, [codec]);\n }\n }\n }\n\n /**\n * Returns an iterator over all registered codecs.\n * Useful for iterating through codecs from another registry.\n */\n *[Symbol.iterator](): Iterator<Codec<string>> {\n for (const codec of this._byId.values()) {\n yield codec;\n }\n }\n\n /**\n * Returns an iterable of all registered codecs.\n */\n values(): IterableIterator<Codec<string>> {\n return this._byId.values();\n }\n}\n\n/**\n * Codec factory - creates a codec with typeId and encode/decode functions.\n */\nexport function codec<\n Id extends string,\n TWire,\n TJs,\n TParams = Record<string, unknown>,\n THelper = unknown,\n>(config: {\n typeId: Id;\n targetTypes: readonly string[];\n encode: (value: TJs) => TWire;\n decode: (wire: TWire) => TJs;\n meta?: CodecMeta;\n paramsSchema?: Type<TParams>;\n init?: (params: TParams) => THelper;\n}): Codec<Id, TWire, TJs, TParams, THelper> {\n return {\n id: config.typeId,\n targetTypes: config.targetTypes,\n ...ifDefined('meta', config.meta),\n ...ifDefined('paramsSchema', config.paramsSchema),\n ...ifDefined('init', config.init),\n encode: config.encode,\n decode: config.decode,\n };\n}\n\n/**\n * Type helpers to extract codec types.\n */\nexport type CodecId<T> =\n T extends Codec<infer Id, unknown, unknown>\n ? Id\n : T extends { readonly id: infer Id }\n ? Id\n : never;\nexport type CodecInput<T> = T extends Codec<string, unknown, infer JsT> ? JsT : never;\nexport type CodecOutput<T> = T extends Codec<string, unknown, infer JsT> ? JsT : never;\n\n/**\n * Type helper to extract codec types from builder instance.\n */\nexport type ExtractCodecTypes<\n ScalarNames extends { readonly [K in keyof ScalarNames]: Codec<string> } = Record<never, never>,\n> = {\n readonly [K in keyof ScalarNames as ScalarNames[K] extends Codec<infer Id, unknown, unknown>\n ? Id\n : never]: {\n readonly input: CodecInput<ScalarNames[K]>;\n readonly output: CodecOutput<ScalarNames[K]>;\n };\n};\n\n/**\n * Type helper to extract data type IDs from builder instance.\n * Uses ExtractCodecTypes which preserves literal types as keys.\n * Since ExtractCodecTypes<Record<K, ScalarNames[K]>> has exactly one key (the Id),\n * we extract it by creating a mapped type that uses the Id as both key and value,\n * then extract the value type. This preserves literal types.\n */\nexport type ExtractDataTypes<\n ScalarNames extends { readonly [K in keyof ScalarNames]: Codec<string> },\n> = {\n readonly [K in keyof ScalarNames]: {\n readonly [Id in keyof ExtractCodecTypes<Record<K, ScalarNames[K]>>]: Id;\n }[keyof ExtractCodecTypes<Record<K, ScalarNames[K]>>];\n};\n\n/**\n * Builder interface for declaring codecs.\n */\nexport interface CodecDefBuilder<\n ScalarNames extends { readonly [K in keyof ScalarNames]: Codec<string> } = Record<never, never>,\n> {\n readonly CodecTypes: ExtractCodecTypes<ScalarNames>;\n\n add<ScalarName extends string, CodecImpl extends Codec<string>>(\n scalarName: ScalarName,\n codecImpl: CodecImpl,\n ): CodecDefBuilder<\n O.Overwrite<ScalarNames, Record<ScalarName, CodecImpl>> & Record<ScalarName, CodecImpl>\n >;\n\n readonly codecDefinitions: {\n readonly [K in keyof ScalarNames]: {\n readonly typeId: ScalarNames[K] extends Codec<infer Id extends string, unknown, unknown>\n ? Id\n : never;\n readonly scalar: K;\n readonly codec: ScalarNames[K];\n readonly input: CodecInput<ScalarNames[K]>;\n readonly output: CodecOutput<ScalarNames[K]>;\n readonly jsType: CodecOutput<ScalarNames[K]>;\n };\n };\n\n readonly dataTypes: {\n readonly [K in keyof ScalarNames]: {\n readonly [Id in keyof ExtractCodecTypes<Record<K, ScalarNames[K]>>]: Id;\n }[keyof ExtractCodecTypes<Record<K, ScalarNames[K]>>];\n };\n}\n\n/**\n * Implementation of CodecDefBuilder.\n */\nclass CodecDefBuilderImpl<\n ScalarNames extends { readonly [K in keyof ScalarNames]: Codec<string> } = Record<never, never>,\n> implements CodecDefBuilder<ScalarNames>\n{\n private readonly _codecs: ScalarNames;\n\n public readonly CodecTypes: ExtractCodecTypes<ScalarNames>;\n public readonly dataTypes: {\n readonly [K in keyof ScalarNames]: {\n readonly [Id in keyof ExtractCodecTypes<Record<K, ScalarNames[K]>>]: Id;\n }[keyof ExtractCodecTypes<Record<K, ScalarNames[K]>>];\n };\n\n constructor(codecs: ScalarNames) {\n this._codecs = codecs;\n\n // Populate CodecTypes from codecs\n const codecTypes: Record<string, { readonly input: unknown; readonly output: unknown }> = {};\n for (const [, codecImpl] of Object.entries(this._codecs)) {\n const codecImplTyped = codecImpl as Codec<string>;\n codecTypes[codecImplTyped.id] = {\n input: undefined as unknown as CodecInput<typeof codecImplTyped>,\n output: undefined as unknown as CodecOutput<typeof codecImplTyped>,\n };\n }\n this.CodecTypes = codecTypes as ExtractCodecTypes<ScalarNames>;\n\n // Populate dataTypes from codecs - extract id property from each codec\n // Build object preserving keys from ScalarNames\n // Type assertion is safe because we know ScalarNames structure matches the return type\n // biome-ignore lint/suspicious/noExplicitAny: dynamic codec mapping requires any\n const dataTypes = {} as any;\n for (const key in this._codecs) {\n if (Object.hasOwn(this._codecs, key)) {\n const codec = this._codecs[key] as Codec<string>;\n dataTypes[key] = codec.id;\n }\n }\n this.dataTypes = dataTypes as {\n readonly [K in keyof ScalarNames]: {\n readonly [Id in keyof ExtractCodecTypes<Record<K, ScalarNames[K]>>]: Id;\n }[keyof ExtractCodecTypes<Record<K, ScalarNames[K]>>];\n };\n }\n\n add<ScalarName extends string, CodecImpl extends Codec<string>>(\n scalarName: ScalarName,\n codecImpl: CodecImpl,\n ): CodecDefBuilder<\n O.Overwrite<ScalarNames, Record<ScalarName, CodecImpl>> & Record<ScalarName, CodecImpl>\n > {\n return new CodecDefBuilderImpl({\n ...this._codecs,\n [scalarName]: codecImpl,\n } as O.Overwrite<ScalarNames, Record<ScalarName, CodecImpl>> & Record<ScalarName, CodecImpl>);\n }\n\n /**\n * Derive codecDefinitions structure.\n */\n get codecDefinitions(): {\n readonly [K in keyof ScalarNames]: {\n readonly typeId: ScalarNames[K] extends Codec<infer Id, unknown, unknown> ? Id : never;\n readonly scalar: K;\n readonly codec: ScalarNames[K];\n readonly input: CodecInput<ScalarNames[K]>;\n readonly output: CodecOutput<ScalarNames[K]>;\n readonly jsType: CodecOutput<ScalarNames[K]>;\n };\n } {\n const result: Record<\n string,\n {\n typeId: string;\n scalar: string;\n codec: Codec;\n input: unknown;\n output: unknown;\n jsType: unknown;\n }\n > = {};\n\n for (const [scalarName, codecImpl] of Object.entries(this._codecs)) {\n const codec = codecImpl as Codec<string>;\n result[scalarName] = {\n typeId: codec.id,\n scalar: scalarName,\n codec: codec,\n input: undefined as unknown as CodecInput<typeof codec>,\n output: undefined as unknown as CodecOutput<typeof codec>,\n jsType: undefined as unknown as CodecOutput<typeof codec>,\n };\n }\n\n return result as {\n readonly [K in keyof ScalarNames]: {\n readonly typeId: ScalarNames[K] extends Codec<infer Id extends string, unknown, unknown>\n ? Id\n : never;\n readonly scalar: K;\n readonly codec: ScalarNames[K];\n readonly input: CodecInput<ScalarNames[K]>;\n readonly output: CodecOutput<ScalarNames[K]>;\n readonly jsType: CodecOutput<ScalarNames[K]>;\n };\n };\n }\n}\n\n/**\n * Create a new codec registry.\n */\nexport function createCodecRegistry(): CodecRegistry {\n return new CodecRegistryImpl();\n}\n\n/**\n * Create a new codec definition builder.\n */\nexport function defineCodecs(): CodecDefBuilder<Record<never, never>> {\n return new CodecDefBuilderImpl({});\n}\n","export function compact<T extends Record<string, unknown>>(o: T): T {\n const out: Record<string, unknown> = {};\n for (const [k, v] of Object.entries(o)) {\n if (v === undefined || v === null) continue;\n if (Array.isArray(v) && v.length === 0) continue;\n out[k] = v;\n }\n return out as T;\n}\n","import type { ColumnRef, LiteralExpr, OperationExpr, ParamRef, TableRef } from './types';\nimport { compact } from './util';\n\nexport function createTableRef(name: string): TableRef {\n return {\n kind: 'table',\n name,\n };\n}\n\nexport function createColumnRef(table: string, column: string): ColumnRef {\n return {\n kind: 'col',\n table,\n column,\n };\n}\n\nexport function createParamRef(index: number, name?: string): ParamRef {\n return compact({\n kind: 'param',\n index,\n name,\n }) as ParamRef;\n}\n\nexport function createOperationExpr(operation: OperationExpr): OperationExpr {\n return operation;\n}\n\nexport function createLiteralExpr(value: unknown): LiteralExpr {\n return {\n kind: 'literal',\n value,\n };\n}\n","import type { ColumnRef, DeleteAst, TableRef, WhereExpr } from './types';\nimport { compact } from './util';\n\nexport interface CreateDeleteAstOptions {\n readonly table: TableRef;\n readonly where: WhereExpr;\n readonly returning?: ReadonlyArray<ColumnRef>;\n}\n\nexport function createDeleteAst(options: CreateDeleteAstOptions): DeleteAst {\n return compact({\n kind: 'delete',\n table: options.table,\n where: options.where,\n returning: options.returning,\n }) as DeleteAst;\n}\n","import type { ColumnRef, InsertAst, ParamRef, TableRef } from './types';\nimport { compact } from './util';\n\nexport interface CreateInsertAstOptions {\n readonly table: TableRef;\n readonly values: Record<string, ColumnRef | ParamRef>;\n readonly returning?: ReadonlyArray<ColumnRef>;\n}\n\nexport function createInsertAst(options: CreateInsertAstOptions): InsertAst {\n return compact({\n kind: 'insert',\n table: options.table,\n values: options.values,\n returning: options.returning,\n }) as InsertAst;\n}\n","import { planInvalid } from '@prisma-next/plan';\nimport type { AnyColumnBuilder, JoinOnBuilder, JoinOnPredicate } from '../types';\nimport { isColumnBuilder } from '../types';\nimport type { ColumnRef, JoinAst, JoinOnExpr, TableRef } from './types';\n\nexport function createJoin(\n joinType: 'inner' | 'left' | 'right' | 'full',\n table: TableRef,\n on: JoinOnExpr,\n): JoinAst {\n return {\n kind: 'join',\n joinType,\n table,\n on,\n };\n}\n\nexport function createJoinOnExpr(left: ColumnRef, right: ColumnRef): JoinOnExpr {\n return {\n kind: 'eqCol',\n left,\n right,\n };\n}\n\nclass JoinOnBuilderImpl implements JoinOnBuilder {\n eqCol(left: AnyColumnBuilder, right: AnyColumnBuilder): JoinOnPredicate {\n if (!left || !isColumnBuilder(left)) {\n throw planInvalid('Join ON left operand must be a column');\n }\n\n if (!right || !isColumnBuilder(right)) {\n throw planInvalid('Join ON right operand must be a column');\n }\n\n // TypeScript can't narrow ColumnBuilder properly, so we assert\n const leftCol = left as unknown as { table: string; column: string };\n const rightCol = right as unknown as { table: string; column: string };\n if (leftCol.table === rightCol.table) {\n throw planInvalid('Self-joins are not supported in MVP');\n }\n\n return {\n kind: 'join-on',\n left: left as AnyColumnBuilder,\n right: right as AnyColumnBuilder,\n };\n }\n}\n\nexport function createJoinOnBuilder(): JoinOnBuilder {\n return new JoinOnBuilderImpl();\n}\n","import type { ColumnRef, Direction, OperationExpr } from './types';\n\nexport function createOrderByItem(\n expr: ColumnRef | OperationExpr,\n dir: 'asc' | 'desc',\n): { expr: ColumnRef | OperationExpr; dir: Direction } {\n return {\n expr,\n dir,\n };\n}\n","import type {\n BinaryExpr,\n BinaryOp,\n ExistsExpr,\n Expression,\n ListLiteralExpr,\n LiteralExpr,\n NullCheckExpr,\n ParamRef,\n SelectAst,\n} from './types';\n\nexport function createBinaryExpr(\n op: BinaryOp,\n left: Expression,\n right: Expression | ParamRef | LiteralExpr | ListLiteralExpr,\n): BinaryExpr {\n return {\n kind: 'bin',\n op,\n left,\n right,\n };\n}\n\nexport function createExistsExpr(not: boolean, subquery: SelectAst): ExistsExpr {\n return {\n kind: 'exists',\n not,\n subquery,\n };\n}\n\nexport function createNullCheckExpr(expr: Expression, isNull: boolean): NullCheckExpr {\n return {\n kind: 'nullCheck',\n expr,\n isNull,\n };\n}\n","import type {\n ColumnRef,\n Direction,\n IncludeAst,\n IncludeRef,\n JoinAst,\n OperationExpr,\n SelectAst,\n TableRef,\n WhereExpr,\n} from './types';\nimport { compact } from './util';\n\nexport interface CreateSelectAstOptions {\n readonly from: TableRef;\n readonly joins?: ReadonlyArray<JoinAst>;\n readonly includes?: ReadonlyArray<IncludeAst>;\n readonly project: ReadonlyArray<{\n alias: string;\n expr: ColumnRef | IncludeRef | OperationExpr;\n }>;\n readonly where?: WhereExpr;\n readonly orderBy?: ReadonlyArray<{ expr: ColumnRef | OperationExpr; dir: Direction }>;\n readonly limit?: number;\n}\n\nexport function createSelectAst(options: CreateSelectAstOptions): SelectAst {\n return compact({\n kind: 'select',\n from: options.from,\n joins: options.joins,\n includes: options.includes,\n project: options.project,\n where: options.where,\n orderBy: options.orderBy,\n limit: options.limit,\n }) as SelectAst;\n}\n","import { type as arktype } from 'arktype';\nimport { codec, defineCodecs } from './codec-types';\n\nexport const SQL_CHAR_CODEC_ID = 'sql/char@1' as const;\nexport const SQL_VARCHAR_CODEC_ID = 'sql/varchar@1' as const;\nexport const SQL_INT_CODEC_ID = 'sql/int@1' as const;\nexport const SQL_FLOAT_CODEC_ID = 'sql/float@1' as const;\n\nconst lengthParamsSchema = arktype({\n length: 'number.integer > 0',\n});\n\ntype LengthTypeHelper = {\n readonly kind: 'fixed' | 'variable';\n readonly maxLength: number;\n};\n\nfunction createLengthTypeHelper(\n kind: LengthTypeHelper['kind'],\n): (params: Record<string, unknown>) => LengthTypeHelper {\n return (params) => ({\n kind,\n maxLength: params['length'] as number,\n });\n}\n\nconst sqlCharCodec = codec<typeof SQL_CHAR_CODEC_ID, string, string>({\n typeId: SQL_CHAR_CODEC_ID,\n targetTypes: ['char'],\n encode: (value: string): string => value,\n decode: (wire: string): string => wire.trimEnd(),\n paramsSchema: lengthParamsSchema,\n init: createLengthTypeHelper('fixed'),\n});\n\nconst sqlVarcharCodec = codec<typeof SQL_VARCHAR_CODEC_ID, string, string>({\n typeId: SQL_VARCHAR_CODEC_ID,\n targetTypes: ['varchar'],\n encode: (value: string): string => value,\n decode: (wire: string): string => wire,\n paramsSchema: lengthParamsSchema,\n init: createLengthTypeHelper('variable'),\n});\n\nconst sqlIntCodec = codec<typeof SQL_INT_CODEC_ID, number, number>({\n typeId: SQL_INT_CODEC_ID,\n targetTypes: ['int'],\n encode: (value) => value,\n decode: (wire) => wire,\n});\n\nconst sqlFloatCodec = codec<typeof SQL_FLOAT_CODEC_ID, number, number>({\n typeId: SQL_FLOAT_CODEC_ID,\n targetTypes: ['float'],\n encode: (value) => value,\n decode: (wire) => wire,\n});\n\nconst codecs = defineCodecs()\n .add('char', sqlCharCodec)\n .add('varchar', sqlVarcharCodec)\n .add('int', sqlIntCodec)\n .add('float', sqlFloatCodec);\n\nexport const sqlCodecDefinitions = codecs.codecDefinitions;\nexport const sqlDataTypes = codecs.dataTypes;\nexport type SqlCodecTypes = typeof codecs.CodecTypes;\n","import type { ReturnSpec } from '@prisma-next/operations';\nimport type { SqlLoweringSpec } from '@prisma-next/sql-operations';\n\n// SQL-specific AST types and supporting types\n// These types are needed by adapters and runtime for SQL query execution\n\nexport type Direction = 'asc' | 'desc';\n\nexport interface TableRef {\n readonly kind: 'table';\n readonly name: string;\n}\n\nexport interface ColumnRef {\n readonly kind: 'col';\n readonly table: string;\n readonly column: string;\n}\n\nexport interface ParamRef {\n readonly kind: 'param';\n readonly index: number;\n readonly name?: string;\n}\n\nexport interface LiteralExpr {\n readonly kind: 'literal';\n readonly value: unknown;\n}\n\nexport interface OperationExpr {\n readonly kind: 'operation';\n readonly method: string;\n readonly forTypeId: string;\n readonly self: Expression;\n readonly args: ReadonlyArray<Expression | ParamRef | LiteralExpr>;\n readonly returns: ReturnSpec;\n readonly lowering: SqlLoweringSpec;\n}\n\n/**\n * Unified expression type - the canonical AST representation for column references\n * and operation expressions. This is what all builders convert to via toExpr().\n */\nexport type Expression = ColumnRef | OperationExpr;\n\n/**\n * Interface for any builder that can produce an Expression.\n * Implemented by ColumnBuilder and ExpressionBuilder.\n */\nexport interface ExpressionSource {\n toExpr(): Expression;\n}\n\nexport function isOperationExpr(expr: Expression): expr is OperationExpr {\n return expr.kind === 'operation';\n}\n\nexport type BinaryOp =\n | 'eq'\n | 'neq'\n | 'gt'\n | 'lt'\n | 'gte'\n | 'lte'\n | 'like'\n | 'ilike'\n | 'in'\n | 'notIn';\n\nexport interface ListLiteralExpr {\n readonly kind: 'listLiteral';\n readonly values: ReadonlyArray<ParamRef | LiteralExpr>;\n}\n\nexport interface BinaryExpr {\n readonly kind: 'bin';\n readonly op: BinaryOp;\n readonly left: Expression;\n readonly right: Expression | ParamRef | LiteralExpr | ListLiteralExpr;\n}\n\nexport interface ExistsExpr {\n readonly kind: 'exists';\n readonly not: boolean;\n readonly subquery: SelectAst;\n}\n\n/**\n * Unary expression for IS NULL / IS NOT NULL checks.\n * Used in WHERE clauses to check for null values.\n */\nexport interface NullCheckExpr {\n readonly kind: 'nullCheck';\n readonly expr: Expression;\n readonly isNull: boolean;\n}\n\nexport interface AndExpr {\n readonly kind: 'and';\n readonly exprs: ReadonlyArray<WhereExpr>;\n}\n\nexport interface OrExpr {\n readonly kind: 'or';\n readonly exprs: ReadonlyArray<WhereExpr>;\n}\n\n/**\n * Union type for WHERE clause expressions.\n */\nexport type WhereExpr = BinaryExpr | ExistsExpr | NullCheckExpr | AndExpr | OrExpr;\n\nexport type JoinOnExpr = {\n readonly kind: 'eqCol';\n readonly left: ColumnRef;\n readonly right: ColumnRef;\n};\n\nexport interface JoinAst {\n readonly kind: 'join';\n readonly joinType: 'inner' | 'left' | 'right' | 'full';\n readonly table: TableRef;\n readonly on: JoinOnExpr;\n}\n\nexport interface IncludeRef {\n readonly kind: 'includeRef';\n readonly alias: string;\n}\n\nexport interface IncludeAst {\n readonly kind: 'includeMany';\n readonly alias: string;\n readonly child: {\n readonly table: TableRef;\n readonly on: JoinOnExpr;\n readonly where?: WhereExpr;\n readonly orderBy?: ReadonlyArray<{ expr: Expression; dir: Direction }>;\n readonly limit?: number;\n readonly project: ReadonlyArray<{ alias: string; expr: Expression }>;\n };\n}\n\nexport interface SelectAst {\n readonly kind: 'select';\n readonly from: TableRef;\n readonly joins?: ReadonlyArray<JoinAst>;\n readonly includes?: ReadonlyArray<IncludeAst>;\n readonly project: ReadonlyArray<{\n alias: string;\n expr: Expression | IncludeRef | LiteralExpr;\n }>;\n readonly where?: WhereExpr;\n readonly orderBy?: ReadonlyArray<{ expr: Expression; dir: Direction }>;\n readonly limit?: number;\n}\n\nexport interface InsertAst {\n readonly kind: 'insert';\n readonly table: TableRef;\n readonly values: Record<string, ColumnRef | ParamRef>;\n readonly returning?: ReadonlyArray<ColumnRef>;\n}\n\nexport interface UpdateAst {\n readonly kind: 'update';\n readonly table: TableRef;\n readonly set: Record<string, ColumnRef | ParamRef>;\n readonly where: WhereExpr;\n readonly returning?: ReadonlyArray<ColumnRef>;\n}\n\nexport interface DeleteAst {\n readonly kind: 'delete';\n readonly table: TableRef;\n readonly where: WhereExpr;\n readonly returning?: ReadonlyArray<ColumnRef>;\n}\n\nexport type QueryAst = SelectAst | InsertAst | UpdateAst | DeleteAst;\n\nexport interface LoweredStatement {\n readonly sql: string;\n readonly params: readonly unknown[];\n readonly annotations?: Record<string, unknown>;\n}\n","import type { ColumnRef, ParamRef, TableRef, UpdateAst, WhereExpr } from './types';\nimport { compact } from './util';\n\nexport interface CreateUpdateAstOptions {\n readonly table: TableRef;\n readonly set: Record<string, ColumnRef | ParamRef>;\n readonly where: WhereExpr;\n readonly returning?: ReadonlyArray<ColumnRef>;\n}\n\nexport function createUpdateAst(options: CreateUpdateAstOptions): UpdateAst {\n return compact({\n kind: 'update',\n table: options.table,\n set: options.set,\n where: options.where,\n returning: options.returning,\n }) as UpdateAst;\n}\n"],"mappings":";;;;;;;;;AAsIA,IAAM,oBAAN,MAAiD;CAC/C,AAAiB,wBAAQ,IAAI,KAA4B;CACzD,AAAiB,4BAAY,IAAI,KAA8B;;;;;CAM/D,IAAI,IAAuC;AACzC,SAAO,KAAK,MAAM,IAAI,GAAG;;;;;CAM3B,IAAI,IAAqB;AACvB,SAAO,KAAK,MAAM,IAAI,GAAG;;;;;;;CAQ3B,YAAY,QAA0C;AACpD,SAAO,KAAK,UAAU,IAAI,OAAO,IAAI,OAAO,OAAO,EAAE,CAAC;;;;;;CAOxD,gBAAgB,QAA2C;AAEzD,SADgB,KAAK,UAAU,IAAI,OAAO,GACzB;;;;;;;;;CAUnB,SAAS,SAA4B;AACnC,MAAI,KAAK,MAAM,IAAIA,QAAM,GAAG,CAC1B,OAAM,IAAI,MAAM,kBAAkBA,QAAM,GAAG,yBAAyB;AAGtE,OAAK,MAAM,IAAIA,QAAM,IAAIA,QAAM;AAG/B,OAAK,MAAM,cAAcA,QAAM,aAAa;GAC1C,MAAM,WAAW,KAAK,UAAU,IAAI,WAAW;AAC/C,OAAI,SACF,UAAS,KAAKA,QAAM;OAEpB,MAAK,UAAU,IAAI,YAAY,CAACA,QAAM,CAAC;;;;;;;CAS7C,EAAE,OAAO,YAAqC;AAC5C,OAAK,MAAMA,WAAS,KAAK,MAAM,QAAQ,CACrC,OAAMA;;;;;CAOV,SAA0C;AACxC,SAAO,KAAK,MAAM,QAAQ;;;;;;AAO9B,SAAgB,MAMd,QAQ0C;AAC1C,QAAO;EACL,IAAI,OAAO;EACX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,SAAS,SAAS;CACnB,CAAC;AAEF,MAAM,SAAS,cAAc,CAC1B,IAAI,QAAQ,aAAa,CACzB,IAAI,WAAW,gBAAgB,CAC/B,IAAI,OAAO,YAAY,CACvB,IAAI,SAAS,cAAc;AAE9B,MAAa,sBAAsB,OAAO;AAC1C,MAAa,eAAe,OAAO;;;;ACXnC,SAAgB,gBAAgB,MAAyC;AACvE,QAAO,KAAK,SAAS;;;;;AC7CvB,SAAgB,gBAAgB,SAA4C;AAC1E,QAAO,QAAQ;EACb,MAAM;EACN,OAAO,QAAQ;EACf,KAAK,QAAQ;EACb,OAAO,QAAQ;EACf,WAAW,QAAQ;EACpB,CAAC"}
|
|
1
|
+
{"version":3,"file":"ast.mjs","names":["codec","codecs","codecTypes: Record<string, { readonly input: unknown; readonly output: unknown }>","result: Record<\n string,\n {\n typeId: string;\n scalar: string;\n codec: Codec;\n input: unknown;\n output: unknown;\n jsType: unknown;\n }\n >","out: Record<string, unknown>","arktype"],"sources":["../../src/ast/codec-types.ts","../../src/ast/util.ts","../../src/ast/common.ts","../../src/ast/delete.ts","../../src/ast/insert.ts","../../src/ast/join.ts","../../src/ast/order.ts","../../src/ast/predicate.ts","../../src/ast/select.ts","../../src/ast/sql-codecs.ts","../../src/ast/types.ts","../../src/ast/update.ts"],"sourcesContent":["import { ifDefined } from '@prisma-next/utils/defined';\nimport type { Type } from 'arktype';\nimport type { O } from 'ts-toolbelt';\n\n/**\n * Descriptor for parameterized codecs that require type parameter validation.\n * Shared between adapter (compile-time) and runtime layers to avoid duplication.\n *\n * @template TParams - The shape of the type parameters (e.g., `{ length: number }`)\n * @template THelper - The type returned by the optional `init` hook\n */\nexport interface CodecParamsDescriptor<TParams = Record<string, unknown>, THelper = unknown> {\n /** The codec ID this descriptor applies to (e.g., 'pg/vector@1') */\n readonly codecId: string;\n\n /**\n * Arktype schema for validating typeParams.\n * Used to validate both storage.types entries and inline column typeParams.\n */\n readonly paramsSchema: Type<TParams>;\n\n /**\n * Optional init hook called during runtime context creation.\n * Receives validated params and returns a helper object to be stored in context.types.\n * If not provided, the validated params are stored directly.\n */\n readonly init?: (params: TParams) => THelper;\n}\n\n/**\n * Codec metadata for database-specific type information.\n * Used for schema introspection and verification.\n */\nexport interface CodecMeta {\n readonly db?: {\n readonly sql?: {\n readonly postgres?: {\n readonly nativeType: string; // e.g. 'integer', 'text', 'vector', 'timestamp with time zone'\n };\n };\n };\n}\n\n/**\n * Codec interface for encoding/decoding values between wire format and JavaScript types.\n *\n * Codecs are pure, synchronous functions with no side effects or IO.\n * They provide deterministic conversion between database wire types and JS values.\n */\nexport interface Codec<\n Id extends string = string,\n TWire = unknown,\n TJs = unknown,\n TParams = Record<string, unknown>,\n THelper = unknown,\n> {\n /**\n * Namespaced codec identifier in format 'namespace/name@version'\n * Examples: 'pg/text@1', 'pg/uuid@1', 'pg/timestamptz@1'\n */\n readonly id: Id;\n\n /**\n * Contract scalar type IDs that this codec can handle.\n * Examples: ['text'], ['int4', 'float8'], ['timestamp', 'timestamptz']\n */\n readonly targetTypes: readonly string[];\n\n /**\n * Optional metadata for database-specific type information.\n * Used for schema introspection and verification.\n */\n readonly meta?: CodecMeta;\n\n /**\n * Optional params schema for parameterized codecs.\n * If provided, typeParams are validated against this schema.\n */\n readonly paramsSchema?: Type<TParams>;\n\n /**\n * Optional init hook for building runtime helper state from validated params.\n *\n * Useful when parameterized types need derived data at runtime, for example:\n * - normalize typeParams into a stable helper shape consumed by lanes/adapters\n * - precompute reusable values once during context creation\n * - avoid repeating typeParams parsing logic during query execution\n *\n * Example:\n * { length: 255 } -> { kind: 'variable', maxLength: 255 }\n *\n * **Convention for JSON/JSONB codecs**: When the helper includes a `validate`\n * property of type `JsonSchemaValidateFn`, the runtime will use it to enforce\n * JSON Schema conformance during encoding and decoding. The property is\n * discovered via duck typing (`helper?.validate`) for flexibility across\n * different codec types.\n */\n readonly init?: (params: TParams) => THelper;\n\n /**\n * Decode a wire value (from database) to JavaScript type.\n * Must be synchronous and pure (no side effects).\n */\n decode(wire: TWire): TJs;\n\n /**\n * Encode a JavaScript value to wire format (for database).\n * Optional - if not provided, values pass through unchanged.\n * Must be synchronous and pure (no side effects).\n */\n encode?(value: TJs): TWire;\n}\n\n/**\n * Registry interface for codecs organized by ID and by contract scalar type.\n *\n * The registry allows looking up codecs by their namespaced ID or by the\n * contract scalar types they handle. Multiple codecs may handle the same\n * scalar type; ordering in byScalar reflects preference (adapter first,\n * then packs, then app overrides).\n */\nexport interface CodecRegistry {\n get(id: string): Codec<string> | undefined;\n has(id: string): boolean;\n getByScalar(scalar: string): readonly Codec<string>[];\n getDefaultCodec(scalar: string): Codec<string> | undefined;\n register(codec: Codec<string>): void;\n [Symbol.iterator](): Iterator<Codec<string>>;\n values(): IterableIterator<Codec<string>>;\n}\n\n/**\n * Implementation of CodecRegistry.\n */\nclass CodecRegistryImpl implements CodecRegistry {\n private readonly _byId = new Map<string, Codec<string>>();\n private readonly _byScalar = new Map<string, Codec<string>[]>();\n\n /**\n * Map-like interface for codec lookup by ID.\n * Example: registry.get('pg/text@1')\n */\n get(id: string): Codec<string> | undefined {\n return this._byId.get(id);\n }\n\n /**\n * Check if a codec with the given ID is registered.\n */\n has(id: string): boolean {\n return this._byId.has(id);\n }\n\n /**\n * Get all codecs that handle a given scalar type.\n * Returns an empty frozen array if no codecs are found.\n * Example: registry.getByScalar('text') → [codec1, codec2, ...]\n */\n getByScalar(scalar: string): readonly Codec<string>[] {\n return this._byScalar.get(scalar) ?? Object.freeze([]);\n }\n\n /**\n * Get the default codec for a scalar type (first registered codec).\n * Returns undefined if no codec handles this scalar type.\n */\n getDefaultCodec(scalar: string): Codec<string> | undefined {\n const _codecs = this._byScalar.get(scalar);\n return _codecs?.[0];\n }\n\n /**\n * Register a codec in the registry.\n * Throws an error if a codec with the same ID is already registered.\n *\n * @param codec - The codec to register\n * @throws Error if a codec with the same ID already exists\n */\n register(codec: Codec<string>): void {\n if (this._byId.has(codec.id)) {\n throw new Error(`Codec with ID '${codec.id}' is already registered`);\n }\n\n this._byId.set(codec.id, codec);\n\n // Update byScalar mapping\n for (const scalarType of codec.targetTypes) {\n const existing = this._byScalar.get(scalarType);\n if (existing) {\n existing.push(codec);\n } else {\n this._byScalar.set(scalarType, [codec]);\n }\n }\n }\n\n /**\n * Returns an iterator over all registered codecs.\n * Useful for iterating through codecs from another registry.\n */\n *[Symbol.iterator](): Iterator<Codec<string>> {\n for (const codec of this._byId.values()) {\n yield codec;\n }\n }\n\n /**\n * Returns an iterable of all registered codecs.\n */\n values(): IterableIterator<Codec<string>> {\n return this._byId.values();\n }\n}\n\n/**\n * Codec factory - creates a codec with typeId and encode/decode functions.\n */\nexport function codec<\n Id extends string,\n TWire,\n TJs,\n TParams = Record<string, unknown>,\n THelper = unknown,\n>(config: {\n typeId: Id;\n targetTypes: readonly string[];\n encode: (value: TJs) => TWire;\n decode: (wire: TWire) => TJs;\n meta?: CodecMeta;\n paramsSchema?: Type<TParams>;\n init?: (params: TParams) => THelper;\n}): Codec<Id, TWire, TJs, TParams, THelper> {\n return {\n id: config.typeId,\n targetTypes: config.targetTypes,\n ...ifDefined('meta', config.meta),\n ...ifDefined('paramsSchema', config.paramsSchema),\n ...ifDefined('init', config.init),\n encode: config.encode,\n decode: config.decode,\n };\n}\n\n/**\n * Type helpers to extract codec types.\n */\nexport type CodecId<T> =\n T extends Codec<infer Id, unknown, unknown>\n ? Id\n : T extends { readonly id: infer Id }\n ? Id\n : never;\nexport type CodecInput<T> = T extends Codec<string, unknown, infer JsT> ? JsT : never;\nexport type CodecOutput<T> = T extends Codec<string, unknown, infer JsT> ? JsT : never;\n\n/**\n * Type helper to extract codec types from builder instance.\n */\nexport type ExtractCodecTypes<\n ScalarNames extends { readonly [K in keyof ScalarNames]: Codec<string> } = Record<never, never>,\n> = {\n readonly [K in keyof ScalarNames as ScalarNames[K] extends Codec<infer Id, unknown, unknown>\n ? Id\n : never]: {\n readonly input: CodecInput<ScalarNames[K]>;\n readonly output: CodecOutput<ScalarNames[K]>;\n };\n};\n\n/**\n * Type helper to extract data type IDs from builder instance.\n * Uses ExtractCodecTypes which preserves literal types as keys.\n * Since ExtractCodecTypes<Record<K, ScalarNames[K]>> has exactly one key (the Id),\n * we extract it by creating a mapped type that uses the Id as both key and value,\n * then extract the value type. This preserves literal types.\n */\nexport type ExtractDataTypes<\n ScalarNames extends { readonly [K in keyof ScalarNames]: Codec<string> },\n> = {\n readonly [K in keyof ScalarNames]: {\n readonly [Id in keyof ExtractCodecTypes<Record<K, ScalarNames[K]>>]: Id;\n }[keyof ExtractCodecTypes<Record<K, ScalarNames[K]>>];\n};\n\n/**\n * Builder interface for declaring codecs.\n */\nexport interface CodecDefBuilder<\n ScalarNames extends { readonly [K in keyof ScalarNames]: Codec<string> } = Record<never, never>,\n> {\n readonly CodecTypes: ExtractCodecTypes<ScalarNames>;\n\n add<ScalarName extends string, CodecImpl extends Codec<string>>(\n scalarName: ScalarName,\n codecImpl: CodecImpl,\n ): CodecDefBuilder<\n O.Overwrite<ScalarNames, Record<ScalarName, CodecImpl>> & Record<ScalarName, CodecImpl>\n >;\n\n readonly codecDefinitions: {\n readonly [K in keyof ScalarNames]: {\n readonly typeId: ScalarNames[K] extends Codec<infer Id extends string, unknown, unknown>\n ? Id\n : never;\n readonly scalar: K;\n readonly codec: ScalarNames[K];\n readonly input: CodecInput<ScalarNames[K]>;\n readonly output: CodecOutput<ScalarNames[K]>;\n readonly jsType: CodecOutput<ScalarNames[K]>;\n };\n };\n\n readonly dataTypes: {\n readonly [K in keyof ScalarNames]: {\n readonly [Id in keyof ExtractCodecTypes<Record<K, ScalarNames[K]>>]: Id;\n }[keyof ExtractCodecTypes<Record<K, ScalarNames[K]>>];\n };\n}\n\n/**\n * Implementation of CodecDefBuilder.\n */\nclass CodecDefBuilderImpl<\n ScalarNames extends { readonly [K in keyof ScalarNames]: Codec<string> } = Record<never, never>,\n> implements CodecDefBuilder<ScalarNames>\n{\n private readonly _codecs: ScalarNames;\n\n public readonly CodecTypes: ExtractCodecTypes<ScalarNames>;\n public readonly dataTypes: {\n readonly [K in keyof ScalarNames]: {\n readonly [Id in keyof ExtractCodecTypes<Record<K, ScalarNames[K]>>]: Id;\n }[keyof ExtractCodecTypes<Record<K, ScalarNames[K]>>];\n };\n\n constructor(codecs: ScalarNames) {\n this._codecs = codecs;\n\n // Populate CodecTypes from codecs\n const codecTypes: Record<string, { readonly input: unknown; readonly output: unknown }> = {};\n for (const [, codecImpl] of Object.entries(this._codecs)) {\n const codecImplTyped = codecImpl as Codec<string>;\n codecTypes[codecImplTyped.id] = {\n input: undefined as unknown as CodecInput<typeof codecImplTyped>,\n output: undefined as unknown as CodecOutput<typeof codecImplTyped>,\n };\n }\n this.CodecTypes = codecTypes as ExtractCodecTypes<ScalarNames>;\n\n // Populate dataTypes from codecs - extract id property from each codec\n // Build object preserving keys from ScalarNames\n // Type assertion is safe because we know ScalarNames structure matches the return type\n // biome-ignore lint/suspicious/noExplicitAny: dynamic codec mapping requires any\n const dataTypes = {} as any;\n for (const key in this._codecs) {\n if (Object.hasOwn(this._codecs, key)) {\n const codec = this._codecs[key] as Codec<string>;\n dataTypes[key] = codec.id;\n }\n }\n this.dataTypes = dataTypes as {\n readonly [K in keyof ScalarNames]: {\n readonly [Id in keyof ExtractCodecTypes<Record<K, ScalarNames[K]>>]: Id;\n }[keyof ExtractCodecTypes<Record<K, ScalarNames[K]>>];\n };\n }\n\n add<ScalarName extends string, CodecImpl extends Codec<string>>(\n scalarName: ScalarName,\n codecImpl: CodecImpl,\n ): CodecDefBuilder<\n O.Overwrite<ScalarNames, Record<ScalarName, CodecImpl>> & Record<ScalarName, CodecImpl>\n > {\n return new CodecDefBuilderImpl({\n ...this._codecs,\n [scalarName]: codecImpl,\n } as O.Overwrite<ScalarNames, Record<ScalarName, CodecImpl>> & Record<ScalarName, CodecImpl>);\n }\n\n /**\n * Derive codecDefinitions structure.\n */\n get codecDefinitions(): {\n readonly [K in keyof ScalarNames]: {\n readonly typeId: ScalarNames[K] extends Codec<infer Id, unknown, unknown> ? Id : never;\n readonly scalar: K;\n readonly codec: ScalarNames[K];\n readonly input: CodecInput<ScalarNames[K]>;\n readonly output: CodecOutput<ScalarNames[K]>;\n readonly jsType: CodecOutput<ScalarNames[K]>;\n };\n } {\n const result: Record<\n string,\n {\n typeId: string;\n scalar: string;\n codec: Codec;\n input: unknown;\n output: unknown;\n jsType: unknown;\n }\n > = {};\n\n for (const [scalarName, codecImpl] of Object.entries(this._codecs)) {\n const codec = codecImpl as Codec<string>;\n result[scalarName] = {\n typeId: codec.id,\n scalar: scalarName,\n codec: codec,\n input: undefined as unknown as CodecInput<typeof codec>,\n output: undefined as unknown as CodecOutput<typeof codec>,\n jsType: undefined as unknown as CodecOutput<typeof codec>,\n };\n }\n\n return result as {\n readonly [K in keyof ScalarNames]: {\n readonly typeId: ScalarNames[K] extends Codec<infer Id extends string, unknown, unknown>\n ? Id\n : never;\n readonly scalar: K;\n readonly codec: ScalarNames[K];\n readonly input: CodecInput<ScalarNames[K]>;\n readonly output: CodecOutput<ScalarNames[K]>;\n readonly jsType: CodecOutput<ScalarNames[K]>;\n };\n };\n }\n}\n\n/**\n * Create a new codec registry.\n */\nexport function createCodecRegistry(): CodecRegistry {\n return new CodecRegistryImpl();\n}\n\n/**\n * Create a new codec definition builder.\n */\nexport function defineCodecs(): CodecDefBuilder<Record<never, never>> {\n return new CodecDefBuilderImpl({});\n}\n","export function compact<T extends Record<string, unknown>>(o: T): T {\n const out: Record<string, unknown> = {};\n for (const [k, v] of Object.entries(o)) {\n if (v === undefined || v === null) continue;\n if (Array.isArray(v) && v.length === 0) continue;\n out[k] = v;\n }\n return out as T;\n}\n","import type { ColumnRef, LiteralExpr, OperationExpr, ParamRef, TableRef } from './types';\nimport { compact } from './util';\n\nexport function createTableRef(name: string): TableRef {\n return {\n kind: 'table',\n name,\n };\n}\n\nexport function createColumnRef(table: string, column: string): ColumnRef {\n return {\n kind: 'col',\n table,\n column,\n };\n}\n\nexport function createParamRef(index: number, name?: string): ParamRef {\n return compact({\n kind: 'param',\n index,\n name,\n }) as ParamRef;\n}\n\nexport function createOperationExpr(operation: OperationExpr): OperationExpr {\n return operation;\n}\n\nexport function createLiteralExpr(value: unknown): LiteralExpr {\n return {\n kind: 'literal',\n value,\n };\n}\n","import type { ColumnRef, DeleteAst, TableRef, WhereExpr } from './types';\nimport { compact } from './util';\n\nexport interface CreateDeleteAstOptions {\n readonly table: TableRef;\n readonly where: WhereExpr;\n readonly returning?: ReadonlyArray<ColumnRef>;\n}\n\nexport function createDeleteAst(options: CreateDeleteAstOptions): DeleteAst {\n return compact({\n kind: 'delete',\n table: options.table,\n where: options.where,\n returning: options.returning,\n }) as DeleteAst;\n}\n","import type { ColumnRef, InsertAst, ParamRef, TableRef } from './types';\nimport { compact } from './util';\n\nexport interface CreateInsertAstOptions {\n readonly table: TableRef;\n readonly values: Record<string, ColumnRef | ParamRef>;\n readonly returning?: ReadonlyArray<ColumnRef>;\n}\n\nexport function createInsertAst(options: CreateInsertAstOptions): InsertAst {\n return compact({\n kind: 'insert',\n table: options.table,\n values: options.values,\n returning: options.returning,\n }) as InsertAst;\n}\n","import { planInvalid } from '@prisma-next/plan';\nimport type { AnyColumnBuilder, JoinOnBuilder, JoinOnPredicate } from '../types';\nimport { isColumnBuilder } from '../types';\nimport type { ColumnRef, JoinAst, JoinOnExpr, TableRef } from './types';\n\nexport function createJoin(\n joinType: 'inner' | 'left' | 'right' | 'full',\n table: TableRef,\n on: JoinOnExpr,\n): JoinAst {\n return {\n kind: 'join',\n joinType,\n table,\n on,\n };\n}\n\nexport function createJoinOnExpr(left: ColumnRef, right: ColumnRef): JoinOnExpr {\n return {\n kind: 'eqCol',\n left,\n right,\n };\n}\n\nclass JoinOnBuilderImpl implements JoinOnBuilder {\n eqCol(left: AnyColumnBuilder, right: AnyColumnBuilder): JoinOnPredicate {\n if (!left || !isColumnBuilder(left)) {\n throw planInvalid('Join ON left operand must be a column');\n }\n\n if (!right || !isColumnBuilder(right)) {\n throw planInvalid('Join ON right operand must be a column');\n }\n\n // TypeScript can't narrow ColumnBuilder properly, so we assert\n const leftCol = left as unknown as { table: string; column: string };\n const rightCol = right as unknown as { table: string; column: string };\n if (leftCol.table === rightCol.table) {\n throw planInvalid('Self-joins are not supported in MVP');\n }\n\n return {\n kind: 'join-on',\n left: left as AnyColumnBuilder,\n right: right as AnyColumnBuilder,\n };\n }\n}\n\nexport function createJoinOnBuilder(): JoinOnBuilder {\n return new JoinOnBuilderImpl();\n}\n","import type { ColumnRef, Direction, OperationExpr } from './types';\n\nexport function createOrderByItem(\n expr: ColumnRef | OperationExpr,\n dir: 'asc' | 'desc',\n): { expr: ColumnRef | OperationExpr; dir: Direction } {\n return {\n expr,\n dir,\n };\n}\n","import type {\n BinaryExpr,\n BinaryOp,\n ExistsExpr,\n Expression,\n ListLiteralExpr,\n LiteralExpr,\n NullCheckExpr,\n ParamRef,\n SelectAst,\n} from './types';\n\nexport function createBinaryExpr(\n op: BinaryOp,\n left: Expression,\n right: Expression | ParamRef | LiteralExpr | ListLiteralExpr,\n): BinaryExpr {\n return {\n kind: 'bin',\n op,\n left,\n right,\n };\n}\n\nexport function createExistsExpr(not: boolean, subquery: SelectAst): ExistsExpr {\n return {\n kind: 'exists',\n not,\n subquery,\n };\n}\n\nexport function createNullCheckExpr(expr: Expression, isNull: boolean): NullCheckExpr {\n return {\n kind: 'nullCheck',\n expr,\n isNull,\n };\n}\n","import type {\n ColumnRef,\n Direction,\n IncludeAst,\n IncludeRef,\n JoinAst,\n OperationExpr,\n SelectAst,\n TableRef,\n WhereExpr,\n} from './types';\nimport { compact } from './util';\n\nexport interface CreateSelectAstOptions {\n readonly from: TableRef;\n readonly joins?: ReadonlyArray<JoinAst>;\n readonly includes?: ReadonlyArray<IncludeAst>;\n readonly project: ReadonlyArray<{\n alias: string;\n expr: ColumnRef | IncludeRef | OperationExpr;\n }>;\n readonly where?: WhereExpr;\n readonly orderBy?: ReadonlyArray<{ expr: ColumnRef | OperationExpr; dir: Direction }>;\n readonly limit?: number;\n readonly selectAllIntent?: { table?: string };\n}\n\nexport function createSelectAst(options: CreateSelectAstOptions): SelectAst {\n return compact({\n kind: 'select',\n from: options.from,\n joins: options.joins,\n includes: options.includes,\n project: options.project,\n where: options.where,\n orderBy: options.orderBy,\n limit: options.limit,\n selectAllIntent: options.selectAllIntent,\n }) as SelectAst;\n}\n","import { type as arktype } from 'arktype';\nimport { codec, defineCodecs } from './codec-types';\n\nexport const SQL_CHAR_CODEC_ID = 'sql/char@1' as const;\nexport const SQL_VARCHAR_CODEC_ID = 'sql/varchar@1' as const;\nexport const SQL_INT_CODEC_ID = 'sql/int@1' as const;\nexport const SQL_FLOAT_CODEC_ID = 'sql/float@1' as const;\n\nconst lengthParamsSchema = arktype({\n length: 'number.integer > 0',\n});\n\ntype LengthTypeHelper = {\n readonly kind: 'fixed' | 'variable';\n readonly maxLength: number;\n};\n\nfunction createLengthTypeHelper(\n kind: LengthTypeHelper['kind'],\n): (params: Record<string, unknown>) => LengthTypeHelper {\n return (params) => ({\n kind,\n maxLength: params['length'] as number,\n });\n}\n\nconst sqlCharCodec = codec<typeof SQL_CHAR_CODEC_ID, string, string>({\n typeId: SQL_CHAR_CODEC_ID,\n targetTypes: ['char'],\n encode: (value: string): string => value,\n decode: (wire: string): string => wire.trimEnd(),\n paramsSchema: lengthParamsSchema,\n init: createLengthTypeHelper('fixed'),\n});\n\nconst sqlVarcharCodec = codec<typeof SQL_VARCHAR_CODEC_ID, string, string>({\n typeId: SQL_VARCHAR_CODEC_ID,\n targetTypes: ['varchar'],\n encode: (value: string): string => value,\n decode: (wire: string): string => wire,\n paramsSchema: lengthParamsSchema,\n init: createLengthTypeHelper('variable'),\n});\n\nconst sqlIntCodec = codec<typeof SQL_INT_CODEC_ID, number, number>({\n typeId: SQL_INT_CODEC_ID,\n targetTypes: ['int'],\n encode: (value) => value,\n decode: (wire) => wire,\n});\n\nconst sqlFloatCodec = codec<typeof SQL_FLOAT_CODEC_ID, number, number>({\n typeId: SQL_FLOAT_CODEC_ID,\n targetTypes: ['float'],\n encode: (value) => value,\n decode: (wire) => wire,\n});\n\nconst codecs = defineCodecs()\n .add('char', sqlCharCodec)\n .add('varchar', sqlVarcharCodec)\n .add('int', sqlIntCodec)\n .add('float', sqlFloatCodec);\n\nexport const sqlCodecDefinitions = codecs.codecDefinitions;\nexport const sqlDataTypes = codecs.dataTypes;\nexport type SqlCodecTypes = typeof codecs.CodecTypes;\n","import type { ReturnSpec } from '@prisma-next/operations';\nimport type { SqlLoweringSpec } from '@prisma-next/sql-operations';\n\n// SQL-specific AST types and supporting types\n// These types are needed by adapters and runtime for SQL query execution\n\nexport type Direction = 'asc' | 'desc';\n\nexport interface TableRef {\n readonly kind: 'table';\n readonly name: string;\n}\n\nexport interface ColumnRef {\n readonly kind: 'col';\n readonly table: string;\n readonly column: string;\n}\n\nexport interface ParamRef {\n readonly kind: 'param';\n readonly index: number;\n readonly name?: string;\n}\n\nexport interface LiteralExpr {\n readonly kind: 'literal';\n readonly value: unknown;\n}\n\nexport interface OperationExpr {\n readonly kind: 'operation';\n readonly method: string;\n readonly forTypeId: string;\n readonly self: Expression;\n readonly args: ReadonlyArray<Expression | ParamRef | LiteralExpr>;\n readonly returns: ReturnSpec;\n readonly lowering: SqlLoweringSpec;\n}\n\n/**\n * Unified expression type - the canonical AST representation for column references\n * and operation expressions. This is what all builders convert to via toExpr().\n */\nexport type Expression = ColumnRef | OperationExpr;\n\n/**\n * Interface for any builder that can produce an Expression.\n * Implemented by ColumnBuilder and ExpressionBuilder.\n */\nexport interface ExpressionSource {\n toExpr(): Expression;\n}\n\nexport function isOperationExpr(expr: Expression): expr is OperationExpr {\n return expr.kind === 'operation';\n}\n\nexport type BinaryOp =\n | 'eq'\n | 'neq'\n | 'gt'\n | 'lt'\n | 'gte'\n | 'lte'\n | 'like'\n | 'ilike'\n | 'in'\n | 'notIn';\n\nexport interface BinaryExpr {\n readonly kind: 'bin';\n readonly op: BinaryOp;\n readonly left: Expression;\n readonly right: Expression | ParamRef | LiteralExpr | ListLiteralExpr;\n}\n\nexport interface ListLiteralExpr {\n readonly kind: 'listLiteral';\n readonly values: ReadonlyArray<ParamRef | LiteralExpr>;\n}\n\nexport interface AndExpr {\n readonly kind: 'and';\n readonly exprs: ReadonlyArray<WhereExpr>;\n}\n\nexport interface OrExpr {\n readonly kind: 'or';\n readonly exprs: ReadonlyArray<WhereExpr>;\n}\n\nexport interface ExistsExpr {\n readonly kind: 'exists';\n readonly not: boolean;\n readonly subquery: SelectAst;\n}\n\n/**\n * Unary expression for IS NULL / IS NOT NULL checks.\n * Used in WHERE clauses to check for null values.\n */\nexport interface NullCheckExpr {\n readonly kind: 'nullCheck';\n readonly expr: Expression;\n readonly isNull: boolean;\n}\n\n/**\n * Union type for WHERE clause expressions.\n */\nexport type WhereExpr = BinaryExpr | ExistsExpr | NullCheckExpr | AndExpr | OrExpr;\n\nexport type JoinOnExpr =\n | {\n readonly kind: 'eqCol';\n readonly left: ColumnRef;\n readonly right: ColumnRef;\n }\n | WhereExpr;\n\nexport interface JoinAst {\n readonly kind: 'join';\n readonly joinType: 'inner' | 'left' | 'right' | 'full';\n readonly table: TableRef;\n readonly on: JoinOnExpr;\n}\n\nexport interface IncludeRef {\n readonly kind: 'includeRef';\n readonly alias: string;\n}\n\nexport interface IncludeAst {\n readonly kind: 'includeMany';\n readonly alias: string;\n readonly child: {\n readonly table: TableRef;\n readonly on: JoinOnExpr;\n readonly where?: WhereExpr;\n readonly orderBy?: ReadonlyArray<{ expr: Expression; dir: Direction }>;\n readonly limit?: number;\n readonly project: ReadonlyArray<{ alias: string; expr: Expression }>;\n };\n}\n\nexport interface SelectAst {\n readonly kind: 'select';\n readonly from: TableRef;\n readonly joins?: ReadonlyArray<JoinAst>;\n readonly includes?: ReadonlyArray<IncludeAst>;\n readonly project: ReadonlyArray<{\n alias: string;\n expr: Expression | IncludeRef | LiteralExpr;\n }>;\n readonly where?: WhereExpr;\n readonly orderBy?: ReadonlyArray<{ expr: Expression; dir: Direction }>;\n readonly limit?: number;\n readonly selectAllIntent?: { table?: string };\n}\n\nexport interface InsertAst {\n readonly kind: 'insert';\n readonly table: TableRef;\n readonly values: Record<string, ColumnRef | ParamRef>;\n readonly returning?: ReadonlyArray<ColumnRef>;\n}\n\nexport interface UpdateAst {\n readonly kind: 'update';\n readonly table: TableRef;\n readonly set: Record<string, ColumnRef | ParamRef>;\n readonly where?: WhereExpr;\n readonly returning?: ReadonlyArray<ColumnRef>;\n}\n\nexport interface DeleteAst {\n readonly kind: 'delete';\n readonly table: TableRef;\n readonly where?: WhereExpr;\n readonly returning?: ReadonlyArray<ColumnRef>;\n}\n\nexport type QueryAst = SelectAst | InsertAst | UpdateAst | DeleteAst;\n\nexport interface LoweredStatement {\n readonly sql: string;\n readonly params: readonly unknown[];\n readonly annotations?: Record<string, unknown>;\n}\n","import type { ColumnRef, ParamRef, TableRef, UpdateAst, WhereExpr } from './types';\nimport { compact } from './util';\n\nexport interface CreateUpdateAstOptions {\n readonly table: TableRef;\n readonly set: Record<string, ColumnRef | ParamRef>;\n readonly where?: WhereExpr;\n readonly returning?: ReadonlyArray<ColumnRef>;\n}\n\nexport function createUpdateAst(options: CreateUpdateAstOptions): UpdateAst {\n return compact({\n kind: 'update',\n table: options.table,\n set: options.set,\n where: options.where,\n returning: options.returning,\n }) as UpdateAst;\n}\n"],"mappings":";;;;;;;;;AAsIA,IAAM,oBAAN,MAAiD;CAC/C,AAAiB,wBAAQ,IAAI,KAA4B;CACzD,AAAiB,4BAAY,IAAI,KAA8B;;;;;CAM/D,IAAI,IAAuC;AACzC,SAAO,KAAK,MAAM,IAAI,GAAG;;;;;CAM3B,IAAI,IAAqB;AACvB,SAAO,KAAK,MAAM,IAAI,GAAG;;;;;;;CAQ3B,YAAY,QAA0C;AACpD,SAAO,KAAK,UAAU,IAAI,OAAO,IAAI,OAAO,OAAO,EAAE,CAAC;;;;;;CAOxD,gBAAgB,QAA2C;AAEzD,SADgB,KAAK,UAAU,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T,CAAC;AAOF,SAAS,uBACP,MACuD;AACvD,SAAQ,YAAY;EAClB;EACA,WAAW,OAAO;EACnB;;AAGH,MAAM,eAAe,MAAgD;CACnE,QAAQ;CACR,aAAa,CAAC,OAAO;CACrB,SAAS,UAA0B;CACnC,SAAS,SAAyB,KAAK,SAAS;CAChD,cAAc;CACd,MAAM,uBAAuB,QAAQ;CACtC,CAAC;AAEF,MAAM,kBAAkB,MAAmD;CACzE,QAAQ;CACR,aAAa,CAAC,UAAU;CACxB,SAAS,UAA0B;CACnC,SAAS,SAAyB;CAClC,cAAc;CACd,MAAM,uBAAuB,WAAW;CACzC,CAAC;AAEF,MAAM,cAAc,MAA+C;CACjE,QAAQ;CACR,aAAa,CAAC,MAAM;CACpB,SAAS,UAAU;CACnB,SAAS,SAAS;CACnB,CAAC;AAEF,MAAM,gBAAgB,MAAiD;CACrE,QAAQ;CACR,aAAa,CAAC,QAAQ;CACtB,SAAS,UAAU;CACnB,SAAS,SAAS;CACnB,CAAC;AAEF,MAAM,SAAS,cAAc,CAC1B,IAAI,QAAQ,aAAa,CACzB,IAAI,WAAW,gBAAgB,CAC/B,IAAI,OAAO,YAAY,CACvB,IAAI,SAAS,cAAc;AAE9B,MAAa,sBAAsB,OAAO;AAC1C,MAAa,eAAe,OAAO;;;;ACXnC,SAAgB,gBAAgB,MAAyC;AACvE,QAAO,KAAK,SAAS;;;;;AC7CvB,SAAgB,gBAAgB,SAA4C;AAC1E,QAAO,QAAQ;EACb,MAAM;EACN,OAAO,QAAQ;EACf,KAAK,QAAQ;EACb,OAAO,QAAQ;EACf,WAAW,QAAQ;EACpB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../query-lane-context-CgkPuKaR.mjs";
|
|
2
|
-
import "../plan-
|
|
3
|
-
import "../types-
|
|
4
|
-
import { a as getColumnMeta, c as isExpressionBuilder, d as isParamPlaceholder, f as isValueSource, i as getColumnInfo, l as isExpressionSource, n as expressionFromSource, o as getOperationExpr, p as toExpression, r as extractBaseColumnRef, s as isColumnBuilder, t as collectColumnRefs, u as isOperationExpr } from "../guards-
|
|
2
|
+
import "../plan-Oh1MFY8z.mjs";
|
|
3
|
+
import "../types-n9-v4xao.mjs";
|
|
4
|
+
import { a as getColumnMeta, c as isExpressionBuilder, d as isParamPlaceholder, f as isValueSource, i as getColumnInfo, l as isExpressionSource, n as expressionFromSource, o as getOperationExpr, p as toExpression, r as extractBaseColumnRef, s as isColumnBuilder, t as collectColumnRefs, u as isOperationExpr } from "../guards-BsJlVzBS.mjs";
|
|
5
5
|
export { collectColumnRefs, expressionFromSource, extractBaseColumnRef, getColumnInfo, getColumnMeta, getOperationExpr, isColumnBuilder, isExpressionBuilder, isExpressionSource, isOperationExpr, isParamPlaceholder, isValueSource, toExpression };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../query-lane-context-CgkPuKaR.mjs";
|
|
2
|
-
import "../plan-
|
|
3
|
-
import "../types-
|
|
4
|
-
import { t as attachOperationsToColumnBuilder } from "../operations-registry-
|
|
2
|
+
import "../plan-Oh1MFY8z.mjs";
|
|
3
|
+
import "../types-n9-v4xao.mjs";
|
|
4
|
+
import { t as attachOperationsToColumnBuilder } from "../operations-registry-DegkI6a0.mjs";
|
|
5
5
|
export { attachOperationsToColumnBuilder };
|
package/dist/exports/param.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../query-lane-context-CgkPuKaR.mjs";
|
|
2
|
-
import "../plan-
|
|
3
|
-
import "../types-
|
|
4
|
-
import { n as param, t as Parameter } from "../param-
|
|
2
|
+
import "../plan-Oh1MFY8z.mjs";
|
|
3
|
+
import "../types-n9-v4xao.mjs";
|
|
4
|
+
import { n as param, t as Parameter } from "../param-DiyorjKd.mjs";
|
|
5
5
|
export { Parameter, param };
|
package/dist/exports/plan.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as augmentDescriptorWithColumnMeta, t as SqlQueryPlan } from "../plan-
|
|
1
|
+
import { n as augmentDescriptorWithColumnMeta, t as SqlQueryPlan } from "../plan-Oh1MFY8z.mjs";
|
|
2
2
|
export { SqlQueryPlan, augmentDescriptorWithColumnMeta };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../query-lane-context-CgkPuKaR.mjs";
|
|
2
|
-
import "../plan-
|
|
3
|
-
import "../types-
|
|
4
|
-
import { i as schema, n as SchemaHandle, r as TableBuilderImpl, t as ColumnBuilderImpl } from "../schema-
|
|
2
|
+
import "../plan-Oh1MFY8z.mjs";
|
|
3
|
+
import "../types-n9-v4xao.mjs";
|
|
4
|
+
import { i as schema, n as SchemaHandle, r as TableBuilderImpl, t as ColumnBuilderImpl } from "../schema-zFAQbkk1.mjs";
|
|
5
5
|
export { ColumnBuilderImpl as Column, ColumnBuilderImpl, SchemaHandle, TableBuilderImpl as Table, TableBuilderImpl, schema };
|
package/dist/exports/types.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import "../query-lane-context-CgkPuKaR.mjs";
|
|
2
|
-
import "../plan-
|
|
3
|
-
import { A as OperationTypes, B as SqlBuilderOptions, C as Meta, D as NullCheckBuilder, E as NestedProjection, F as RawFunctionOptions, G as TablesOf, H as TableDef, I as RawTemplateFactory, J as createOrderBuilder, K as UnaryBuilder, L as RawTemplateOptions, M as OrderBuilder, N as ParamPlaceholder, O as NullableMethods, P as RawFactory, R as ResultType, S as META, T as ModelMetadata, U as TableKey, V as SqlPlan, W as TableMetadata, Y as isColumnBuilder, _ as InferNestedProjectionRow, a as AnyOrderBuilder, b as JoinOnBuilder, c as BuildOptions, d as ColumnBuilder, f as ColumnsOf, g as HasIncludeManyCapabilities, h as ExpressionBuilder, i as AnyExpressionSource, j as OperationsForTypeId, k as OperationTypeSignature, l as BuildParamsMap, m as Expr, n as AnyColumnBuilder, o as AnyUnaryBuilder, p as ComputeColumnJsType, q as ValueSource, r as AnyColumnBuilderBase, s as BinaryBuilder, t as AnyBinaryBuilder, u as CodecTypes, v as InferProjectionRow, w as ModelDef, x as JoinOnPredicate, y as InferReturningRow, z as RuntimeError } from "../types-
|
|
2
|
+
import "../plan-Oh1MFY8z.mjs";
|
|
3
|
+
import { A as OperationTypes, B as SqlBuilderOptions, C as Meta, D as NullCheckBuilder, E as NestedProjection, F as RawFunctionOptions, G as TablesOf, H as TableDef, I as RawTemplateFactory, J as createOrderBuilder, K as UnaryBuilder, L as RawTemplateOptions, M as OrderBuilder, N as ParamPlaceholder, O as NullableMethods, P as RawFactory, R as ResultType, S as META, T as ModelMetadata, U as TableKey, V as SqlPlan, W as TableMetadata, Y as isColumnBuilder, _ as InferNestedProjectionRow, a as AnyOrderBuilder, b as JoinOnBuilder, c as BuildOptions, d as ColumnBuilder, f as ColumnsOf, g as HasIncludeManyCapabilities, h as ExpressionBuilder, i as AnyExpressionSource, j as OperationsForTypeId, k as OperationTypeSignature, l as BuildParamsMap, m as Expr, n as AnyColumnBuilder, o as AnyUnaryBuilder, p as ComputeColumnJsType, q as ValueSource, r as AnyColumnBuilderBase, s as BinaryBuilder, t as AnyBinaryBuilder, u as CodecTypes, v as InferProjectionRow, w as ModelDef, x as JoinOnPredicate, y as InferReturningRow, z as RuntimeError } from "../types-n9-v4xao.mjs";
|
|
4
4
|
export { AnyBinaryBuilder, AnyColumnBuilder, AnyColumnBuilderBase, AnyExpressionSource, AnyOrderBuilder, AnyUnaryBuilder, BinaryBuilder, BuildOptions, BuildParamsMap, CodecTypes, ColumnBuilder, ColumnsOf, ComputeColumnJsType, Expr, ExpressionBuilder, HasIncludeManyCapabilities, InferNestedProjectionRow, InferProjectionRow, InferReturningRow, JoinOnBuilder, JoinOnPredicate, META, Meta, ModelDef, ModelMetadata, NestedProjection, NullCheckBuilder, NullableMethods, OperationTypeSignature, OperationTypes, OperationsForTypeId, OrderBuilder, ParamPlaceholder, RawFactory, RawFunctionOptions, RawTemplateFactory, RawTemplateOptions, ResultType, RuntimeError, SqlBuilderOptions, SqlPlan, TableDef, TableKey, TableMetadata, TablesOf, UnaryBuilder, ValueSource, createOrderBuilder, isColumnBuilder };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../../query-lane-context-CgkPuKaR.mjs";
|
|
2
|
-
import "../../plan-
|
|
3
|
-
import "../../types-
|
|
4
|
-
import { a as getColumnMeta, c as isExpressionBuilder, d as isParamPlaceholder, f as isValueSource, i as getColumnInfo, l as isExpressionSource, n as expressionFromSource, o as getOperationExpr, p as toExpression, r as extractBaseColumnRef, s as isColumnBuilder, t as collectColumnRefs, u as isOperationExpr } from "../../guards-
|
|
2
|
+
import "../../plan-Oh1MFY8z.mjs";
|
|
3
|
+
import "../../types-n9-v4xao.mjs";
|
|
4
|
+
import { a as getColumnMeta, c as isExpressionBuilder, d as isParamPlaceholder, f as isValueSource, i as getColumnInfo, l as isExpressionSource, n as expressionFromSource, o as getOperationExpr, p as toExpression, r as extractBaseColumnRef, s as isColumnBuilder, t as collectColumnRefs, u as isOperationExpr } from "../../guards-BsJlVzBS.mjs";
|
|
5
5
|
export { collectColumnRefs, expressionFromSource, extractBaseColumnRef, getColumnInfo, getColumnMeta, getOperationExpr, isColumnBuilder, isExpressionBuilder, isExpressionSource, isOperationExpr, isParamPlaceholder, isValueSource, toExpression };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as ParamRef, d as ExpressionSource, o as ColumnRef, u as Expression, v as LiteralExpr, x as OperationExpr } from "./plan-
|
|
2
|
-
import { N as ParamPlaceholder, h as ExpressionBuilder, i as AnyExpressionSource, n as AnyColumnBuilder, q as ValueSource } from "./types-
|
|
1
|
+
import { C as ParamRef, d as ExpressionSource, o as ColumnRef, u as Expression, v as LiteralExpr, x as OperationExpr } from "./plan-Oh1MFY8z.mjs";
|
|
2
|
+
import { N as ParamPlaceholder, h as ExpressionBuilder, i as AnyExpressionSource, n as AnyColumnBuilder, q as ValueSource } from "./types-n9-v4xao.mjs";
|
|
3
3
|
import { StorageColumn } from "@prisma-next/sql-contract/types";
|
|
4
4
|
|
|
5
5
|
//#region src/utils/guards.d.ts
|
|
@@ -84,4 +84,4 @@ declare function isValueSource(value: unknown): value is ValueSource;
|
|
|
84
84
|
declare function getOperationExpr(builder: AnyColumnBuilder | OperationExpr): OperationExpr | undefined;
|
|
85
85
|
//#endregion
|
|
86
86
|
export { getColumnMeta as a, isExpressionBuilder as c, isParamPlaceholder as d, isValueSource as f, getColumnInfo as i, isExpressionSource as l, expressionFromSource as n, getOperationExpr as o, toExpression as p, extractBaseColumnRef as r, isColumnBuilder as s, collectColumnRefs as t, isOperationExpr as u };
|
|
87
|
-
//# sourceMappingURL=guards-
|
|
87
|
+
//# sourceMappingURL=guards-BsJlVzBS.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guards-
|
|
1
|
+
{"version":3,"file":"guards-BsJlVzBS.d.mts","names":[],"sources":["../src/utils/guards.ts"],"sourcesContent":[],"mappings":";;;;;;;;AAsBA;AAYA;AAeA;AAA2C,iBA3B3B,aAAA,CA2B2B,IAAA,EA3BP,mBA2BO,CAAA,EA3Be,aA2Bf,GAAA,SAAA;;;;AAW3B,iBA1BA,kBAAA,CA0BiB,KAAA,EAAA,OAAA,CAAA,EAAA,KAAA,IA1B4B,gBA0B5B;;;;;AAE9B,iBAba,oBAAA,CAab,IAAA,EAbwC,SAaxC,GAboD,aAapD,CAAA,EAboE,SAapE;;AAiBH;;;AAC8C,iBApB9B,iBAAA,CAoB8B,IAAA,EAnBtC,SAmBsC,GAnB1B,QAmB0B,GAnBf,WAmBe,GAnBD,aAmBC,CAAA,EAlB3C,SAkB2C,EAAA;;;AAS9C;AAoBgB,iBA9BA,eAAA,CA8B0C,IAAA,EA7BlD,mBA6BkE,GA7B5C,aA6B4C,GA7B5B,UA6B4B,CAAA,EAAA,IAAA,IA5B/D,aA4B+D;AAY1E;AAYA;AAgBA;AAWA;AAQgB,iBA/EA,aAAA,CA+EwC,IAAA,EA/EpB,mBA+E+B,GA/ET,aA+ES,CAAA,EAAA;EAgBnD,KAAA,EAAA,MAAA;EACL,MAAA,EAAA,MAAA;CAAmB;;;;iBA5Ed,eAAA,2BAA0C;;;;iBAY1C,mBAAA,2BAA8C;;;;iBAY9C,kBAAA,2BAA6C;;;;;;;;iBAgB7C,YAAA,SAAqB,mBAAmB;;;;;;;;iBAWxC,oBAAA,SAA6B,sBAAsB;;;;;iBAQnD,aAAA,2BAAwC;;;;;;;;;;;;;iBAgBxC,gBAAA,UACL,mBAAmB,gBAC3B"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { S as defineCodecs, _ as CodecRegistry, a as JsonSchemaValidationResult, b as codec, c as MutationDefaultsOptions, d as CodecDefBuilder, f as CodecId, g as CodecParamsDescriptor, h as CodecOutput, i as JsonSchemaValidationError, l as TypeHelperRegistry, m as CodecMeta, n as ExecutionContext, o as JsonSchemaValidatorRegistry, p as CodecInput, r as JsonSchemaValidateFn, s as MutationDefaultsOp, t as AppliedMutationDefault, u as Codec, v as ExtractCodecTypes, x as createCodecRegistry, y as ExtractDataTypes } from "./query-lane-context-CgkPuKaR.mjs";
|
|
2
|
-
import { C as ParamRef, D as UpdateAst, E as TableRef, O as WhereExpr, S as OrExpr, T as SelectAst, _ as ListLiteralExpr, a as BinaryOp, b as NullCheckExpr, c as Direction, d as ExpressionSource, f as IncludeAst, g as JoinOnExpr, h as JoinAst, i as BinaryExpr, k as isOperationExpr, l as ExistsExpr, m as InsertAst, n as augmentDescriptorWithColumnMeta, o as ColumnRef, p as IncludeRef, r as AndExpr, s as DeleteAst, t as SqlQueryPlan, u as Expression, v as LiteralExpr, w as QueryAst, x as OperationExpr, y as LoweredStatement } from "./plan-
|
|
3
|
-
import { A as OperationTypes, B as SqlBuilderOptions, C as Meta, D as NullCheckBuilder, E as NestedProjection, F as RawFunctionOptions, G as TablesOf, H as TableDef, I as RawTemplateFactory, J as createOrderBuilder, K as UnaryBuilder, L as RawTemplateOptions, M as OrderBuilder, N as ParamPlaceholder, O as NullableMethods, P as RawFactory, R as ResultType, S as META, T as ModelMetadata, U as TableKey, V as SqlPlan, W as TableMetadata, Y as isColumnBuilder, _ as InferNestedProjectionRow, a as AnyOrderBuilder, b as JoinOnBuilder, c as BuildOptions, d as ColumnBuilder, f as ColumnsOf, g as HasIncludeManyCapabilities, h as ExpressionBuilder, i as AnyExpressionSource, j as OperationsForTypeId, k as OperationTypeSignature, l as BuildParamsMap, m as Expr, n as AnyColumnBuilder, o as AnyUnaryBuilder, p as ComputeColumnJsType, q as ValueSource, r as AnyColumnBuilderBase, s as BinaryBuilder, t as AnyBinaryBuilder, u as CodecTypes, v as InferProjectionRow, w as ModelDef, x as JoinOnPredicate, y as InferReturningRow, z as RuntimeError } from "./types-
|
|
2
|
+
import { C as ParamRef, D as UpdateAst, E as TableRef, O as WhereExpr, S as OrExpr, T as SelectAst, _ as ListLiteralExpr, a as BinaryOp, b as NullCheckExpr, c as Direction, d as ExpressionSource, f as IncludeAst, g as JoinOnExpr, h as JoinAst, i as BinaryExpr, k as isOperationExpr, l as ExistsExpr, m as InsertAst, n as augmentDescriptorWithColumnMeta, o as ColumnRef, p as IncludeRef, r as AndExpr, s as DeleteAst, t as SqlQueryPlan, u as Expression, v as LiteralExpr, w as QueryAst, x as OperationExpr, y as LoweredStatement } from "./plan-Oh1MFY8z.mjs";
|
|
3
|
+
import { A as OperationTypes, B as SqlBuilderOptions, C as Meta, D as NullCheckBuilder, E as NestedProjection, F as RawFunctionOptions, G as TablesOf, H as TableDef, I as RawTemplateFactory, J as createOrderBuilder, K as UnaryBuilder, L as RawTemplateOptions, M as OrderBuilder, N as ParamPlaceholder, O as NullableMethods, P as RawFactory, R as ResultType, S as META, T as ModelMetadata, U as TableKey, V as SqlPlan, W as TableMetadata, Y as isColumnBuilder, _ as InferNestedProjectionRow, a as AnyOrderBuilder, b as JoinOnBuilder, c as BuildOptions, d as ColumnBuilder, f as ColumnsOf, g as HasIncludeManyCapabilities, h as ExpressionBuilder, i as AnyExpressionSource, j as OperationsForTypeId, k as OperationTypeSignature, l as BuildParamsMap, m as Expr, n as AnyColumnBuilder, o as AnyUnaryBuilder, p as ComputeColumnJsType, q as ValueSource, r as AnyColumnBuilderBase, s as BinaryBuilder, t as AnyBinaryBuilder, u as CodecTypes, v as InferProjectionRow, w as ModelDef, x as JoinOnPredicate, y as InferReturningRow, z as RuntimeError } from "./types-n9-v4xao.mjs";
|
|
4
4
|
import { Adapter, AdapterProfile, AdapterTarget, CreateDeleteAstOptions, CreateInsertAstOptions, CreateSelectAstOptions, CreateUpdateAstOptions, LoweredPayload, Lowerer, LowererContext, SQL_CHAR_CODEC_ID, SQL_FLOAT_CODEC_ID, SQL_INT_CODEC_ID, SQL_VARCHAR_CODEC_ID, SqlCodecTypes, SqlConnection, SqlDriver, SqlDriverState, SqlExecuteRequest, SqlExplainResult, SqlQueryResult, SqlQueryable, SqlTransaction, compact, createBinaryExpr, createColumnRef, createDeleteAst, createExistsExpr, createInsertAst, createJoin, createJoinOnBuilder, createJoinOnExpr, createLiteralExpr, createNullCheckExpr, createOperationExpr, createOrderByItem, createParamRef, createSelectAst, createTableRef, createUpdateAst, sqlCodecDefinitions, sqlDataTypes } from "./exports/ast.mjs";
|
|
5
5
|
import { n as planUnsupported, t as planInvalid } from "./errors-DVufq9PT.mjs";
|
|
6
|
-
import { t as attachOperationsToColumnBuilder } from "./operations-registry-
|
|
7
|
-
import { n as param, t as Parameter } from "./param-
|
|
6
|
+
import { t as attachOperationsToColumnBuilder } from "./operations-registry-DegkI6a0.mjs";
|
|
7
|
+
import { n as param, t as Parameter } from "./param-DiyorjKd.mjs";
|
|
8
8
|
import "./exports/plan.mjs";
|
|
9
9
|
import "./exports/query-lane-context.mjs";
|
|
10
|
-
import { i as schema, n as SchemaHandle, r as TableBuilderImpl, t as ColumnBuilderImpl } from "./schema-
|
|
10
|
+
import { i as schema, n as SchemaHandle, r as TableBuilderImpl, t as ColumnBuilderImpl } from "./schema-zFAQbkk1.mjs";
|
|
11
11
|
import "./exports/types.mjs";
|
|
12
12
|
export { Adapter, AdapterProfile, AdapterTarget, AndExpr, AnyBinaryBuilder, AnyColumnBuilder, AnyColumnBuilderBase, AnyExpressionSource, AnyOrderBuilder, AnyUnaryBuilder, AppliedMutationDefault, BinaryBuilder, BinaryExpr, BinaryOp, BuildOptions, BuildParamsMap, Codec, CodecDefBuilder, CodecId, CodecInput, CodecMeta, CodecOutput, CodecParamsDescriptor, CodecRegistry, CodecTypes, ColumnBuilderImpl as Column, ColumnBuilderImpl, ColumnBuilder, ColumnRef, ColumnsOf, ComputeColumnJsType, CreateDeleteAstOptions, CreateInsertAstOptions, CreateSelectAstOptions, CreateUpdateAstOptions, DeleteAst, Direction, ExecutionContext, ExistsExpr, Expr, Expression, ExpressionBuilder, ExpressionSource, ExtractCodecTypes, ExtractDataTypes, HasIncludeManyCapabilities, IncludeAst, IncludeRef, InferNestedProjectionRow, InferProjectionRow, InferReturningRow, InsertAst, JoinAst, JoinOnBuilder, JoinOnExpr, JoinOnPredicate, JsonSchemaValidateFn, JsonSchemaValidationError, JsonSchemaValidationResult, JsonSchemaValidatorRegistry, ListLiteralExpr, LiteralExpr, LoweredPayload, LoweredStatement, Lowerer, LowererContext, META, Meta, ModelDef, ModelMetadata, MutationDefaultsOp, MutationDefaultsOptions, NestedProjection, NullCheckBuilder, NullCheckExpr, NullableMethods, OperationExpr, OperationTypeSignature, OperationTypes, OperationsForTypeId, OrExpr, OrderBuilder, ParamPlaceholder, ParamRef, Parameter, QueryAst, RawFactory, RawFunctionOptions, RawTemplateFactory, RawTemplateOptions, ResultType, RuntimeError, SQL_CHAR_CODEC_ID, SQL_FLOAT_CODEC_ID, SQL_INT_CODEC_ID, SQL_VARCHAR_CODEC_ID, SchemaHandle, SelectAst, SqlBuilderOptions, SqlCodecTypes, SqlConnection, SqlDriver, SqlDriverState, SqlExecuteRequest, SqlExplainResult, SqlPlan, SqlQueryPlan, SqlQueryResult, SqlQueryable, SqlTransaction, TableBuilderImpl as Table, TableBuilderImpl, TableDef, TableKey, TableMetadata, TableRef, TablesOf, TypeHelperRegistry, UnaryBuilder, UpdateAst, ValueSource, WhereExpr, attachOperationsToColumnBuilder, augmentDescriptorWithColumnMeta, codec, compact, createBinaryExpr, createCodecRegistry, createColumnRef, createDeleteAst, createExistsExpr, createInsertAst, createJoin, createJoinOnBuilder, createJoinOnExpr, createLiteralExpr, createNullCheckExpr, createOperationExpr, createOrderBuilder, createOrderByItem, createParamRef, createSelectAst, createTableRef, createUpdateAst, defineCodecs, isColumnBuilder, isOperationExpr, param, planInvalid, planUnsupported, schema, sqlCodecDefinitions, sqlDataTypes };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as OperationTypes, d as ColumnBuilder } from "./types-
|
|
1
|
+
import { A as OperationTypes, d as ColumnBuilder } from "./types-n9-v4xao.mjs";
|
|
2
2
|
import { OperationRegistry } from "@prisma-next/operations";
|
|
3
3
|
import { StorageColumn } from "@prisma-next/sql-contract/types";
|
|
4
4
|
|
|
@@ -6,4 +6,4 @@ import { StorageColumn } from "@prisma-next/sql-contract/types";
|
|
|
6
6
|
declare function attachOperationsToColumnBuilder<ColumnName extends string, ColumnMeta extends StorageColumn, JsType = unknown, Operations extends OperationTypes = Record<string, never>>(columnBuilder: ColumnBuilder<ColumnName, ColumnMeta, JsType, Record<string, never>>, columnMeta: ColumnMeta, registry: OperationRegistry | undefined, contractCapabilities?: Record<string, Record<string, boolean>>): ColumnBuilder<ColumnName, ColumnMeta, JsType, Operations>;
|
|
7
7
|
//#endregion
|
|
8
8
|
export { attachOperationsToColumnBuilder as t };
|
|
9
|
-
//# sourceMappingURL=operations-registry-
|
|
9
|
+
//# sourceMappingURL=operations-registry-DegkI6a0.d.mts.map
|
package/dist/{operations-registry-0GuSkOCC.d.mts.map → operations-registry-DegkI6a0.d.mts.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operations-registry-
|
|
1
|
+
{"version":3,"file":"operations-registry-DegkI6a0.d.mts","names":[],"sources":["../src/operations-registry.ts"],"sourcesContent":[],"mappings":";;;;;iBA6NgB,8EAEK,oDAEA,iBAAiB,sCAErB,cAAc,YAAY,YAAY,QAAQ,oCACjD,sBACF,sDACa,eAAe,2BACrC,cAAc,YAAY,YAAY,QAAQ"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { N as ParamPlaceholder } from "./types-
|
|
1
|
+
import { N as ParamPlaceholder } from "./types-n9-v4xao.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/param.d.ts
|
|
4
4
|
type Parameter = ParamPlaceholder;
|
|
5
5
|
declare function param(name: string): Parameter;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { param as n, Parameter as t };
|
|
8
|
-
//# sourceMappingURL=param-
|
|
8
|
+
//# sourceMappingURL=param-DiyorjKd.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"param-DiyorjKd.d.mts","names":[],"sources":["../src/param.ts"],"sourcesContent":[],"mappings":";;;KAGY,SAAA,GAAY;iBAER,KAAA,gBAAqB"}
|
|
@@ -46,16 +46,24 @@ interface ExpressionSource {
|
|
|
46
46
|
}
|
|
47
47
|
declare function isOperationExpr(expr: Expression): expr is OperationExpr;
|
|
48
48
|
type BinaryOp = 'eq' | 'neq' | 'gt' | 'lt' | 'gte' | 'lte' | 'like' | 'ilike' | 'in' | 'notIn';
|
|
49
|
-
interface ListLiteralExpr {
|
|
50
|
-
readonly kind: 'listLiteral';
|
|
51
|
-
readonly values: ReadonlyArray<ParamRef | LiteralExpr>;
|
|
52
|
-
}
|
|
53
49
|
interface BinaryExpr {
|
|
54
50
|
readonly kind: 'bin';
|
|
55
51
|
readonly op: BinaryOp;
|
|
56
52
|
readonly left: Expression;
|
|
57
53
|
readonly right: Expression | ParamRef | LiteralExpr | ListLiteralExpr;
|
|
58
54
|
}
|
|
55
|
+
interface ListLiteralExpr {
|
|
56
|
+
readonly kind: 'listLiteral';
|
|
57
|
+
readonly values: ReadonlyArray<ParamRef | LiteralExpr>;
|
|
58
|
+
}
|
|
59
|
+
interface AndExpr {
|
|
60
|
+
readonly kind: 'and';
|
|
61
|
+
readonly exprs: ReadonlyArray<WhereExpr>;
|
|
62
|
+
}
|
|
63
|
+
interface OrExpr {
|
|
64
|
+
readonly kind: 'or';
|
|
65
|
+
readonly exprs: ReadonlyArray<WhereExpr>;
|
|
66
|
+
}
|
|
59
67
|
interface ExistsExpr {
|
|
60
68
|
readonly kind: 'exists';
|
|
61
69
|
readonly not: boolean;
|
|
@@ -70,14 +78,6 @@ interface NullCheckExpr {
|
|
|
70
78
|
readonly expr: Expression;
|
|
71
79
|
readonly isNull: boolean;
|
|
72
80
|
}
|
|
73
|
-
interface AndExpr {
|
|
74
|
-
readonly kind: 'and';
|
|
75
|
-
readonly exprs: ReadonlyArray<WhereExpr>;
|
|
76
|
-
}
|
|
77
|
-
interface OrExpr {
|
|
78
|
-
readonly kind: 'or';
|
|
79
|
-
readonly exprs: ReadonlyArray<WhereExpr>;
|
|
80
|
-
}
|
|
81
81
|
/**
|
|
82
82
|
* Union type for WHERE clause expressions.
|
|
83
83
|
*/
|
|
@@ -86,7 +86,7 @@ type JoinOnExpr = {
|
|
|
86
86
|
readonly kind: 'eqCol';
|
|
87
87
|
readonly left: ColumnRef;
|
|
88
88
|
readonly right: ColumnRef;
|
|
89
|
-
};
|
|
89
|
+
} | WhereExpr;
|
|
90
90
|
interface JoinAst {
|
|
91
91
|
readonly kind: 'join';
|
|
92
92
|
readonly joinType: 'inner' | 'left' | 'right' | 'full';
|
|
@@ -130,6 +130,9 @@ interface SelectAst {
|
|
|
130
130
|
dir: Direction;
|
|
131
131
|
}>;
|
|
132
132
|
readonly limit?: number;
|
|
133
|
+
readonly selectAllIntent?: {
|
|
134
|
+
table?: string;
|
|
135
|
+
};
|
|
133
136
|
}
|
|
134
137
|
interface InsertAst {
|
|
135
138
|
readonly kind: 'insert';
|
|
@@ -141,13 +144,13 @@ interface UpdateAst {
|
|
|
141
144
|
readonly kind: 'update';
|
|
142
145
|
readonly table: TableRef;
|
|
143
146
|
readonly set: Record<string, ColumnRef | ParamRef>;
|
|
144
|
-
readonly where
|
|
147
|
+
readonly where?: WhereExpr;
|
|
145
148
|
readonly returning?: ReadonlyArray<ColumnRef>;
|
|
146
149
|
}
|
|
147
150
|
interface DeleteAst {
|
|
148
151
|
readonly kind: 'delete';
|
|
149
152
|
readonly table: TableRef;
|
|
150
|
-
readonly where
|
|
153
|
+
readonly where?: WhereExpr;
|
|
151
154
|
readonly returning?: ReadonlyArray<ColumnRef>;
|
|
152
155
|
}
|
|
153
156
|
type QueryAst = SelectAst | InsertAst | UpdateAst | DeleteAst;
|
|
@@ -179,4 +182,4 @@ interface SqlQueryPlan<_Row = unknown> extends Pick<ExecutionPlan<_Row, QueryAst
|
|
|
179
182
|
declare function augmentDescriptorWithColumnMeta(descriptors: ParamDescriptor[], columnMeta: StorageColumn | undefined): void;
|
|
180
183
|
//#endregion
|
|
181
184
|
export { ParamRef as C, UpdateAst as D, TableRef as E, WhereExpr as O, OrExpr as S, SelectAst as T, ListLiteralExpr as _, BinaryOp as a, NullCheckExpr as b, Direction as c, ExpressionSource as d, IncludeAst as f, JoinOnExpr as g, JoinAst as h, BinaryExpr as i, isOperationExpr as k, ExistsExpr as l, InsertAst as m, augmentDescriptorWithColumnMeta as n, ColumnRef as o, IncludeRef as p, AndExpr as r, DeleteAst as s, SqlQueryPlan as t, Expression as u, LiteralExpr as v, QueryAst as w, OperationExpr as x, LoweredStatement as y };
|
|
182
|
-
//# sourceMappingURL=plan-
|
|
185
|
+
//# sourceMappingURL=plan-Oh1MFY8z.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plan-Oh1MFY8z.d.mts","names":[],"sources":["../src/ast/types.ts","../src/plan.ts"],"sourcesContent":[],"mappings":";;;;;;KAMY,SAAA;UAEK,QAAA;;;AAFjB;AAEiB,UAKA,SAAA,CALQ;EAKR,S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AA;EAKhC,SAAA,QAAA,ECvLS,SDuLQ;EACgB,SAAA,UAAA,ECvLtB,iBDuLsB;EAAc,SAAA,MAAA,ECtLxC,aDsLwC;EAAkB;;;;EAEhB,SAAA,KAAA,ECnL3C,kBDmL2C;EAG9B;;;;EACc,SAAA,oBAAA,CAAA,EClLX,2BDkLW;EAAxB;;AAWrB;;EAC2D,qBAAA,CAAA,OAAA,ECzL1B,uBDyL0B,CAAA,ECzLA,aDyLA,CCzLc,sBDyLd,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as ExecutionContext } from "./query-lane-context-CgkPuKaR.mjs";
|
|
2
|
-
import { E as TableRef, d as ExpressionSource, o as ColumnRef } from "./plan-
|
|
3
|
-
import { A as OperationTypes, D as NullCheckBuilder, M as OrderBuilder, N as ParamPlaceholder, d as ColumnBuilder, k as OperationTypeSignature, p as ComputeColumnJsType, s as BinaryBuilder, u as CodecTypes } from "./types-
|
|
2
|
+
import { E as TableRef, d as ExpressionSource, o as ColumnRef } from "./plan-Oh1MFY8z.mjs";
|
|
3
|
+
import { A as OperationTypes, D as NullCheckBuilder, M as OrderBuilder, N as ParamPlaceholder, d as ColumnBuilder, k as OperationTypeSignature, p as ComputeColumnJsType, s as BinaryBuilder, u as CodecTypes } from "./types-n9-v4xao.mjs";
|
|
4
4
|
import { ExtractCodecTypes, ExtractOperationTypes, SqlContract, SqlStorage, StorageColumn } from "@prisma-next/sql-contract/types";
|
|
5
5
|
|
|
6
6
|
//#region src/schema.d.ts
|
|
@@ -83,4 +83,4 @@ type ToOperationTypes<T> = T extends OperationTypes ? T : NormalizeOperationType
|
|
|
83
83
|
declare function schema<Contract extends SqlContract<SqlStorage>>(context: ExecutionContext<Contract>): SchemaReturnType<Contract>;
|
|
84
84
|
//#endregion
|
|
85
85
|
export { schema as i, SchemaHandle as n, TableBuilderImpl as r, ColumnBuilderImpl as t };
|
|
86
|
-
//# sourceMappingURL=schema-
|
|
86
|
+
//# sourceMappingURL=sch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 -1,5 +1,5 @@
|
|
|
1
1
|
import { n as ExecutionContext } from "./query-lane-context-CgkPuKaR.mjs";
|
|
2
|
-
import { C as ParamRef, a as BinaryOp, c as Direction, d as ExpressionSource, o as ColumnRef, t as SqlQueryPlan, u as Expression, w as QueryAst, x as OperationExpr } from "./plan-
|
|
2
|
+
import { C as ParamRef, a as BinaryOp, c as Direction, d as ExpressionSource, o as ColumnRef, t as SqlQueryPlan, u as Expression, w as QueryAst, x as OperationExpr } from "./plan-Oh1MFY8z.mjs";
|
|
3
3
|
import { RuntimeError } from "@prisma-next/plan";
|
|
4
4
|
import { ArgSpec, ReturnSpec } from "@prisma-next/operations";
|
|
5
5
|
import { SqlLoweringSpec } from "@prisma-next/sql-operations";
|
|
@@ -444,4 +444,4 @@ interface SqlBuilderOptions<TContract extends SqlContract<SqlStorage> = SqlContr
|
|
|
444
444
|
type ResultType$1<P> = P extends SqlQueryPlan<infer R> ? R : ResultType<P>;
|
|
445
445
|
//#endregion
|
|
446
446
|
export { OperationTypes as A, SqlBuilderOptions as B, Meta as C, NullCheckBuilder as D, NestedProjection as E, RawFunctionOptions as F, TablesOf as G, TableDef as H, RawTemplateFactory as I, createOrderBuilder as J, UnaryBuilder as K, RawTemplateOptions as L, OrderBuilder as M, ParamPlaceholder as N, NullableMethods as O, RawFactory as P, ResultType$1 as R, META as S, ModelMetadata as T, TableKey as U, SqlPlan as V, TableMetadata as W, isColumnBuilder as Y, InferNestedProjectionRow as _, AnyOrderBuilder as a, JoinOnBuilder as b, BuildOptions as c, ColumnBuilder as d, ColumnsOf as f, HasIncludeManyCapabilities as g, ExpressionBuilder as h, AnyExpressionSource as i, OperationsForTypeId as j, OperationTypeSignature as k, BuildParamsMap as l, Expr as m, AnyColumnBuilder as n, AnyUnaryBuilder as o, ComputeColumnJsType as p, ValueSource as q, AnyColumnBuilderBase as r, BinaryBuilder as s, AnyBinaryBuilder as t, CodecTypes as u, InferProjectionRow as v, ModelDef as w, JoinOnPredicate as x, InferReturningRow as y, RuntimeError as z };
|
|
447
|
-
//# sourceMappingURL=types-
|
|
447
|
+
//# sourceMappingURL=types-n9-v4xao.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types-DicmXfBm.d.mts","names":[],"sources":["../src/types.ts"],"sourcesContent":[],"mappings":";;;;;;;;;UAqBiB,gBAAA;;EAAA,SAAA,IAAA,EAAA,MAAgB;AAWjC;AAEA;;;;;;AAagB,KAfJ,WAAA,GAAc,gBAeQ,GAfW,gBAeX;AAC1B,UAdS,YAcT,CAAA,oBAAA,MAAA,GAAA,MAAA,EAAA,oBAZc,aAYd,GAZ8B,aAY9B,EAAA,UAAA,OAAA,CAAA,CAAA;EAAmB,SAAA,IAAA,EAAA,OAAA;EACpB,SAAA,IAAA,EATU,UASV;EACJ,SAAA,GAAA,EATa,SASb;;AAWH;;;AAIqB,iBAlBL,kBAAA,CAkBK,IAAA,EAjBb,gBAiBa,GAjBM,aAiBN,EAAA,GAAA,EAhBd,SAgBc,CAAA,EAflB,eAekB;;;;;;;;AAOK,KAXd,aAWc,CAAA,mBAAA,MAAA,GAAA,MAAA,EAAA,mBATL,aASK,GATW,aASX,EAAA,WAAA,OAAA,EAAA,mBAPL,cAOK,GAPY,MAOZ,CAAA,MAAA,EAAA,KAAA,CAAA,CAAA,GAAA;EACb,SAAA,IAAA,EAAA,QAAA;EAA4B,SAAA,KAAA,EAAA,MAAA;EAAY,SAAA,MAAA,EAJlC,UAIkC;EAAY,SAAA,UAAA,EAH1C,UAG0C;EAAtC,EAAA,CAAA,KAAA,EADf,WACe,CAAA,EADD,aACC,CADa,UACb,EADyB,UACzB,EADqC,QACrC,CAAA;EACf,GAAA,CAAA,KAAA,EADC,WACD,CAAA,EADe,aACf,CAD6B,UAC7B,EADyC,UACzC,EADqD,QACrD,CAAA;EAA4B,EAAA,CAAA,KAAA,EAA5B,WAA4B,CAAA,EAAd,aAAc,CAAA,UAAA,EAAY,UAAZ,EAAwB,QAAxB,CAAA;E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AA,OAAA,EA6GZ,kBA7GY,CAAA,EA6GS,aA7GT;EAClB,IAAA,CAAA,OAAA,EA6GJ,kBA7GI,CAAA,EA6GiB,kBA7GjB;;AAGR,UA+GK,cAAA,CA/GL;EAOA,UAAA,IAAA,EAAA,MAAA,CAAA,EAAA,OAA0B;;AAAmB,UA4GxC,YAAA,CA5GwC;EACvD,SAAA,MAAA,CAAA,EA4GkB,cA5GlB;;AAEgB,UA6GD,iBA7GC,CAAA,kBA8GE,WA9GF,CA8Gc,UA9Gd,CAAA,GA8G4B,WA9G5B,CA8GwC,UA9GxC,CAAA,CAAA,CAAA;EACU,SAAA,OAAA,EA+GR,gBA/GQ,CA+GS,SA/GT,CAAA;;AAa5B;;;;;AAKY,KAqGA,YArGQ,CAAA,CAAA,CAAA,GAqGQ,CArGR,SAqGkB,YArGK,CAAA,KAAA,EAAA,CAAA,GAAA,CAAA,GAqGuB,UArGvB,CAqGsC,CArGtC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma-next/sql-relational-core",
|
|
3
|
-
"version": "0.3.0-dev.
|
|
3
|
+
"version": "0.3.0-dev.44",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"description": "Schema and column builders, operation attachment, and AST types for Prisma Next",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"arktype": "^2.1.29",
|
|
9
9
|
"ts-toolbelt": "^9.6.0",
|
|
10
|
-
"@prisma-next/contract": "0.3.0-dev.
|
|
11
|
-
"@prisma-next/operations": "0.3.0-dev.
|
|
12
|
-
"@prisma-next/plan": "0.3.0-dev.
|
|
13
|
-
"@prisma-next/sql-contract": "0.3.0-dev.
|
|
14
|
-
"@prisma-next/sql-operations": "0.3.0-dev.
|
|
15
|
-
"@prisma-next/utils": "0.3.0-dev.
|
|
10
|
+
"@prisma-next/contract": "0.3.0-dev.44",
|
|
11
|
+
"@prisma-next/operations": "0.3.0-dev.44",
|
|
12
|
+
"@prisma-next/plan": "0.3.0-dev.44",
|
|
13
|
+
"@prisma-next/sql-contract": "0.3.0-dev.44",
|
|
14
|
+
"@prisma-next/sql-operations": "0.3.0-dev.44",
|
|
15
|
+
"@prisma-next/utils": "0.3.0-dev.44"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"tsdown": "0.18.4",
|
|
19
19
|
"typescript": "5.9.3",
|
|
20
20
|
"vitest": "4.0.17",
|
|
21
|
-
"@prisma-next/sql-contract-ts": "0.3.0-dev.
|
|
21
|
+
"@prisma-next/sql-contract-ts": "0.3.0-dev.44",
|
|
22
22
|
"@prisma-next/test-utils": "0.0.1",
|
|
23
|
-
"@prisma-next/
|
|
24
|
-
"@prisma-next/
|
|
23
|
+
"@prisma-next/tsdown": "0.0.0",
|
|
24
|
+
"@prisma-next/tsconfig": "0.0.0"
|
|
25
25
|
},
|
|
26
26
|
"files": [
|
|
27
27
|
"dist",
|
package/src/ast/select.ts
CHANGED
|
@@ -22,6 +22,7 @@ export interface CreateSelectAstOptions {
|
|
|
22
22
|
readonly where?: WhereExpr;
|
|
23
23
|
readonly orderBy?: ReadonlyArray<{ expr: ColumnRef | OperationExpr; dir: Direction }>;
|
|
24
24
|
readonly limit?: number;
|
|
25
|
+
readonly selectAllIntent?: { table?: string };
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
export function createSelectAst(options: CreateSelectAstOptions): SelectAst {
|
|
@@ -34,5 +35,6 @@ export function createSelectAst(options: CreateSelectAstOptions): SelectAst {
|
|
|
34
35
|
where: options.where,
|
|
35
36
|
orderBy: options.orderBy,
|
|
36
37
|
limit: options.limit,
|
|
38
|
+
selectAllIntent: options.selectAllIntent,
|
|
37
39
|
}) as SelectAst;
|
|
38
40
|
}
|
package/src/ast/types.ts
CHANGED
|
@@ -68,11 +68,6 @@ export type BinaryOp =
|
|
|
68
68
|
| 'in'
|
|
69
69
|
| 'notIn';
|
|
70
70
|
|
|
71
|
-
export interface ListLiteralExpr {
|
|
72
|
-
readonly kind: 'listLiteral';
|
|
73
|
-
readonly values: ReadonlyArray<ParamRef | LiteralExpr>;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
71
|
export interface BinaryExpr {
|
|
77
72
|
readonly kind: 'bin';
|
|
78
73
|
readonly op: BinaryOp;
|
|
@@ -80,6 +75,21 @@ export interface BinaryExpr {
|
|
|
80
75
|
readonly right: Expression | ParamRef | LiteralExpr | ListLiteralExpr;
|
|
81
76
|
}
|
|
82
77
|
|
|
78
|
+
export interface ListLiteralExpr {
|
|
79
|
+
readonly kind: 'listLiteral';
|
|
80
|
+
readonly values: ReadonlyArray<ParamRef | LiteralExpr>;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export interface AndExpr {
|
|
84
|
+
readonly kind: 'and';
|
|
85
|
+
readonly exprs: ReadonlyArray<WhereExpr>;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export interface OrExpr {
|
|
89
|
+
readonly kind: 'or';
|
|
90
|
+
readonly exprs: ReadonlyArray<WhereExpr>;
|
|
91
|
+
}
|
|
92
|
+
|
|
83
93
|
export interface ExistsExpr {
|
|
84
94
|
readonly kind: 'exists';
|
|
85
95
|
readonly not: boolean;
|
|
@@ -96,26 +106,18 @@ export interface NullCheckExpr {
|
|
|
96
106
|
readonly isNull: boolean;
|
|
97
107
|
}
|
|
98
108
|
|
|
99
|
-
export interface AndExpr {
|
|
100
|
-
readonly kind: 'and';
|
|
101
|
-
readonly exprs: ReadonlyArray<WhereExpr>;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
export interface OrExpr {
|
|
105
|
-
readonly kind: 'or';
|
|
106
|
-
readonly exprs: ReadonlyArray<WhereExpr>;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
109
|
/**
|
|
110
110
|
* Union type for WHERE clause expressions.
|
|
111
111
|
*/
|
|
112
112
|
export type WhereExpr = BinaryExpr | ExistsExpr | NullCheckExpr | AndExpr | OrExpr;
|
|
113
113
|
|
|
114
|
-
export type JoinOnExpr =
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
114
|
+
export type JoinOnExpr =
|
|
115
|
+
| {
|
|
116
|
+
readonly kind: 'eqCol';
|
|
117
|
+
readonly left: ColumnRef;
|
|
118
|
+
readonly right: ColumnRef;
|
|
119
|
+
}
|
|
120
|
+
| WhereExpr;
|
|
119
121
|
|
|
120
122
|
export interface JoinAst {
|
|
121
123
|
readonly kind: 'join';
|
|
@@ -154,6 +156,7 @@ export interface SelectAst {
|
|
|
154
156
|
readonly where?: WhereExpr;
|
|
155
157
|
readonly orderBy?: ReadonlyArray<{ expr: Expression; dir: Direction }>;
|
|
156
158
|
readonly limit?: number;
|
|
159
|
+
readonly selectAllIntent?: { table?: string };
|
|
157
160
|
}
|
|
158
161
|
|
|
159
162
|
export interface InsertAst {
|
|
@@ -167,14 +170,14 @@ export interface UpdateAst {
|
|
|
167
170
|
readonly kind: 'update';
|
|
168
171
|
readonly table: TableRef;
|
|
169
172
|
readonly set: Record<string, ColumnRef | ParamRef>;
|
|
170
|
-
readonly where
|
|
173
|
+
readonly where?: WhereExpr;
|
|
171
174
|
readonly returning?: ReadonlyArray<ColumnRef>;
|
|
172
175
|
}
|
|
173
176
|
|
|
174
177
|
export interface DeleteAst {
|
|
175
178
|
readonly kind: 'delete';
|
|
176
179
|
readonly table: TableRef;
|
|
177
|
-
readonly where
|
|
180
|
+
readonly where?: WhereExpr;
|
|
178
181
|
readonly returning?: ReadonlyArray<ColumnRef>;
|
|
179
182
|
}
|
|
180
183
|
|
package/src/ast/update.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { compact } from './util';
|
|
|
4
4
|
export interface CreateUpdateAstOptions {
|
|
5
5
|
readonly table: TableRef;
|
|
6
6
|
readonly set: Record<string, ColumnRef | ParamRef>;
|
|
7
|
-
readonly where
|
|
7
|
+
readonly where?: WhereExpr;
|
|
8
8
|
readonly returning?: ReadonlyArray<ColumnRef>;
|
|
9
9
|
}
|
|
10
10
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"param-ChBZwVcw.d.mts","names":[],"sources":["../src/param.ts"],"sourcesContent":[],"mappings":";;;KAGY,SAAA,GAAY;iBAER,KAAA,gBAAqB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plan-cjDF_yFX.d.mts","names":[],"sources":["../src/ast/types.ts","../src/plan.ts"],"sourcesContent":[],"mappings":";;;;;;KAMY,SAAA;UAEK,QAAA;;;AAFjB;AAEiB,UAKA,SAAA,CALQ;EAKR,SAAA,IAAS,EAAA,KAAA;EAMT,SAAA,KAAQ,EAAA,MAAA;EAMR,SAAA,MAAW,EAAA,MAAA;AAK5B;AAIiB,UAfA,QAAA,CAeA;EACc,SAAA,IAAA,EAAA,OAAA;EAAa,SAAA,KAAA,EAAA,MAAA;EAAW,SAAA,IAAA,CAAA,EAAA,MAAA;;AACnC,UAXH,WAAA,CAWG;EACC,SAAA,IAAA,EAAA,SAAA;EAAe,SAAA,KAAA,EAAA,OAAA;AAOpC;AAMiB,UApBA,aAAA,CAoBgB;EAIjB,SAAA,IAAA,EAAA,WAAe;EAInB,SAAA,MAAQ,EAAA,MAAA;EAYH,SAAA,SAAe,EAAA,MAAA;EAEC,SAAA,IAAA,EAtChB,UAsCgB;EAAW,SAAA,IAAA,EArC3B,aAqC2B,CArCb,UAqCa,GArCA,QAqCA,GArCW,WAqCX,CAAA;EAAzB,SAAA,OAAA,EApCC,UAoCD;EAAa,SAAA,QAAA,EAnCX,eAmCW;AAGhC;;;;;AAI0C,KAnC9B,UAAA,GAAa,SAmCiB,GAnCL,aAmCK;;;AAG1C;AAUA;AAMiB,UAhDA,gBAAA,CAkDe;EAGf,MAAA,EAAA,EApDL,UAoDW;AAQvB;AAAwB,iBAzDR,eAAA,CAyDQ,IAAA,EAzDc,UAyDd,CAAA,EAAA,IAAA,IAzDmC,aAyDnC;AAAa,KArDzB,QAAA,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