@prisma/orm-family-sql 8.0.0-rc.1-dev.44 → 8.0.0-rc.1-dev.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{aggregate-descriptor-registry-CTo0ry7h.mjs → aggregate-descriptor-registry-C7hel5O7.mjs} +2 -2
- package/dist/{aggregate-descriptor-registry-CTo0ry7h.mjs.map → aggregate-descriptor-registry-C7hel5O7.mjs.map} +1 -1
- package/dist/{ast-D8qqdDX_.d.mts → ast-HFcfQZr-.d.mts} +3 -3
- package/dist/{ast-D8qqdDX_.d.mts.map → ast-HFcfQZr-.d.mts.map} +1 -1
- package/dist/{ast-BJdOHZrL.mjs → ast-Lbl4VwqP.mjs} +2 -2
- package/dist/ast-Lbl4VwqP.mjs.map +1 -0
- package/dist/{authoring-type-constructors-Blqoa2Ua-CvHn00xx.mjs → authoring-type-constructors-Blqoa2Ua-DqvNCOb2.mjs} +2 -2
- package/dist/{authoring-type-constructors-Blqoa2Ua-CvHn00xx.mjs.map → authoring-type-constructors-Blqoa2Ua-DqvNCOb2.mjs.map} +1 -1
- package/dist/builder.d.mts +2 -2
- package/dist/builder__runtime.d.mts +6 -6
- package/dist/builder__runtime.mjs +20 -3
- package/dist/builder__runtime.mjs.map +1 -1
- package/dist/builder__types.d.mts +2 -2
- package/dist/{config-types-B6cQRwJw.mjs → config-types-gAm54C_v.mjs} +2 -2
- package/dist/{config-types-B6cQRwJw.mjs.map → config-types-gAm54C_v.mjs.map} +1 -1
- package/dist/{contract-builder-vdfvmuiO.mjs → contract-builder-D4a5dT7j.mjs} +2 -2
- package/dist/{contract-builder-vdfvmuiO.mjs.map → contract-builder-D4a5dT7j.mjs.map} +1 -1
- package/dist/contract-psl.mjs +1 -1
- package/dist/contract-psl__provider.mjs +2 -2
- package/dist/contract-psl__provider.mjs.map +1 -1
- package/dist/contract-ts.mjs +3 -3
- package/dist/contract-ts__config-types.mjs +1 -1
- package/dist/contract-ts__contract-builder.mjs +2 -2
- package/dist/contract.d.mts +1 -1
- package/dist/contract.mjs +1 -1
- package/dist/contract__foreign-key-materialization.d.mts +1 -1
- package/dist/contract__foreign-key-materialization.mjs +1 -1
- package/dist/{control-DAkNosoF.mjs → control-D3cB5YQp.mjs} +2 -2
- package/dist/{control-DAkNosoF.mjs.map → control-D3cB5YQp.mjs.map} +1 -1
- package/dist/{control-DssujEJW.d.mts → control-DTLJ1WtZ.d.mts} +6 -6
- package/dist/{control-DssujEJW.d.mts.map → control-DTLJ1WtZ.d.mts.map} +1 -1
- package/dist/{control-adapter-C99J7aEF-Vx9xXYOy.d.mts → control-adapter-C99J7aEF-B7eQd7vD.d.mts} +4 -4
- package/dist/{control-adapter-C99J7aEF-Vx9xXYOy.d.mts.map → control-adapter-C99J7aEF-B7eQd7vD.d.mts.map} +1 -1
- package/dist/control-adapter-MZJQiwcE.d.mts +1 -0
- package/dist/{db-C5jmOFPM-Cd-fni61.d.mts → db-D18PrXKW-DvTv4JFn.d.mts} +136 -8
- package/dist/db-D18PrXKW-DvTv4JFn.d.mts.map +1 -0
- package/dist/{ddl-types-BtT82FGO-Du_-9SlZ.d.mts → ddl-types-CXx4vPz6-BsgrnSUY.d.mts} +3 -3
- package/dist/{ddl-types-BtT82FGO-Du_-9SlZ.d.mts.map → ddl-types-CXx4vPz6-BsgrnSUY.d.mts.map} +1 -1
- package/dist/{derived-checks-DFMRmiAu-8jmha26I.mjs → derived-checks-DFMRmiAu-DGfB8aS4.mjs} +2 -2
- package/dist/{derived-checks-DFMRmiAu-8jmha26I.mjs.map → derived-checks-DFMRmiAu-DGfB8aS4.mjs.map} +1 -1
- package/dist/{diff-pl1Xal4J.d.mts → diff-DbTNVm2f.d.mts} +3 -3
- package/dist/{diff-pl1Xal4J.d.mts.map → diff-DbTNVm2f.d.mts.map} +1 -1
- package/dist/{expression-D30W-gkF.mjs → expression-CX5mTA-z.mjs} +54 -15
- package/dist/expression-CX5mTA-z.mjs.map +1 -0
- package/dist/{expression-Q_yaDQPb.d.mts → expression-FJK6Ar-d.d.mts} +96 -5
- package/dist/expression-FJK6Ar-d.d.mts.map +1 -0
- package/dist/family.d.mts +7 -7
- package/dist/family.mjs +2 -2
- package/dist/family__control-adapter.d.mts +2 -2
- package/dist/family__control.d.mts +2 -2
- package/dist/family__control.mjs +1 -1
- package/dist/family__diff.d.mts +2 -2
- package/dist/family__migration.d.mts +1 -1
- package/dist/family__pack.mjs +1 -1
- package/dist/family__psl-infer.mjs +1 -1
- package/dist/family__runtime.d.mts +1 -1
- package/dist/{foreign-key-materialization-DO9dvG7v.d.mts → foreign-key-materialization-CkvOzJWy.d.mts} +4 -4
- package/dist/{foreign-key-materialization-DO9dvG7v.d.mts.map → foreign-key-materialization-CkvOzJWy.d.mts.map} +1 -1
- package/dist/{foreign-key-materialization-DLOi1Ps0.mjs → foreign-key-materialization-Cu7-7LHl.mjs} +6 -5
- package/dist/foreign-key-materialization-Cu7-7LHl.mjs.map +1 -0
- package/dist/{index-DIHXLCbY.d.mts → index-C-vQOMY_.d.mts} +9 -9
- package/dist/{index-DIHXLCbY.d.mts.map → index-C-vQOMY_.d.mts.map} +1 -1
- package/dist/{interpreter-DaBA2fm--FFkq_gGd.mjs → interpreter-DyiUUAWh-DYdjIpiE.mjs} +5 -5
- package/dist/interpreter-DyiUUAWh-DYdjIpiE.mjs.map +1 -0
- package/dist/lane-query-builder.d.mts +1 -1
- package/dist/middleware--TtoxUiW.d.mts +1 -0
- package/dist/{middleware-BS7u8VFR-DyUcAFid.d.mts → middleware-AhTz1BOW-th-Suxuf.d.mts} +3 -3
- package/dist/{middleware-BS7u8VFR-DyUcAFid.d.mts.map → middleware-AhTz1BOW-th-Suxuf.d.mts.map} +1 -1
- package/dist/{migration-CGlaINey.d.mts → migration-CjDRZNep.d.mts} +2 -2
- package/dist/{migration-CGlaINey.d.mts.map → migration-CjDRZNep.d.mts.map} +1 -1
- package/dist/orm-client.d.mts +7 -7
- package/dist/orm-client.mjs +2 -2
- package/dist/plan-BHLdb0Z7.d.mts +2 -0
- package/dist/{plan-BC_trt1i-In5gOKCT.d.mts → plan-CDxduYaN-pLIyyJaB.d.mts} +9 -8
- package/dist/plan-CDxduYaN-pLIyyJaB.d.mts.map +1 -0
- package/dist/{plan-CkpcgUaM.mjs → plan-Dh0LbYIv-Crx5-ThG.mjs} +8 -7
- package/dist/plan-Dh0LbYIv-Crx5-ThG.mjs.map +1 -0
- package/dist/prepared-query-BJr50wPm-ChoqfJbX.mjs +22 -0
- package/dist/prepared-query-BJr50wPm-ChoqfJbX.mjs.map +1 -0
- package/dist/{prepared-statement-z9bBbTph-BlzhaRTY.d.mts → prepared-statement-9QpkE6JG-C430V3MO.d.mts} +82 -17
- package/dist/prepared-statement-9QpkE6JG-C430V3MO.d.mts.map +1 -0
- package/dist/{psl-infer-YhbKkybN.mjs → psl-infer-Dk5kgKre.mjs} +2 -2
- package/dist/{psl-infer-YhbKkybN.mjs.map → psl-infer-Dk5kgKre.mjs.map} +1 -1
- package/dist/{query-lane-context-gwWUcacE-DdWNrc8q.d.mts → query-lane-context-Qa-eddrE-kuZ8Z86-.d.mts} +3 -3
- package/dist/{query-lane-context-gwWUcacE-DdWNrc8q.d.mts.map → query-lane-context-Qa-eddrE-kuZ8Z86-.d.mts.map} +1 -1
- package/dist/query-lane-context-XMvk7fmY.d.mts +1 -0
- package/dist/relational-core.d.mts +12 -12
- package/dist/relational-core.mjs +5 -5
- package/dist/relational-core__aggregate-descriptor-registry.d.mts +1 -1
- package/dist/relational-core__aggregate-descriptor-registry.mjs +1 -1
- package/dist/relational-core__ast.d.mts +4 -4
- package/dist/relational-core__ast.mjs +3 -3
- package/dist/relational-core__codec-descriptor-registry.d.mts +2 -2
- package/dist/relational-core__contract-free.d.mts +2 -2
- package/dist/relational-core__contract-free.mjs +1 -1
- package/dist/relational-core__contract-free.mjs.map +1 -1
- package/dist/relational-core__expression.d.mts +2 -2
- package/dist/relational-core__expression.mjs +1 -1
- package/dist/relational-core__middleware.d.mts +2 -2
- package/dist/relational-core__plan.d.mts +3 -3
- package/dist/relational-core__plan.mjs +1 -1
- package/dist/relational-core__query-lane-context.d.mts +2 -2
- package/dist/relational-core__types.d.mts +3 -3
- package/dist/{runtime-cPrAp99G.d.mts → runtime-DpKF2Yu2.d.mts} +3 -3
- package/dist/{runtime-cPrAp99G.d.mts.map → runtime-DpKF2Yu2.d.mts.map} +1 -1
- package/dist/runtime.d.mts +5 -5
- package/dist/runtime.mjs +143 -16
- package/dist/runtime.mjs.map +1 -1
- package/dist/runtime__internal__prepared-query.d.mts +2 -2
- package/dist/runtime__internal__prepared-query.mjs +2 -2
- package/dist/{sql-execution-plan-D0ZTnszb-DnCRtfQO.d.mts → sql-execution-plan--jKyLpe5-CMGhgO0M.d.mts} +5 -6
- package/dist/sql-execution-plan--jKyLpe5-CMGhgO0M.d.mts.map +1 -0
- package/dist/types-B0msOnBM.d.mts +1 -0
- package/dist/{types-C9FZXc9Q-C6LM1k-O.d.mts → types-CyxGtOOh-BggSa6Fe.d.mts} +7 -18
- package/dist/{types-C9FZXc9Q-C6LM1k-O.d.mts.map → types-CyxGtOOh-BggSa6Fe.d.mts.map} +1 -1
- package/dist/{types-B7_v-z12-De5tf8LE.mjs → types-Dt4e_jC--COeP8xzN.mjs} +68 -28
- package/dist/{types-B7_v-z12-De5tf8LE.mjs.map → types-Dt4e_jC--COeP8xzN.mjs.map} +1 -1
- package/dist/{types-IqZMLrFC-B0YziCVx.d.mts → types-IqZMLrFC-DcH8v_u3.d.mts} +2 -2
- package/dist/{types-IqZMLrFC-B0YziCVx.d.mts.map → types-IqZMLrFC-DcH8v_u3.d.mts.map} +1 -1
- package/dist/{types-DH6Sqzxu-DfzaLX0o.d.mts → types-v3qxLLxo-DCeKv7yY.d.mts} +43 -22
- package/dist/{types-DH6Sqzxu-DfzaLX0o.d.mts.map → types-v3qxLLxo-DCeKv7yY.d.mts.map} +1 -1
- package/package.json +18 -18
- package/dist/ast-BJdOHZrL.mjs.map +0 -1
- package/dist/control-adapter-CLID4Q6Z.d.mts +0 -1
- package/dist/db-C5jmOFPM-Cd-fni61.d.mts.map +0 -1
- package/dist/expression-D30W-gkF.mjs.map +0 -1
- package/dist/expression-Q_yaDQPb.d.mts.map +0 -1
- package/dist/foreign-key-materialization-DLOi1Ps0.mjs.map +0 -1
- package/dist/interpreter-DaBA2fm--FFkq_gGd.mjs.map +0 -1
- package/dist/middleware-Cy_OqpBi.d.mts +0 -1
- package/dist/plan-BC_trt1i-In5gOKCT.d.mts.map +0 -1
- package/dist/plan-CkpcgUaM.mjs.map +0 -1
- package/dist/plan-DrOMooQt.d.mts +0 -2
- package/dist/prepared-query-BDLztUzY-CaDR0Rqc.mjs +0 -14
- package/dist/prepared-query-BDLztUzY-CaDR0Rqc.mjs.map +0 -1
- package/dist/prepared-statement-z9bBbTph-BlzhaRTY.d.mts.map +0 -1
- package/dist/query-lane-context-D62vkQhf.d.mts +0 -1
- package/dist/sql-execution-plan-D0ZTnszb-DnCRtfQO.d.mts.map +0 -1
- package/dist/types-0c4HyrXd.d.mts +0 -1
package/dist/{control-adapter-C99J7aEF-Vx9xXYOy.d.mts → control-adapter-C99J7aEF-B7eQd7vD.d.mts}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { O as SqlControlDriverInstance } from "./types-BDUG29Df-LE85dIXP.mjs";
|
|
2
2
|
import "./types-UcHa2cTe.mjs";
|
|
3
|
-
import { m as AnyQueryAst, ut as LoweredStatement } from "./types-
|
|
3
|
+
import { m as AnyQueryAst, ut as LoweredStatement } from "./types-v3qxLLxo-DCeKv7yY.mjs";
|
|
4
4
|
import { o as SqlExecuteRequest } from "./driver-types-BQtRkOJ0-Bv2RPSfr.mjs";
|
|
5
|
-
import { s as DdlNode } from "./ddl-types-
|
|
6
|
-
import { a as LowererContext } from "./ast-
|
|
5
|
+
import { s as DdlNode } from "./ddl-types-CXx4vPz6-BsgrnSUY.mjs";
|
|
6
|
+
import { a as LowererContext } from "./ast-HFcfQZr-.mjs";
|
|
7
7
|
import { v as SqlSchemaIRNode } from "./types-YStFFkKs-D9UAmnON.mjs";
|
|
8
8
|
import "./types-Dwcw0F8X.mjs";
|
|
9
9
|
import { ColumnDefault, ContractMarkerRecord, LedgerEntryRecord } from "@prisma/orm-framework/contract/types";
|
|
@@ -189,4 +189,4 @@ interface SqlControlAdapterDescriptor<TTarget extends string = string> {
|
|
|
189
189
|
}
|
|
190
190
|
//#endregion
|
|
191
191
|
export { SqlControlAdapterDescriptor as a, SqlControlAdapter as i, Lowerer as n, arraysEqual as o, NativeTypeNormalizer as r, ExecuteRequestLowerer as t };
|
|
192
|
-
//# sourceMappingURL=control-adapter-C99J7aEF-
|
|
192
|
+
//# sourceMappingURL=control-adapter-C99J7aEF-B7eQd7vD.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"control-adapter-C99J7aEF-
|
|
1
|
+
{"version":3,"file":"control-adapter-C99J7aEF-B7eQd7vD.d.mts","names":[],"sources":["../../../../2-sql/9-family/dist/control-adapter-C99J7aEF.d.mts"],"mappings":";;;;;;;;;;;;;;;;KAUK,qBAAqB,oBAAoB,uBAAuB;;;;;;KAMhE,wBAAwB;;;;iBAIZ,YAAY,sBAAsB;;;;;;;;;;UAUzC;EACR,MAAM,KAAK,cAAc,SAAS,SAAS,0BAA0B;;;;;;;;UAQ7D,8BAA8B;EACtC,sBAAsB,KAAK,cAAc,SAAS,UAAU,0BAA0B,QAAQ;;;;;;;;UAQtF,kBAAkB,yCAAyC,8BAA8B,UAAU;;;;;;;;;;;;;;;;EAgB3G,WAAW,QAAQ,yBAAyB,UAAU,gBAAgB,QAAQ;;;;;;;;EAQ9E,eAAe,QAAQ,yBAAyB,WAAW,QAAQ,oBAAoB;;;;;EAKvF,WAAW,QAAQ,yBAAyB,UAAU,iBAAiB,iBAAiB;;;;;;;EAOxF,aAAa,QAAQ,yBAAyB,UAAU,eAAe;aAC5D;aACA;aACA;MACP;;;;;;;EAOJ,WAAW,QAAQ,yBAAyB,UAAU,eAAe;aAC1D;aACA;aACA;MACP;;;;;;;;EAQJ,aAAa,QAAQ,yBAAyB,UAAU,eAAe,sBAAsB;aAClF;aACA;aACA;MACP;;;;;;;EAOJ,iBAAiB,QAAQ,yBAAyB,UAAU,eAAe;aAChE;aACA;aACA;aACA;aACA;aACA;aACA;MACP;;;;;;;;;;;;;;;;;;EAkBJ,WAAW,QAAQ,yBAAyB,UAAU,oBAAoB,kBAAkB,QAAQ;;;;;;WAM3F,mBAAmB;;;;;;WAMnB,sBAAsB;;;;;EAK/B,yCAAyC;;;;;EAKzC,uCAAuC;;;;;;;;UAQ/B,4BAA4B;;;;;;;EAOpC,OAAO,OAAO,oBAAoB,WAAW,kBAAkB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./control-adapter-C99J7aEF-B7eQd7vD.mjs";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { r as StorageTable } from "./storage-table-DSeWszOL-CI-cItEK.mjs";
|
|
2
2
|
import { T as QueryOperationTypesBase, h as ExtractStorageColumnTypes, l as ExtractAggregateTypes, m as ExtractStorageColumnInputTypes, p as ExtractQueryOperationTypes, r as AggregateTypesBase, u as ExtractCodecTypes } from "./types-BDUG29Df-LE85dIXP.mjs";
|
|
3
3
|
import { t as StorageColumnMapAt } from "./types-UcHa2cTe.mjs";
|
|
4
|
-
import {
|
|
5
|
-
import "./ast-
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import "./plan-
|
|
4
|
+
import { Et as SelectAst, c as AnyFromSource } from "./types-v3qxLLxo-DCeKv7yY.mjs";
|
|
5
|
+
import "./ast-HFcfQZr-.mjs";
|
|
6
|
+
import { t as SqlQueryPlan } from "./plan-CDxduYaN-pLIyyJaB.mjs";
|
|
7
|
+
import { S as TraitExpression, c as RawAffectedCountQuery, f as RawRowQuery, g as RawSqlInterpolation, h as RawSqlBuilder, i as CodecTypesBase, o as Expression, r as CodecExpression, s as NoReservedRowColumn, x as ScopeField, y as RawSqlTag } from "./expression-FJK6Ar-d.mjs";
|
|
8
|
+
import "./plan-BHLdb0Z7.mjs";
|
|
9
9
|
import { AnnotationValue, OperationKind, ValidAnnotations } from "@prisma/orm-framework/components/runtime";
|
|
10
|
-
//#region ../../../2-sql/4-lanes/sql-builder/dist/db-
|
|
10
|
+
//#region ../../../2-sql/4-lanes/sql-builder/dist/db-D18PrXKW.d.mts
|
|
11
11
|
//#region src/scope.d.ts
|
|
12
12
|
type GatedMethod<Capabilities, Required, Method> = Capabilities extends Required ? Method : never;
|
|
13
13
|
declare const JoinOuterScope: unique symbol;
|
|
@@ -214,6 +214,111 @@ type ResolveRow<Row extends Record<string, ScopeField>, CodecTypes extends Recor
|
|
|
214
214
|
readonly output: unknown;
|
|
215
215
|
}>, PreResolved extends Record<string, unknown> = Record<string, never>> = Expand<{ -readonly [K in keyof Row]: string extends keyof PreResolved ? ResolveField<Row[K], CodecTypes> : K extends keyof PreResolved ? ApplyNullable<NonNullable<PreResolved[K & keyof PreResolved]>, Row[K]> : ResolveField<Row[K], CodecTypes>; }>;
|
|
216
216
|
//#endregion
|
|
217
|
+
//#region src/types/raw-query.d.ts
|
|
218
|
+
/**
|
|
219
|
+
* The output type a contract column reference carries, kept on a symbol key so
|
|
220
|
+
* it cannot collide with a codec descriptor's own fields and never appears in
|
|
221
|
+
* the value a caller writes.
|
|
222
|
+
*/
|
|
223
|
+
declare const columnOutput: unique symbol;
|
|
224
|
+
/**
|
|
225
|
+
* A column of the contract, as a raw row spec reads it: the codec that decodes
|
|
226
|
+
* it, whether it may be null, and the type the contract says it decodes to.
|
|
227
|
+
*
|
|
228
|
+
* The first two fields are the codec descriptor the target-agnostic raw
|
|
229
|
+
* surface already accepts, so a reference is usable as a spec entry with no
|
|
230
|
+
* translation.
|
|
231
|
+
*/
|
|
232
|
+
interface ContractColumnRef<CodecId extends string = string, Nullable extends boolean = boolean, Output = unknown> {
|
|
233
|
+
readonly codecId: CodecId;
|
|
234
|
+
readonly nullable: Nullable;
|
|
235
|
+
readonly [columnOutput]?: Output;
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* One entry of a contract-bound row spec: a codec id the contract knows, that
|
|
239
|
+
* id with nullability, or a column reference.
|
|
240
|
+
*
|
|
241
|
+
* The id members are keyed on the contract's codec map rather than `string`,
|
|
242
|
+
* which is what makes an entry's literal survive inference — a `string` member
|
|
243
|
+
* inside the record constraint widens `'pg/int8@1'` to `string`, and a widened
|
|
244
|
+
* id resolves to `unknown`. Naming the map also means every id the contract
|
|
245
|
+
* carries is offered at the call site. `ParamSpec` keys its declaration the
|
|
246
|
+
* same way.
|
|
247
|
+
*/
|
|
248
|
+
type ContractRawSpecEntry<CT extends Record<string, {
|
|
249
|
+
readonly output: unknown;
|
|
250
|
+
}>> = (keyof CT & string) | {
|
|
251
|
+
readonly codecId: keyof CT & string;
|
|
252
|
+
readonly nullable?: boolean;
|
|
253
|
+
} | ContractColumnRef;
|
|
254
|
+
/**
|
|
255
|
+
* A contract-bound row spec: result-column name to the codec that decodes it.
|
|
256
|
+
* It inherits the target-agnostic spec's one reserved name, so `db.raw` refuses
|
|
257
|
+
* a `__proto__` column exactly where the contract-free tag does.
|
|
258
|
+
*/
|
|
259
|
+
type ContractRawRowSpec<CT extends Record<string, {
|
|
260
|
+
readonly output: unknown;
|
|
261
|
+
}>> = Readonly<Record<string, ContractRawSpecEntry<CT>>> & NoReservedRowColumn;
|
|
262
|
+
type EntryScopeField<Entry> = Entry extends string ? {
|
|
263
|
+
codecId: Entry;
|
|
264
|
+
nullable: false;
|
|
265
|
+
} : Entry extends {
|
|
266
|
+
readonly codecId: infer Id extends string;
|
|
267
|
+
readonly nullable?: infer N;
|
|
268
|
+
} ? {
|
|
269
|
+
codecId: Id;
|
|
270
|
+
nullable: [N] extends [true] ? true : false;
|
|
271
|
+
} : never;
|
|
272
|
+
type SpecScopeFields<Spec extends ContractRawRowSpec<CT>, CT extends Record<string, {
|
|
273
|
+
readonly output: unknown;
|
|
274
|
+
}>> = { [K in keyof Spec]: EntryScopeField<Spec[K]> extends (infer F extends ScopeField) ? F : never; };
|
|
275
|
+
/**
|
|
276
|
+
* The entries whose type the contract already resolved — column references.
|
|
277
|
+
* Everything else resolves from its codec id through the codec-type map, the
|
|
278
|
+
* same route the query builders take.
|
|
279
|
+
*/
|
|
280
|
+
type SpecPreResolved<Spec extends ContractRawRowSpec<CT>, CT extends Record<string, {
|
|
281
|
+
readonly output: unknown;
|
|
282
|
+
}>> = { [K in keyof Spec as typeof columnOutput extends keyof Spec[K] ? K : never]: NonNullable<Spec[K][typeof columnOutput & keyof Spec[K]]>; };
|
|
283
|
+
/** The row a spec declares, resolved against the contract's codec types. */
|
|
284
|
+
type RawRowFor<Spec extends ContractRawRowSpec<CodecTypes>, CodecTypes extends Record<string, {
|
|
285
|
+
readonly output: unknown;
|
|
286
|
+
}>> = ResolveRow<SpecScopeFields<Spec, CodecTypes>, CodecTypes, SpecPreResolved<Spec, CodecTypes>>;
|
|
287
|
+
/**
|
|
288
|
+
* A raw template bound to the contract: the same builder the target-agnostic
|
|
289
|
+
* surface returns, with terminators that resolve their row type from the spec.
|
|
290
|
+
*/
|
|
291
|
+
interface ContractRawBuilder<CodecTypes extends Record<string, {
|
|
292
|
+
readonly output: unknown;
|
|
293
|
+
}>> extends RawSqlBuilder {
|
|
294
|
+
/**
|
|
295
|
+
* The expression terminator, narrowed to the contract's codec ids. The
|
|
296
|
+
* target-agnostic tag takes any string, because the contract-free lane has
|
|
297
|
+
* no map to key against; a contract-bound fragment does, so the ids it can
|
|
298
|
+
* name are the ones the contract carries — and naming them makes them
|
|
299
|
+
* complete at the call site.
|
|
300
|
+
*/
|
|
301
|
+
returns<S extends keyof CodecTypes & string>(spec: S): Expression<{
|
|
302
|
+
codecId: S;
|
|
303
|
+
nullable: false;
|
|
304
|
+
}>;
|
|
305
|
+
returns<S extends keyof CodecTypes & string, N extends boolean = false>(spec: {
|
|
306
|
+
readonly codecId: S;
|
|
307
|
+
readonly nullable?: N;
|
|
308
|
+
}): Expression<{
|
|
309
|
+
codecId: S;
|
|
310
|
+
nullable: N;
|
|
311
|
+
}>;
|
|
312
|
+
returnsRow<Spec extends ContractRawRowSpec<CodecTypes>>(spec: Spec): RawRowQuery<RawRowFor<Spec, CodecTypes>>;
|
|
313
|
+
affectedCount(): RawAffectedCountQuery;
|
|
314
|
+
}
|
|
315
|
+
/** The contract-bound raw tag, as `db.raw` exposes it. */
|
|
316
|
+
type ContractRawTag<CodecTypes extends Record<string, {
|
|
317
|
+
readonly output: unknown;
|
|
318
|
+
}>> = (strings: TemplateStringsArray, ...values: RawSqlInterpolation[]) => ContractRawBuilder<CodecTypes>;
|
|
319
|
+
/** The raw tag for a contract, with its codec-type map already applied. */
|
|
320
|
+
type RawTagFor<C extends TableProxyContract> = ContractRawTag<ExtractCodecTypes<C>>;
|
|
321
|
+
//#endregion
|
|
217
322
|
//#region src/types/mutation-query.d.ts
|
|
218
323
|
type ReturningCapability = {
|
|
219
324
|
sql: {
|
|
@@ -370,6 +475,16 @@ type ResolvedUpdateExpressions<Table extends StorageTable> = { [K in keyof Table
|
|
|
370
475
|
codecId: Table['columns'][K]['codecId'];
|
|
371
476
|
nullable: boolean;
|
|
372
477
|
}>; };
|
|
478
|
+
/**
|
|
479
|
+
* The table's columns as raw row specs read them: each carries its codec id,
|
|
480
|
+
* its nullability, and the type the contract resolved it to, so naming one in
|
|
481
|
+
* a spec inherits all three.
|
|
482
|
+
*/
|
|
483
|
+
type ColumnRefs<C extends TableProxyContract, NsId extends string, Name extends string, Columns = NamespaceTable<C, NsId, Name>['columns'], Resolved = ResolvedColumnTypes<C, NsId, Name>> = { readonly [K in keyof Columns & string]: ContractColumnRef<Columns[K] extends {
|
|
484
|
+
readonly codecId: infer Id extends string;
|
|
485
|
+
} ? Id : string, Columns[K] extends {
|
|
486
|
+
readonly nullable: infer N extends boolean;
|
|
487
|
+
} ? N : boolean, K extends keyof Resolved ? Resolved[K] : unknown>; };
|
|
373
488
|
type ContractToQC<C extends TableProxyContract, NsId extends string = string, Name extends string = string> = {
|
|
374
489
|
readonly codecTypes: ExtractCodecTypes<C>;
|
|
375
490
|
readonly capabilities: C['capabilities'];
|
|
@@ -378,6 +493,8 @@ type ContractToQC<C extends TableProxyContract, NsId extends string = string, Na
|
|
|
378
493
|
readonly aggregateTypes: ExtractAggregateTypes<C>;
|
|
379
494
|
};
|
|
380
495
|
interface TableProxy<C extends TableProxyContract, NsId extends string, Name extends string, Alias extends string = Name, AvailableScope extends Scope = DefaultScope<Name, NamespaceTable<C, NsId, Name>>, QC extends QueryContext = ContractToQC<C, NsId, Name>> extends JoinSource<StorageTableToScopeTable<NamespaceTable<C, NsId, Name>>, Alias>, WithSelect<QC, AvailableScope, EmptyRow>, WithJoin<QC, AvailableScope, C['capabilities']> {
|
|
496
|
+
/** The table's columns, for naming in a raw statement's row spec. */
|
|
497
|
+
readonly columns: ColumnRefs<C, NsId, Name>;
|
|
381
498
|
as<NewAlias extends string>(newAlias: NewAlias): TableProxy<C, NsId, Name, NewAlias, RebindScope<AvailableScope, Alias, NewAlias>, QC>;
|
|
382
499
|
insert(rows: ReadonlyArray<ResolvedInsertValues<C, NsId, NamespaceTable<C, NsId, Name>, Name, QC['codecTypes']>>): InsertQuery<QC, AvailableScope, EmptyRow>;
|
|
383
500
|
update(set: ResolvedUpdateValues<C, NsId, NamespaceTable<C, NsId, Name>, Name, QC['codecTypes']>): UpdateQuery<QC, AvailableScope, EmptyRow>;
|
|
@@ -410,7 +527,18 @@ type TableNamesAcrossNamespaces<C extends TableProxyContract> = { [NSId in keyof
|
|
|
410
527
|
type TableInAnyNamespace<C extends TableProxyContract, Name extends string> = { [NSId in keyof C['storage']['namespaces']]: Name extends keyof TablesInNamespace<C['storage']['namespaces'][NSId]> ? TablesInNamespace<C['storage']['namespaces'][NSId]>[Name] : never; }[keyof C['storage']['namespaces']];
|
|
411
528
|
type NamespaceTable<C extends TableProxyContract, NsId extends string, Name extends string> = TablesInNamespace<C['storage']['namespaces'][NsId]>[Name];
|
|
412
529
|
type Namespace<C extends TableProxyContract, NsId extends string & keyof C['storage']['namespaces']> = { readonly [Name in keyof TablesInNamespace<C['storage']['namespaces'][NsId]> & string]: TableProxy<C, NsId, Name>; };
|
|
413
|
-
|
|
530
|
+
/**
|
|
531
|
+
* The contract-bound SQL surface: one facet per storage namespace, plus the
|
|
532
|
+
* raw tag for statements the builders do not express.
|
|
533
|
+
*
|
|
534
|
+
* `raw` sits beside the namespace facets because a whole-query raw statement
|
|
535
|
+
* is a peer of the table proxies, not something reached through one — it names
|
|
536
|
+
* its own tables. The tag binds the adapter's codec inferer and the contract
|
|
537
|
+
* once, here, so an authoring site carries only its template and row spec.
|
|
538
|
+
*/
|
|
539
|
+
type Db<C extends TableProxyContract> = { readonly [Ns in keyof C['storage']['namespaces'] & string]: Namespace<C, Ns>; } & {
|
|
540
|
+
readonly raw: RawTagFor<C>;
|
|
541
|
+
};
|
|
414
542
|
//#endregion
|
|
415
543
|
export { TableNamesAcrossNamespaces as _, FieldProxy as a, UnboundTables as b, GroupedQuery as c, QueryContext as d, ResolveRow as f, TableInAnyNamespace as g, Subquery as h, DeleteQuery as i, InsertQuery as l, SelectQuery as m, BooleanCodecType as n, Functions as o, Scope as p, Db as r, GatedMethod as s, AggregateFunctions as t, Namespace as u, TableProxy as v, UpdateQuery as x, TableProxyContract as y };
|
|
416
|
-
//# sourceMappingURL=db-
|
|
544
|
+
//# sourceMappingURL=db-D18PrXKW-DvTv4JFn.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"db-D18PrXKW-DvTv4JFn.d.mts","names":[],"sources":["../../../../2-sql/4-lanes/sql-builder/dist/db-D18PrXKW.d.mts"],"mappings":";;;;;;;;;;;KAMK,YAAY,cAAc,UAAU,UAAU,qBAAqB,WAAW;cACrE;cACA;KACT,OAAO,QAAQ,WAAW,IAAI,EAAE;KAChC,WAAW,cAAc;KACzB,aAAa,eAAe;KAC5B;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AAY,IAAI,gBAAgB;EACnJ,OAAO,KAAK,qBAAqB,GAAG,MAAM,eAAe,GAAG,MAAM,OAAO,MAAM,oBAAoB,YAAY,IAAI,gBAAgB;EACnI,OAAO,WAAW,QAAQ,WAAW,iBAAiB,KAAK,UAAU,QAAQ,0BAA0B,eAAe,GAAG,MAAM,SAAS,YAAY,IAAI,gBAAgB;EACxK,UAAU,YAAY,IAAI,gBAAgB;;;;KAIvC,mBAAmB,eAAe;KAClC,mBAAmB,SAAS,eAAe,SAAS;KACpD,kBAAkB,SAAS;WACrB,QAAQ,SAAS;;KAEvB;WACM;aACE,YAAY;;WAEd;aACE,YAAY,SAAS;eACnB,SAAS;;;WAGb,cAAc;;KAEpB,kBAAkB;WACZ,SAAS;KACf,+BAA+B,SAAS,eAAe,iBAAiB,yBAAyB,SAAS,eAAe;KACzH,cAAc,UAAU,kCAAkC,QAAQ,2BAA2B,KAAK,oBAAoB,GAAG;KACzH,2BAA2B,UAAU,yBAAyB,cAAc,mCAAmC,kBAAkB,2BAA2B,yBAAyB;KACrL,oBAAoB,UAAU,oBAAoB,0BAA0B,cAAc,6BAA6B,mBAAmB,kBAAkB,2BAA2B,SAAS,kBAAkB,2BAA2B,OAAO,uBAAuB;KAC3Q,eAAe,UAAU,oBAAoB,qBAAqB,uBAAuB,kBAAkB,2BAA2B,OAAO;KAC7I,UAAU,UAAU,oBAAoB,4BAA4B,0CAA0C,cAAc,kBAAkB,2BAA2B,kBAAkB,WAAW,GAAG,MAAM;;;;;;;;;;KAU/M,GAAG,UAAU,kCAAkC,YAAY,sCAAsC,UAAU,GAAG;WACxG,KAAK,UAAU"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as ReferentialAction } from "./foreign-key-C-iTPuRT-C9ip8zFx.mjs";
|
|
2
2
|
import "./types-UcHa2cTe.mjs";
|
|
3
|
-
import { T as CodecRef$1, p as AnyParamRef } from "./types-
|
|
3
|
+
import { T as CodecRef$1, p as AnyParamRef } from "./types-v3qxLLxo-DCeKv7yY.mjs";
|
|
4
4
|
import { ColumnDefaultLiteralInputValue } from "@prisma/orm-framework/contract/types";
|
|
5
|
-
//#region ../../../2-sql/4-lanes/relational-core/dist/ddl-types-
|
|
5
|
+
//#region ../../../2-sql/4-lanes/relational-core/dist/ddl-types-CXx4vPz6.d.mts
|
|
6
6
|
//#region src/ast/ddl-types.d.ts
|
|
7
7
|
/**
|
|
8
8
|
* Render-time context the column-default visitor needs to make dialect
|
|
@@ -145,4 +145,4 @@ declare class CheckExpressionConstraint {
|
|
|
145
145
|
type DdlTableConstraint = PrimaryKeyConstraint | ForeignKeyConstraint | UniqueConstraint | CheckExpressionConstraint;
|
|
146
146
|
//#endregion
|
|
147
147
|
export { DdlColumnDefaultVisitor as a, DdlTableConstraint as c, LiteralColumnDefault as d, PrimaryKeyConstraint as f, DdlColumnDefault as i, ForeignKeyConstraint as l, isDdlNode as m, CheckExpressionConstraint as n, DdlColumnRenderContext as o, UniqueConstraint as p, DdlColumn as r, DdlNode as s, AnyDdlColumnDefault as t, FunctionColumnDefault as u };
|
|
148
|
-
//# sourceMappingURL=ddl-types-
|
|
148
|
+
//# sourceMappingURL=ddl-types-CXx4vPz6-BsgrnSUY.d.mts.map
|
package/dist/{ddl-types-BtT82FGO-Du_-9SlZ.d.mts.map → ddl-types-CXx4vPz6-BsgrnSUY.d.mts.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ddl-types-
|
|
1
|
+
{"version":3,"file":"ddl-types-CXx4vPz6-BsgrnSUY.d.mts","names":[],"sources":["../../../../2-sql/4-lanes/relational-core/dist/ddl-types-CXx4vPz6.d.mts"],"mappings":";;;;;;;;;;;;;;;UAaU;WACC;;UAED,wBAAwB;EAChC,QAAQ,MAAM,sBAAsB,KAAK,yBAAyB;EAClE,SAAS,MAAM,uBAAuB,KAAK,yBAAyB;;uBAE/C;oBACH;WACT,OAAO,GAAG,SAAS,wBAAwB,IAAI,KAAK,yBAAyB;YAC5E;;cAEE,6BAA6B;WAChC;WACA,OAAO;EAChB,YAAY,OAAO;EACnB,OAAO,GAAG,SAAS,wBAAwB,IAAI,KAAK,yBAAyB;;cAEjE,8BAA8B;WACjC;WACA;EACT,YAAY;EACZ,OAAO,GAAG,SAAS,wBAAwB,IAAI,KAAK,yBAAyB;;KAE1E,sBAAsB,uBAAuB;cACpC;WACH;WACA;WACA;WACA;WACA,UAAU;;WAEV,WAAW;EACpB,YAAY;aACD;aACA;aACA;aACA;aACA,UAAU;aACV,WAAW;;;uBAGD;oBACH;;;;;;;EAOlB;YACU;EACV,oBAAoB;;iBAEL,UAAU,iBAAiB,SAAS;;;;;;;;cAQvC;WACH;WACA,SAAS;WACT;EACT,YAAY;aACD;aACA;;;;;;;;;;cAUC;WACH;WACA,SAAS;WACT;WACA,YAAY;WACZ,UAAU;WACV,UAAU;WACV;EACT,YAAY;aACD;aACA;aACA;aACA,WAAW;aACX,WAAW;aACX;;;;;;;;;;cAUC;WACH;WACA,SAAS;WACT;EACT,YAAY;aACD;aACA;;;;;;;;;;;;cAYC;WACH;WACA;WACA;EACT,YAAY;aACD;aACA;;;KAGR,qBAAqB,uBAAuB,uBAAuB,mBAAmB"}
|
|
@@ -5,7 +5,7 @@ import { t as sqlContractCanonicalizationHooks } from "./canonicalization-hooks-
|
|
|
5
5
|
import { c as StorageTable, i as Index, t as CheckConstraint } from "./storage-table-ZzbR-xzQ-BRoTQE_2.mjs";
|
|
6
6
|
import { n as checkConstraintInputFromSerialized } from "./serialized-index-nBTwanKy-_ddEK4tk.mjs";
|
|
7
7
|
import { m as valueSetEntityKind, p as tableEntityKind } from "./entity-kinds-D7vwoN_T-CCBwFJy0.mjs";
|
|
8
|
-
import { r as materializeForeignKeysAndIndexes } from "./foreign-key-materialization-
|
|
8
|
+
import { r as materializeForeignKeysAndIndexes } from "./foreign-key-materialization-Cu7-7LHl.mjs";
|
|
9
9
|
import { t as validateIndexTypes } from "./index-type-validation-COH4d78M.mjs";
|
|
10
10
|
import { t as createIndexTypeRegistry } from "./index-types-DJQ_xwaE.mjs";
|
|
11
11
|
import { a as SqlStorage, o as applyFkDefaults, s as isMaterializedSqlNamespace, u as toStorageTypeInstance } from "./types-CUsJrvEl.mjs";
|
|
@@ -1054,4 +1054,4 @@ function withoutDerivedChecks(tableName, table, contractDefault) {
|
|
|
1054
1054
|
//#endregion
|
|
1055
1055
|
export { buildSqlContractFromDefinition as n, contractError as r, applySqlSpecifierControlPolicy as t };
|
|
1056
1056
|
|
|
1057
|
-
//# sourceMappingURL=derived-checks-DFMRmiAu-
|
|
1057
|
+
//# sourceMappingURL=derived-checks-DFMRmiAu-DGfB8aS4.mjs.map
|