@prisma/orm-family-mongo 8.0.0-rc.22-dev.11 → 8.0.0-rc.22-dev.13
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/{authoring-entity-types-J_patbMZ-C509nMfw.mjs → authoring-entity-types-qeRu8r5L-kYG8jSMg.mjs} +3 -2
- package/dist/authoring-entity-types-qeRu8r5L-kYG8jSMg.mjs.map +1 -0
- package/dist/config-types-D4SnQaTy.mjs.map +1 -1
- package/dist/{contract-builder-Cr65NhJk.mjs → contract-builder-BUa0Oz34.mjs} +105 -10
- package/dist/contract-builder-BUa0Oz34.mjs.map +1 -0
- package/dist/{contract-builder-DurxXsaj.d.mts → contract-builder-x1bl1wIr.d.mts} +20 -5
- package/dist/contract-builder-x1bl1wIr.d.mts.map +1 -0
- package/dist/contract-prisma6__provider.mjs +83 -8
- package/dist/contract-prisma6__provider.mjs.map +1 -1
- package/dist/contract-psl.d.mts +6 -1
- package/dist/contract-psl.d.mts.map +1 -1
- package/dist/contract-psl.mjs +1 -1
- package/dist/contract-psl__provider.mjs +1 -1
- package/dist/contract-psl__provider.mjs.map +1 -1
- package/dist/contract-ts.d.mts +2 -2
- package/dist/contract-ts.mjs +2 -2
- package/dist/contract-ts__contract-builder.d.mts +2 -2
- package/dist/contract-ts__contract-builder.mjs +2 -2
- package/dist/contract.d.mts +3 -3
- package/dist/contract.mjs +3 -3
- package/dist/contract__entity-kinds.d.mts +1 -1
- package/dist/contract__entity-kinds.mjs +1 -1
- package/dist/{control-0YmjHGNw.d.mts → control-CJLG6g2G.d.mts} +5 -6
- package/dist/{control-0YmjHGNw.d.mts.map → control-CJLG6g2G.d.mts.map} +1 -1
- package/dist/{control-DMkn0GMN.d.mts → control-CvUovwse.d.mts} +6 -6
- package/dist/{control-DMkn0GMN.d.mts.map → control-CvUovwse.d.mts.map} +1 -1
- package/dist/{control-DzA3bjX-.mjs → control-P83KyI0L.mjs} +8 -7
- package/dist/control-P83KyI0L.mjs.map +1 -0
- package/dist/{control-adapter-BheElqfe-iFCyJUfP.d.mts → control-adapter-BheElqfe-DxUxWoeq.d.mts} +4 -4
- package/dist/{control-adapter-BheElqfe-iFCyJUfP.d.mts.map → control-adapter-BheElqfe-DxUxWoeq.d.mts.map} +1 -1
- package/dist/control-adapter-DfRH_2nl.d.mts +1 -0
- package/dist/{control-BQMBG11d.mjs → control-ywVRqK1i.mjs} +4 -7
- package/dist/{control-BQMBG11d.mjs.map → control-ywVRqK1i.mjs.map} +1 -1
- package/dist/{dist-BbJV26vR.mjs → dist-BXMjjRsI.mjs} +2 -2
- package/dist/{dist-BbJV26vR.mjs.map → dist-BXMjjRsI.mjs.map} +1 -1
- package/dist/dist-BhDqnAiz.mjs.map +1 -1
- package/dist/{dist-B-Ml8wpa.mjs → dist-By5gbTEW.mjs} +10 -5
- package/dist/dist-By5gbTEW.mjs.map +1 -0
- package/dist/{entity-kinds-BI-PWX8L-DRxc2Flr.mjs → entity-kinds-D5mTQzuZ-BY1vGgFk.mjs} +6 -2
- package/dist/entity-kinds-D5mTQzuZ-BY1vGgFk.mjs.map +1 -0
- package/dist/{execution-CGierEKK.d.mts → execution-B3Fogex9.d.mts} +3 -3
- package/dist/{execution-CGierEKK.d.mts.map → execution-B3Fogex9.d.mts.map} +1 -1
- package/dist/{exports-B2tu3O-g.mjs → exports-BRIh38XT.mjs} +9 -3
- package/dist/exports-BRIh38XT.mjs.map +1 -0
- package/dist/family.d.mts +9 -9
- package/dist/family.mjs +8 -8
- package/dist/family__control-adapter.d.mts +2 -2
- package/dist/family__control.d.mts +1 -1
- package/dist/family__control.mjs +2 -2
- package/dist/family__ir.d.mts +2 -2
- package/dist/family__ir.mjs +3 -3
- package/dist/family__migration.d.mts +1 -1
- package/dist/family__migration.mjs +1 -1
- package/dist/family__pack.mjs +2 -2
- package/dist/family__pack.mjs.map +1 -1
- package/dist/family__runtime.d.mts +2 -2
- package/dist/family__runtime.mjs +1 -1
- package/dist/family__schema-verify.d.mts +1 -1
- package/dist/family__schema-verify.mjs +1 -1
- package/dist/{field-accessor-CqKt9hxI-AngsT5mI.d.mts → field-accessor-CqKt9hxI-CI_pUKZN.d.mts} +4 -4
- package/dist/{field-accessor-CqKt9hxI-AngsT5mI.d.mts.map → field-accessor-CqKt9hxI-CI_pUKZN.d.mts.map} +1 -1
- package/dist/{index-DXhwK4nr.d.mts → index-BK3HyX9U.d.mts} +4 -4
- package/dist/{index-DXhwK4nr.d.mts.map → index-BK3HyX9U.d.mts.map} +1 -1
- package/dist/{index-TNRD-MRI.d.mts → index-BrDXnKtf.d.mts} +4 -4
- package/dist/{index-TNRD-MRI.d.mts.map → index-BrDXnKtf.d.mts.map} +1 -1
- package/dist/{index-D21Pb9vL.d.mts → index-D6MtleDl.d.mts} +11 -4
- package/dist/index-D6MtleDl.d.mts.map +1 -0
- package/dist/{index-DcQFfwkK.d.mts → index-JpsaTpKi.d.mts} +9 -5
- package/dist/{index-DcQFfwkK.d.mts.map → index-JpsaTpKi.d.mts.map} +1 -1
- package/dist/{interpreter-BX0gy2Yu-Byy8LdrE.mjs → interpreter-DpW_wEiP-Clp24cvz.mjs} +70 -17
- package/dist/interpreter-DpW_wEiP-Clp24cvz.mjs.map +1 -0
- package/dist/{ir-BGD9W6Cu.mjs → ir-Bm8xm1eu.mjs} +2 -2
- package/dist/{ir-BGD9W6Cu.mjs.map → ir-Bm8xm1eu.mjs.map} +1 -1
- package/dist/{ir-DH1ciHWj.d.mts → ir-BzKq60Lv.d.mts} +4 -4
- package/dist/{ir-DH1ciHWj.d.mts.map → ir-BzKq60Lv.d.mts.map} +1 -1
- package/dist/lowering.d.mts +1 -1
- package/dist/{migration-DDXXsPCK.mjs → migration-LHRzvIrb.mjs} +2 -2
- package/dist/{migration-DDXXsPCK.mjs.map → migration-LHRzvIrb.mjs.map} +1 -1
- package/dist/{migration-fjq98toS.d.mts → migration-VHZaMXZ5.d.mts} +5 -5
- package/dist/{migration-fjq98toS.d.mts.map → migration-VHZaMXZ5.d.mts.map} +1 -1
- package/dist/{mongo-contract-serializer-BBknnHWy-BYVYfFCj.mjs → mongo-contract-serializer-BBknnHWy-DAzm09wB.mjs} +3 -3
- package/dist/{mongo-contract-serializer-BBknnHWy-BYVYfFCj.mjs.map → mongo-contract-serializer-BBknnHWy-DAzm09wB.mjs.map} +1 -1
- package/dist/{mongo-contract-view-AnejqfrQ-CPjNHMFu.d.mts → mongo-contract-view-AnejqfrQ-CIb7qlMp.d.mts} +3 -3
- package/dist/{mongo-contract-view-AnejqfrQ-CPjNHMFu.d.mts.map → mongo-contract-view-AnejqfrQ-CIb7qlMp.d.mts.map} +1 -1
- package/dist/{mongo-contract-view-CF5trX6R-D-7KBBF2.mjs → mongo-contract-view-CF5trX6R-BIF8ciuY.mjs} +3 -3
- package/dist/{mongo-contract-view-CF5trX6R-D-7KBBF2.mjs.map → mongo-contract-view-CF5trX6R-BIF8ciuY.mjs.map} +1 -1
- package/dist/{mongo-value-set-DAGBOegv-B0Vel8d-.d.mts → mongo-value-set-bK4eBlxO-BCGb8sSL.d.mts} +5 -2
- package/dist/{mongo-value-set-DAGBOegv-B0Vel8d-.d.mts.map → mongo-value-set-bK4eBlxO-BCGb8sSL.d.mts.map} +1 -1
- package/dist/orm.d.mts +3 -3
- package/dist/orm.mjs +2 -2
- package/dist/query-ast.d.mts +4 -4
- package/dist/query-ast.mjs +2 -2
- package/dist/query-ast__control.d.mts +3 -3
- package/dist/query-ast__control.mjs +2 -2
- package/dist/query-ast__execution.d.mts +1 -1
- package/dist/query-builder.d.mts +4 -4
- package/dist/query-builder.mjs +1 -1
- package/dist/query-builder__contract-free.d.mts +4 -4
- package/dist/query-builder__contract-free.mjs +1 -1
- package/dist/{runtime-ZGXLjqEe.d.mts → runtime-Bf-SFBMj.d.mts} +2 -2
- package/dist/runtime-Bf-SFBMj.d.mts.map +1 -0
- package/dist/runtime.d.mts +5 -5
- package/dist/schema-ir.d.mts +1 -1
- package/dist/schema-ir.mjs +1 -1
- package/dist/{schema-verify-CpWcSHyM.d.mts → schema-verify-BJAMkVFt.d.mts} +4 -4
- package/dist/{schema-verify-CpWcSHyM.d.mts.map → schema-verify-BJAMkVFt.d.mts.map} +1 -1
- package/dist/{verify-mongo-schema-CyvUewwP-DwSUNc5f.mjs → verify-mongo-schema-D8rznxzZ-CjYf39zu.mjs} +34 -23
- package/dist/verify-mongo-schema-D8rznxzZ-CjYf39zu.mjs.map +1 -0
- package/dist/wire.d.mts +2 -2
- package/package.json +20 -20
- package/dist/authoring-entity-types-J_patbMZ-C509nMfw.mjs.map +0 -1
- package/dist/contract-builder-Cr65NhJk.mjs.map +0 -1
- package/dist/contract-builder-DurxXsaj.d.mts.map +0 -1
- package/dist/control-DzA3bjX-.mjs.map +0 -1
- package/dist/control-adapter-lmZYICe8.d.mts +0 -1
- package/dist/dist-B-Ml8wpa.mjs.map +0 -1
- package/dist/entity-kinds-BI-PWX8L-DRxc2Flr.mjs.map +0 -1
- package/dist/exports-B2tu3O-g.mjs.map +0 -1
- package/dist/index-D21Pb9vL.d.mts.map +0 -1
- package/dist/interpreter-BX0gy2Yu-Byy8LdrE.mjs.map +0 -1
- package/dist/runtime-ZGXLjqEe.d.mts.map +0 -1
- package/dist/verify-mongo-schema-CyvUewwP-DwSUNc5f.mjs.map +0 -1
package/dist/{field-accessor-CqKt9hxI-AngsT5mI.d.mts → field-accessor-CqKt9hxI-CI_pUKZN.d.mts}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { C as MongoContract, V as MongoModelsMap, a as ExtractMongoTypeMaps, ct as OwnStoredNameOf, o as InferModelRow, t as AnyMongoTypeMaps, w as MongoContractWithTypeMaps } from "./mongo-value-set-
|
|
2
|
-
import "./index-
|
|
1
|
+
import { C as MongoContract, V as MongoModelsMap, a as ExtractMongoTypeMaps, ct as OwnStoredNameOf, o as InferModelRow, t as AnyMongoTypeMaps, w as MongoContractWithTypeMaps } from "./mongo-value-set-bK4eBlxO-BCGb8sSL.mjs";
|
|
2
|
+
import "./index-JpsaTpKi.mjs";
|
|
3
3
|
import { f as MongoValue } from "./index-9DDQlC5U.mjs";
|
|
4
4
|
import { B as MongoFilterExpr, d as MongoAggAccumulator, m as MongoAggExpr, vt as MongoUpdatePipelineStage } from "./query-plan-C7sSU3Al-wzsJKtml.mjs";
|
|
5
|
-
import "./execution-
|
|
5
|
+
import "./execution-B3Fogex9.mjs";
|
|
6
6
|
import { ContractValueObjectAt, ValueObjectReference } from "@prisma/orm-framework/contract/types";
|
|
7
7
|
//#region ../../../2-mongo-family/5-query-builders/query-builder/dist/field-accessor-CqKt9hxI.d.mts
|
|
8
8
|
//#region src/types.d.ts
|
|
@@ -598,4 +598,4 @@ declare function expr(predicate: TypedAggExpr<DocField>): MongoFilterExpr;
|
|
|
598
598
|
declare function createFieldAccessor<S extends DocShape, N extends NestedDocShape = Record<string, never>>(): FieldAccessor<S, N>;
|
|
599
599
|
//#endregion
|
|
600
600
|
export { TypedUpdateOp as A, ProjectedShape as C, StringField as D, SortSpec as E, expr as F, UpdaterResult as M, ValidPaths as N, TypedAccumulatorExpr as O, createFieldAccessor as P, PathCompletions as S, ResolveRow as T, NullableDocField as _, DocShape as a, ObjectExpression as b, FieldAccessor as c, LeafExpression as d, LiteralValue as f, NestedDocShape as g, ModelToDocShape as h, DocField as i, UnwoundShape as j, TypedAggExpr as k, GroupSpec as l, ModelNestedShape as m, BooleanField as n, Expression as o, ModelArrayField as p, DateField as r, ExtractDocShape as s, ArrayField as t, GroupedDocShape as u, NullableNumericField as v, ResolvePath as w, ObjectField as x, NumericField as y };
|
|
601
|
-
//# sourceMappingURL=field-accessor-CqKt9hxI-
|
|
601
|
+
//# sourceMappingURL=field-accessor-CqKt9hxI-CI_pUKZN.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field-accessor-CqKt9hxI-
|
|
1
|
+
{"version":3,"file":"field-accessor-CqKt9hxI-CI_pUKZN.d.mts","names":[],"sources":["../../../../2-mongo-family/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AU,WAAW,IAAI,MAAM,MAAM,WAAW,YAAY,GAAG;WAC3M,OAAO;;;;;;;;;;;;;;;EAehB,QAAQ,UAAU,WAAW,UAAU,eAAe,eAAe;;;;;;;;;iBAStD,KAAK,WAAW,aAAa,YAAY;;;;;;;;;;;iBAWzC,oBAAoB,UAAU,UAAU,UAAU,iBAAiB,0BAA0B,cAAc,GAAG"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as CreateCollectionOptions, r as CreateIndexesOptions, t as CollationOptions } from "./mongodb-types-B4HmhF1S.mjs";
|
|
2
|
-
import { j as MongoIndexKeyDirection } from "./mongo-value-set-
|
|
2
|
+
import { j as MongoIndexKeyDirection } from "./mongo-value-set-bK4eBlxO-BCGb8sSL.mjs";
|
|
3
3
|
import { i as Document, p as RawPipeline } from "./index-9DDQlC5U.mjs";
|
|
4
|
-
import { a as CollModOptions, l as CreateIndexOptions, s as CreateCollectionOptions$1 } from "./control-
|
|
5
|
-
import "./execution-
|
|
4
|
+
import { a as CollModOptions, l as CreateIndexOptions, s as CreateCollectionOptions$1 } from "./control-CJLG6g2G.mjs";
|
|
5
|
+
import "./execution-B3Fogex9.mjs";
|
|
6
6
|
//#region ../../../2-mongo-family/6-transport/mongo-wire/dist/index.d.mts
|
|
7
7
|
//#region src/wire-commands.d.ts
|
|
8
8
|
declare abstract class MongoWireCommand {
|
|
@@ -139,4 +139,4 @@ type AnyMongoWireCommand = AnyMongoDmlWireCommand | AnyMongoDdlWireCommand;
|
|
|
139
139
|
declare function isDdlWireCommand(cmd: AnyMongoWireCommand): cmd is AnyMongoDdlWireCommand;
|
|
140
140
|
//#endregion
|
|
141
141
|
export { UpdateManyWireCommand as _, CollModWireCommand as a, DeleteManyWireCommand as c, DropIndexWireCommand as d, FindOneAndDeleteWireCommand as f, RenameCollectionWireCommand as g, InsertOneWireCommand as h, AnyMongoWireCommand as i, DeleteOneWireCommand as l, InsertManyWireCommand as m, AnyMongoDdlWireCommand as n, CreateCollectionWireCommand as o, FindOneAndUpdateWireCommand as p, AnyMongoDmlWireCommand as r, CreateIndexWireCommand as s, AggregateWireCommand as t, DropCollectionWireCommand as u, UpdateOneWireCommand as v, isDdlWireCommand as y };
|
|
142
|
-
//# sourceMappingURL=index-
|
|
142
|
+
//# sourceMappingURL=index-BK3HyX9U.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-BK3HyX9U.d.mts","names":[],"sources":["../../../../2-mongo-family/6-transport/mongo-wire/dist/index.d.mts"],"mappings":";;;;;;;uBAKuB;oBACH;WACT;YACC,YAAY;YACZ;;cAEE,6BAA6B;WAChC;WACA,UAAU;EACnB,YAAY,oBAAoB,UAAU;;cAE9B,6BAA6B;WAChC;WACA,QAAQ;WACR,QAAQ,WAAW,cAAc;WACjC;EACT,YAAY,oBAAoB,QAAQ,UAAU,QAAQ,WAAW,cAAc,WAAW;;cAElF,6BAA6B;WAChC;WACA,QAAQ;EACjB,YAAY,oBAAoB,QAAQ;;cAE5B,8BAA8B;WACjC;WACA,WAAW,cAAc;EAClC,YAAY,oBAAoB,WAAW,cAAc;;cAE7C,8BAA8B;WACjC;WACA,QAAQ;WACR,QAAQ,WAAW,cAAc;WACjC;WACA;EACT,YAAY,oBAAoB,QAAQ,UAAU,QAAQ,WAAW,cAAc,WAAW,kBAAkB;;cAEpG,8BAA8B;WACjC;WACA,QAAQ;EACjB,YAAY,oBAAoB,QAAQ;;cAE5B,oCAAoC;WACvC;WACA,QAAQ;WACR,QAAQ,WAAW,cAAc;WACjC;WACA,MAAM;;;;;WAKN;EACT,YAAY,oBAAoB,QAAQ,UAAU,QAAQ,WAAW,cAAc,WAAW,kBAAkB,OAAO,wBAAwB;;cAEnI,oCAAoC;WACvC;WACA,QAAQ;WACR,MAAM;EACf,YAAY,oBAAoB,QAAQ,UAAU,OAAO;;cAE7C,6BAA6B;WAChC;WACA,UAAU;EACnB,YAAY,oBAAoB,UAAU;;cAE9B,oCAAoC,4BAA4B;WACnE;WACA,YAAY;WACZ;WACA;WACA;WACA;WACA;WACA;IACP;IACA;IACA;;WAEO,YAAY;WACZ;IACP;;WAEO;IACP,KAAK;IACL;IACA;;EAEF,YAAY,oBAAoB,SAAS;;cAE7B,+BAA+B,4BAA4B;WAC9D;WACA,KAAK,eAAe;WACpB;WACA;WACA;WACA,0BAA0B;WAC1B;WACA,qBAAqB;WACrB,YAAY;WACZ,UAAU;WACV;WACA;EACT,YAAY,oBAAoB,KAAK,eAAe,yBAAyB,SAAS;;cAE1E,kCAAkC;WACrC;EACT,YAAY;;cAEA,oCAAoC;WACvC;WACA;EACT,YAAY,oBAAoB;;cAEpB,6BAA6B;WAChC;WACA;EACT,YAAY,oBAAoB;;cAEpB,2BAA2B;WAC9B;WACA,YAAY;WACZ;WACA;WACA;IACP;;EAEF,YAAY,oBAAoB,SAAS;;KAEtC,yBAAyB,uBAAuB,wBAAwB,uBAAuB,wBAAwB,uBAAuB,wBAAwB,8BAA8B,8BAA8B;KAClO,yBAAyB,8BAA8B,yBAAyB,4BAA4B,8BAA8B,uBAAuB;KACjK,sBAAsB,yBAAyB;iBACnC,iBAAiB,KAAK,sBAAsB,OAAO"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { rt as MongoQueryPlan } from "./query-plan-C7sSU3Al-wzsJKtml.mjs";
|
|
2
|
-
import { t as AnyMongoDdlCommand } from "./control-
|
|
3
|
-
import "./execution-
|
|
4
|
-
import { i as AnyMongoWireCommand, n as AnyMongoDdlWireCommand, r as AnyMongoDmlWireCommand } from "./index-
|
|
2
|
+
import { t as AnyMongoDdlCommand } from "./control-CJLG6g2G.mjs";
|
|
3
|
+
import "./execution-B3Fogex9.mjs";
|
|
4
|
+
import { i as AnyMongoWireCommand, n as AnyMongoDdlWireCommand, r as AnyMongoDmlWireCommand } from "./index-BK3HyX9U.mjs";
|
|
5
5
|
import { CodecCallContext } from "@prisma/orm-framework/components/codec";
|
|
6
6
|
import { ControlDriverInstance } from "@prisma/orm-framework/components/control";
|
|
7
7
|
import { Db } from "mongodb";
|
|
@@ -152,4 +152,4 @@ interface MongoControlDriverInstance extends ControlDriverInstance<'mongo', 'mon
|
|
|
152
152
|
}
|
|
153
153
|
//#endregion
|
|
154
154
|
export { MongoLoweredDraft as a, MongoDriver as i, MongoControlDriverInstance as n, MongoQueryable as o, MongoDdlPlan as r, MongoAdapter as t };
|
|
155
|
-
//# sourceMappingURL=index-
|
|
155
|
+
//# sourceMappingURL=index-BrDXnKtf.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-BrDXnKtf.d.mts","names":[],"sources":["../../../../2-mongo-family/6-transport/mongo-lowering/dist/index.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;KAkBK;WACM;WACA;WACA,UAAU;;WAEV;WACA;WACA,WAAW,cAAc;;WAEzB;WACA;WACA,QAAQ;WACR,QAAQ,0BAA0B,cAAc;WAChD;;WAEA;WACA;WACA,QAAQ;WACR,QAAQ,0BAA0B,cAAc;WAChD;;WAEA;WACA;WACA,QAAQ;;WAER;WACA;WACA,QAAQ;;WAER;WACA;WACA,QAAQ;WACR,QAAQ,0BAA0B,cAAc;WAChD;WACA,MAAM;WACN;;WAEA;WACA;WACA,QAAQ;WACR,MAAM;;WAEN;WACA;WACA,UAAU,cAAc;;WAExB;WACA;WACA,UAAU;;WAEV;WACA;WACA,WAAW,cAAc;;WAEzB;WACA;WACA,QAAQ;WACR,QAAQ,0BAA0B,cAAc;;WAEhD;WACA;WACA,QAAQ;WACR,QAAQ,0BAA0B,cAAc;WAChD;;WAEA;WACA;WACA,QAAQ;;WAER;WACA;WACA,QAAQ;;WAER;WACA;WACA,QAAQ;WACR,QAAQ,0BAA0B,cAAc;WAChD;WACA,MAAM;WACN;;WAEA;WACA;WACA,QAAQ;WACR,MAAM;;WAEN;WACA;WACA,UAAU,cAAc;;;UAGzB;WACC,SAAS;;UAEV;EACR,MAAM,MAAM,cAAc,KAAK,mBAAmB,QAAQ;EAC1D,MAAM,MAAM,gBAAgB,KAAK,mBAAmB,QAAQ;EAC5D,MAAM,MAAM,iBAAiB,cAAc,KAAK,mBAAmB,QAAQ;;;;;;;;;;;EAW3E,gBAAgB,MAAM,iBAAiB;;;;;;;;;EASvC,cAAc,OAAO,mBAAmB,KAAK,mBAAmB,QAAQ;;;;UAIhE;EACR,QAAQ,KAAK,aAAa,yBAAyB,cAAc;EACjE,IAAI,aAAa,yBAAyB;;UAElC,YAAY,yBAAyB;EAC7C,QAAQ,SAAS,WAAW;EAC5B,SAAS;;UAED,mCAAmC,yCAAyC;WAC3E,IAAI"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as CollationOptions } from "./mongodb-types-B4HmhF1S.mjs";
|
|
2
|
-
import { A as MongoIndexKey } from "./mongo-value-set-
|
|
3
|
-
import "./index-
|
|
2
|
+
import { A as MongoIndexKey } from "./mongo-value-set-bK4eBlxO-BCGb8sSL.mjs";
|
|
3
|
+
import "./index-JpsaTpKi.mjs";
|
|
4
4
|
import { IRNodeBase } from "@prisma/orm-framework/components/ir";
|
|
5
5
|
import { DiffableNode } from "@prisma/orm-framework/components/control";
|
|
6
6
|
//#region ../../../2-mongo-family/3-tooling/mongo-schema-ir/dist/exports/index.d.mts
|
|
@@ -13,6 +13,7 @@ declare function deepEqual(a: unknown, b: unknown): boolean;
|
|
|
13
13
|
//#endregion
|
|
14
14
|
//#region src/schema-index.d.ts
|
|
15
15
|
interface MongoSchemaIndexOptions {
|
|
16
|
+
readonly name: string;
|
|
16
17
|
readonly keys: ReadonlyArray<MongoIndexKey>;
|
|
17
18
|
readonly unique?: boolean | undefined;
|
|
18
19
|
readonly sparse?: boolean | undefined;
|
|
@@ -26,7 +27,9 @@ interface MongoSchemaIndexOptions {
|
|
|
26
27
|
}
|
|
27
28
|
declare class MongoSchemaIndex extends MongoSchemaIRNode {
|
|
28
29
|
readonly nodeKind: "index";
|
|
30
|
+
/** The index name, which MongoDB keeps unique within a collection. */
|
|
29
31
|
readonly id: string;
|
|
32
|
+
readonly name: string;
|
|
30
33
|
readonly keys: ReadonlyArray<MongoIndexKey>;
|
|
31
34
|
readonly unique: boolean;
|
|
32
35
|
readonly sparse?: boolean | undefined;
|
|
@@ -48,8 +51,12 @@ declare class MongoSchemaIR extends MongoSchemaIRNode {
|
|
|
48
51
|
readonly id = "schema";
|
|
49
52
|
readonly collections: ReadonlyArray<MongoSchemaCollection>;
|
|
50
53
|
readonly collectionNames: ReadonlyArray<string>;
|
|
54
|
+
/** Whether the schema was read from a database, which reports some index options with server defaults filled in. */
|
|
55
|
+
readonly fromDatabase: boolean;
|
|
51
56
|
private readonly _byName;
|
|
52
|
-
constructor(collections: ReadonlyArray<MongoSchemaCollection
|
|
57
|
+
constructor(collections: ReadonlyArray<MongoSchemaCollection>, options: {
|
|
58
|
+
readonly fromDatabase: boolean;
|
|
59
|
+
});
|
|
53
60
|
accept<R>(visitor: MongoSchemaVisitor<R>): R;
|
|
54
61
|
collection(name: string): MongoSchemaCollection | undefined;
|
|
55
62
|
}
|
|
@@ -171,4 +178,4 @@ declare class MongoSchemaCollection extends MongoSchemaIRNode {
|
|
|
171
178
|
type AnyMongoSchemaNode = MongoSchemaIR | MongoSchemaCollection | MongoSchemaCollectionOptions | MongoSchemaIndex | MongoSchemaValidator;
|
|
172
179
|
//#endregion
|
|
173
180
|
export { MongoSchemaCollectionOptionsInput as a, MongoSchemaIndex as c, MongoSchemaValidatorOptions as d, MongoSchemaVisitor as f, MongoSchemaCollectionOptions as i, MongoSchemaIndexOptions as l, MongoSchemaCollection as n, MongoSchemaIR as o, deepEqual as p, MongoSchemaCollectionCtorOptions as r, MongoSchemaIRNode as s, AnyMongoSchemaNode as t, MongoSchemaValidator as u };
|
|
174
|
-
//# sourceMappingURL=index-
|
|
181
|
+
//# sourceMappingURL=index-D6MtleDl.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-D6MtleDl.d.mts","names":[],"sources":["../../../../2-mongo-family/3-tooling/mongo-schema-ir/dist/exports/index.d.mts"],"mappings":";;;;;;;;;;;iBASiB,UAAU,YAAY;;;UAG7B;WACC;WACA,MAAM,cAAc;WACpB;WACA;WACA;WACA,0BAA0B;WAC1B,qBAAqB;WACrB,YAAY;WACZ,UAAU;WACV;WACA;;cAEG,yBAAyB;WAC5B;;WAEA;WACA;WACA,MAAM,cAAc;WACpB;WACA;WACA;WACA,0BAA0B;WAC1B,qBAAqB;WACrB,YAAY;WACZ,UAAU;WACV;WACA;EACT,YAAY,SAAS;EACrB,OAAO,GAAG,SAAS,mBAAmB,KAAK;;;;cAI/B,sBAAsB;WACzB;;WAEA;WACA,aAAa,cAAc;WAC3B,iBAAiB;;WAEjB;mBACQ;EACjB,YAAY,aAAa,cAAc,wBAAwB;aACpD;;EAEX,OAAO,GAAG,SAAS,mBAAmB,KAAK;EAC3C,WAAW,eAAe;;;;UAIlB;WACC,YAAY;WACZ;WACA;;cAEG,6BAA6B;WAChC;;WAEA;WACA,YAAY;WACZ;WACA;EACT,YAAY,SAAS;EACrB,OAAO,GAAG,SAAS,mBAAmB,KAAK;;;;UAInC,mBAAmB;EAC3B,OAAO,MAAM,gBAAgB;EAC7B,WAAW,MAAM,wBAAwB;EACzC,MAAM,MAAM,mBAAmB;EAC/B,UAAU,MAAM,uBAAuB;EACvC,kBAAkB,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;uBAkBlC,0BAA0B,sBAAsB;WAC5D;oBACS;;oBAEA;WACT,OAAO,GAAG,SAAS,mBAAmB,KAAK;EACpD;EACA,UAAU,OAAO;EACjB,qBAAqB;;;;UAIb;WACC;IACP;IACA;;WAEO;IACP;IACA;IACA;;WAEO,YAAY;WACZ;IACP;;WAEO;IACP;;;cAGU,qCAAqC;WACxC;;WAEA;WACA;IACP;IACA;;WAEO;IACP;IACA;IACA;;WAEO,YAAY;WACZ;IACP;;WAEO;IACP;;EAEF,YAAY,SAAS;EACrB,OAAO,GAAG,SAAS,mBAAmB,KAAK;;;;UAInC;WACC;WACA,UAAU,cAAc;WACxB,YAAY;WACZ,UAAU;;cAEP,8BAA8B;WACjC;WACA;WACA;WACA,SAAS,cAAc;WACvB,YAAY;WACZ,UAAU;EACnB,YAAY,SAAS;EACrB,OAAO,GAAG,SAAS,mBAAmB,KAAK;;;;KAIxC,qBAAqB,gBAAgB,wBAAwB,+BAA+B,mBAAmB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as MongoIndexKey, B as MongoModelStorage, C as MongoContract, Q as MongoValidator, T as MongoIndex, at as MongoValueSetInput, it as MongoValueSet, k as MongoIndexInput, nt as MongoValueObject, rt as MongoValueObjectInput, v as MongoCollection, y as MongoCollectionInput } from "./mongo-value-set-
|
|
1
|
+
import { A as MongoIndexKey, B as MongoModelStorage, C as MongoContract, Q as MongoValidator, T as MongoIndex, at as MongoValueSetInput, it as MongoValueSet, k as MongoIndexInput, nt as MongoValueObject, rt as MongoValueObjectInput, v as MongoCollection, y as MongoCollectionInput } from "./mongo-value-set-bK4eBlxO-BCGb8sSL.mjs";
|
|
2
2
|
import { RelationKeys, RelationNamesOf, Scalars, Shape, ShapeSpec } from "@prisma/orm-framework/components/runtime";
|
|
3
3
|
import { TypeLookups } from "@prisma/orm-framework/components/codec";
|
|
4
4
|
import { DefaultNamespaceEntries, IRNodeBase, Namespace, NamespaceBase, NamespacedEntities, SingleNamespaceView, Storage } from "@prisma/orm-framework/components/ir";
|
|
@@ -215,6 +215,10 @@ type MongoContractView<TContract extends MongoContract = MongoContract> = TContr
|
|
|
215
215
|
*/
|
|
216
216
|
declare function buildMongoContractView<TContract extends MongoContract>(contract: TContract): MongoContractView<TContract>;
|
|
217
217
|
//#endregion
|
|
218
|
+
//#region src/default-index-name.d.ts
|
|
219
|
+
/** The name MongoDB gives an index created without one: each key's field and direction, joined by `_`, such as `email_1` or `title_text`. */
|
|
220
|
+
declare function defaultMongoIndexName(keys: ReadonlyArray<MongoIndexKey>): string;
|
|
221
|
+
//#endregion
|
|
218
222
|
//#region src/default-namespace.d.ts
|
|
219
223
|
/** Default storage namespace for Mongo-family contracts at runtime. */
|
|
220
224
|
declare const defaultMongoStorageNamespaceId: "__unbound__";
|
|
@@ -257,14 +261,14 @@ declare function deriveCollectionValidators(input: CollectionValidatorsInput): R
|
|
|
257
261
|
declare function documentIdRefusalReason(codecId: string, forbidden: readonly string[]): string;
|
|
258
262
|
//#endregion
|
|
259
263
|
//#region src/index-lookup-key.d.ts
|
|
260
|
-
/** The index options that tell two indexes on the same keys apart: every option of an index. */
|
|
264
|
+
/** The index options that tell two indexes on the same keys apart: every option of an index. The name is not an option. */
|
|
261
265
|
declare const MONGO_INDEX_OPTION_KEYS: readonly ["unique", "sparse", "expireAfterSeconds", "partialFilterExpression", "wildcardProjection", "collation", "weights", "default_language", "language_override"];
|
|
262
266
|
type MongoIndexOptionKey = (typeof MONGO_INDEX_OPTION_KEYS)[number];
|
|
263
267
|
/** An index as `indexLookupKey` reads it: the contract's `MongoIndex` and the schema IR's index both fit. */
|
|
264
268
|
type MongoIndexLookupInput = {
|
|
265
269
|
readonly keys: ReadonlyArray<MongoIndexKey>;
|
|
266
270
|
} & { readonly [Option in MongoIndexOptionKey]?: MongoIndexInput[Option] | undefined; };
|
|
267
|
-
/** Identifies an index by its keys and the options it sets; an option set to `false` counts as unset. No field name or option value can make two different indexes share a key. */
|
|
271
|
+
/** Identifies an index by its keys and the options it sets, not by its name; an option set to `false` counts as unset. No field name or option value can make two different indexes share a key. */
|
|
268
272
|
declare function indexLookupKey(index: MongoIndexLookupInput): string;
|
|
269
273
|
//#endregion
|
|
270
274
|
//#region src/ir/build-mongo-namespace.d.ts
|
|
@@ -381,5 +385,5 @@ declare function validatorRootShapesOf(jsonSchema: unknown): readonly ValidatorR
|
|
|
381
385
|
/** Every field name a collection validator declares, for a root model or for a variant. */
|
|
382
386
|
declare function validatorFieldNamesOf(jsonSchema: unknown): ReadonlySet<string>;
|
|
383
387
|
//#endregion
|
|
384
|
-
export {
|
|
385
|
-
//# sourceMappingURL=index-
|
|
388
|
+
export { mongoValueSetsOf as $, ValidatorShape as A, createMongoNamespaceEnvelopeSchema as B, RelationKeys as C, ShapeSpec as D, Shape as E, canonicalize as F, documentIdRefusalReason as G, defaultMongoIndexName as H, collectionControlPoliciesOf as I, indexLookupKey as J, fieldBsonTypeRefusalOf as K, collectionControlPolicyOf as L, buildMongoContractView as M, buildMongoNamespace as N, StorageValueSetSchema as O, buildMongoStorage as P, mongoModelsOf as Q, collectionRootModelsOf as R, PolymorphicIndexScope as S, Scalars as T, defaultMongoStorageNamespaceId as U, defaultMongoDomainNamespaceId as V, deriveCollectionValidators as W, modelAndBasesOf as X, isEmbedRelation as Y, mongoContractRefusalsOf as Z, MongoNamespaceEntries as _, FieldBsonTypeRefusal as a, resolveMongoToOneRelationFields as at, MongoToOneRelationFields as b, MONGO_INDEX_OPTION_KEYS as c, validateMongoStorage as ct, MongoContractRefusalsInput as d, validatorFieldNamesOf as dt, ownDocumentIdFieldOf as et, MongoContractSchema as f, validatorRootShapesOf as ft, MongoNamespace as g, MongoIndexOptionKey as h, DOCUMENT_ID as i, ownStoredNamesOf as it, applyPolymorphicScopeToMongoIndex as j, ValidatorRootShape as k, MongoContractAccessors as l, validatorEnumMemberRefusalOf as lt, MongoIndexLookupInput as m, CollectionControlPolicies as n, ownFieldStoredAs as nt, FieldOwner as o, storedNamesOf as ot, MongoContractView as p, valueObjectStoredNamesOf as pt, hasOwnFieldStoredAs as q, CollectionValidatorsInput as r, ownStoredNameOf as rt, FieldValueSets as s, unsupportedStoredNameReason as st, ApplyScopeResult as t, ownEmbedStoredNamesOf as tt, MongoContractRefusal as u, validatorEnumRefusalOf as ut, MongoStorage as v, RelationNamesOf as w, MongoUnboundNamespace as x, MongoStorageInput as y, createMongoContractSchema as z };
|
|
389
|
+
//# sourceMappingURL=index-JpsaTpKi.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-JpsaTpKi.d.mts","names":[],"sources":["../../../../2-mongo-family/1-foundation/mongo-contract/dist/index.d.mts"],"mappings":";;;;;;;;KAOK,wBAAwB,SAAS,eAAe,SAAS;WACnD,aAAa,SAAS,eAAe;WACrC,WAAW,SAAS,eAAe;WACnC,cAAc,SAAS,eAAe;;UAEvC;WACC;WACA,SAAS,SAAS,eAAe,SAAS;aACxC,aAAa,SAAS,eAAe;aACrC,WAAW,SAAS,eAAe;aACnC,cAAc,SAAS,eAAe;;;KAG9C,iBAAiB;WACX,SAAS;;UAEV,kBAAkB;WACjB,aAAa,gBAAgB;WAC7B,YAAY,SAAS,eAAe;;cAEjC,aAAa,uCAAuC,sBAAsB;WAC7E;WACA,aAAa,gBAAgB;WAC7B,YAAY,SAAS,eAAe;EAC7C,YAAY,OAAO,kBAAkB;;;;;;;iBAOtB,kBAAkB;WACxB;WACA,aAAa,SAAS,eAAe;WACrC,WAAW,SAAS,eAAe;WACnC,eAAe,SAAS,eAAe;IAC9C;;;iBAGa,aAAa;;;;UAIpB;WACC,aAAa,SAAS,eAAe;WACrC,sBAAsB;;;iBAGhB,4BAA4B;WAClC;aACE,YAAY,SAAS;eACnB;iBACE,aAAa,SAAS;mBACpB,UAAU;;;;;WAKlB,uBAAuB;IAC9B;;iBAEa,0BAA0B,oBAAoB,UAAU,4BAA4B;;;KAGhG,cAAc,KAAK;;;;iBAIP,uBAAuB,QAAQ,eAAe,eAAe;;;;;;KAMzE;WACM;WACA;;WAEA;WACA;WACA;;;;;iBAKM,uBAAuB,iBAAiB,SAAS,cAAc;;;KAG3E;WACM;WACA;;WAEA;WACA;;;;;KAKN;WACM;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;WACA,SAAS;;WAET;WACA;WACA;WACA;;WAEA;WACA;WACA;WACA;WACA;;WAEA;WACA,OAAO;WACP;WACA;WACA,SAAS;;WAET;WACA;;WAEA;WACA;WACA;;WAEA;W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AK,cAAc,6BAA6B,QAAQ,SAAS,eAAe,SAAS,6BAA6B;;;KAGhK;WACM;WACA;;KAEN;WACM;WACA,OAAO;;WAEP;WACA;;iBAEM,kCAAkC,OAAO,YAAY,OAAO,wBAAwB;;;KAGhG;;WAEM;;WAEA;aACE;aACA;;;;;;;iBAOI,gCAAgC,OAAO,cAAc,oBAAoB,UAAU,wBAAwB;;iBAE3G,gBAAgB,UAAU,mBAAmB,YAAY;;;;cAI5D;KACT,mBAAmB,KAAK,cAAc;;iBAE1B,4BAA4B;;iBAE5B,iBAAiB,OAAO,mBAAmB,SAAS;;iBAEpD,yBAAyB,aAAa,KAAK,iCAAiC,SAAS;;iBAErF,gBAAgB,OAAO,kBAAkB;;iBAEzC,iBAAiB,OAAO,kBAAkB;;iBAE1C,oBAAoB,OAAO,kBAAkB;;iBAE7C,qBAAqB,OAAO;WAClC;WACA,OAAO;;;;;iBAKD,sBAAsB,OAAO,KAAK,cAAc,+CAA+C,SAAS;;iBAExG,cAAc,QAAQ,SAAS,eAAe,mBAAmB,KAAK,cAAc,+BAA+B,oBAAoB,SAAS;;;iBAGhJ,qBAAqB,UAAU;;;;;;iBAM/B,uBAAuB;;;;iBAIvB,6BAA6B,8BAA8B;;;;UAIlE;WACC,YAAY,SAAS;WACrB;;;UAGD,2BAA2B;WAC1B,mBAAmB;;;;;iBAKb,sBAAsB,+BAA+B;;iBAErD,sBAAsB,sBAAsB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./dist-
|
|
2
|
-
import { r as buildMongoContractFromDefinition, u as mergeRedundantIndexes } from "./contract-builder-
|
|
1
|
+
import "./dist-By5gbTEW.mjs";
|
|
2
|
+
import { f as nameIndexes, r as buildMongoContractFromDefinition, u as mergeRedundantIndexes } from "./contract-builder-BUa0Oz34.mjs";
|
|
3
3
|
import { blindCast } from "@prisma/orm-framework/utils/casts";
|
|
4
4
|
import { ifDefined } from "@prisma/orm-framework/utils/defined";
|
|
5
5
|
import { crossRef } from "@prisma/orm-framework/contract/types";
|
|
@@ -11,7 +11,7 @@ import { resolveToOneRelationNullable } from "@prisma/orm-framework/contract-aut
|
|
|
11
11
|
import { describeDiscriminatorRefusal, enumMemberProblemDiagnostic, instantiateAuthoringEntityType, instantiateAuthoringTypeAlias, instantiateAuthoringTypeConstructor, isAuthoringEntityTypeDescriptor, resolveTypeAliasGenerators } from "@prisma/orm-framework/components/authoring";
|
|
12
12
|
import { claimedBlockKeywords, consumeInvalidFkPairing, enumMemberAttributeDiagnostics, fkRelationPairKey, instantiatePslTypeChoice, isBareTypeConstructor, reportTypeConstructorNotCalled, requiredOneToOneBackrelationDiagnostic, unsupportedBlockDiagnostic } from "@prisma/orm-framework/psl-parser/interpret";
|
|
13
13
|
import { bool, contributedTypeAliasOf, contributedTypeOf, createPslDiagnosticCollector, diagnosticSource, entityRef, fieldAttribute, fieldRef, funcCall, generatorAttributeSpec, identifier, int, interpretAttribute, interpretExtensionBlocks, isContributedTypeChoice, json, list, mapPslDiagnostics, modelAttribute, nodePslSpan, num, oneOf, optional, record, referencedFieldRef, refuseRepeatedTypeAliasAttributes, resolveTypeAliases, str, typeAliasSpecContext, typeAttributeSpecContextOfField, typeAttributeSubjectLabel, typeGeneratorAttributeSpec, typeReferenceNode, writtenScalar } from "@prisma/orm-framework/psl-parser";
|
|
14
|
-
//#region ../../../2-mongo-family/2-authoring/contract-psl/dist/interpreter-
|
|
14
|
+
//#region ../../../2-mongo-family/2-authoring/contract-psl/dist/interpreter-DpW_wEiP.mjs
|
|
15
15
|
function buildModelAttributeCtx(input) {
|
|
16
16
|
return {
|
|
17
17
|
sources: input.sources,
|
|
@@ -97,7 +97,14 @@ const mapFieldSpec = fieldAttribute("map", {
|
|
|
97
97
|
}]
|
|
98
98
|
});
|
|
99
99
|
const idFieldSpec = fieldAttribute("id", { documentation: "Marks the field stored as `_id`, the document’s id. The field must be stored as `_id`: name it `_id` or add `@map(\"_id\")`. A model may leave `@id` out; its documents still get an ObjectId `_id`." });
|
|
100
|
-
const
|
|
100
|
+
const indexMapArg = {
|
|
101
|
+
type: optional(str()),
|
|
102
|
+
documentation: "The name MongoDB stores the index under. Without it, the index is named after its keys and directions, such as `email_1`."
|
|
103
|
+
};
|
|
104
|
+
const uniqueFieldSpec = fieldAttribute("unique", {
|
|
105
|
+
documentation: "Requires values in this field to be unique across the collection.",
|
|
106
|
+
named: { map: indexMapArg }
|
|
107
|
+
});
|
|
101
108
|
const relationFieldSpec = fieldAttribute("relation", {
|
|
102
109
|
documentation: "Names a relation and associates local fields with fields on the referenced model.",
|
|
103
110
|
positional: [{
|
|
@@ -214,6 +221,7 @@ function buildIndexModelSpec(name) {
|
|
|
214
221
|
documentation: name === "unique" ? "The nonempty list of indexed fields, optionally with sort directions. Wildcard scopes are not supported." : "The nonempty list of indexed fields, optionally with sort directions or a wildcard scope."
|
|
215
222
|
}],
|
|
216
223
|
named: {
|
|
224
|
+
map: indexMapArg,
|
|
217
225
|
type: {
|
|
218
226
|
type: optional(oneOf(num(1), num(-1), str("text"), str("2dsphere"), str("2d"), str("hashed"))),
|
|
219
227
|
documentation: "The MongoDB index key type: ascending `1`, descending `-1`, text, geospatial, or hashed."
|
|
@@ -259,6 +267,7 @@ function buildTextIndexModelSpec() {
|
|
|
259
267
|
documentation: "The nonempty list of fields whose text is indexed."
|
|
260
268
|
}],
|
|
261
269
|
named: {
|
|
270
|
+
map: indexMapArg,
|
|
262
271
|
filter: {
|
|
263
272
|
type: optional(json()),
|
|
264
273
|
documentation: "A JSON partial-filter expression limiting which documents are indexed."
|
|
@@ -391,6 +400,11 @@ function modelSitesOf(sites, model) {
|
|
|
391
400
|
if (modelSites === void 0) throw new InternalError(`A refused model "${model}" has sites.`);
|
|
392
401
|
return modelSites;
|
|
393
402
|
}
|
|
403
|
+
function indexSiteOf(sites, model, position) {
|
|
404
|
+
const site = modelSitesOf(sites, model).indexes[position];
|
|
405
|
+
if (site === void 0) throw new InternalError(`Index ${position} of "${model}" has a site.`);
|
|
406
|
+
return site;
|
|
407
|
+
}
|
|
394
408
|
function at(site, code, message) {
|
|
395
409
|
return {
|
|
396
410
|
code,
|
|
@@ -541,10 +555,16 @@ function refusalDiagnostic(refusal, sites) {
|
|
|
541
555
|
case "indexFieldUnknown": return at(site, "PSL_INDEX_FIELD_NOT_FOUND", `Index on model "${model}" references unknown field "${refusal.fieldName}"`);
|
|
542
556
|
case "indexShape": return at(site, "PSL_INVALID_INDEX", refusal.rule === "wildcard-with-type" ? `wildcard() fields cannot be combined with type: ${wildcardTypeOf(site.index)}` : INDEX_SHAPE_MESSAGES[refusal.rule](model));
|
|
543
557
|
case "indexScopeConflict": return at(site, "PSL_INVALID_INDEX", `Variant "${model}" index conflicts with discriminator scope: ${refusal.reason}`);
|
|
544
|
-
case "indexDuplicate":
|
|
558
|
+
case "indexDuplicate": return at(site, "PSL_INVALID_INDEX", `${site.label} has the same keys and options as ${indexSiteOf(sites, refusal.firstModel, refusal.firstPosition).label}, in collection "${refusal.collection}", but another name. MongoDB cannot hold both. Remove one of them, or give them the same \`map\`.`);
|
|
545
559
|
}
|
|
546
560
|
break;
|
|
547
561
|
}
|
|
562
|
+
case "indexNameDuplicate": {
|
|
563
|
+
const { model, position } = refusal.key;
|
|
564
|
+
const site = modelSitesOf(sites, model).indexes[position];
|
|
565
|
+
if (site === void 0) throw new InternalError(`Index ${position} of "${model}" has a site.`);
|
|
566
|
+
return at(site, "PSL_INVALID_INDEX", `${site.label} is named "${refusal.name}", as is ${indexSiteOf(sites, refusal.firstModel, refusal.firstPosition).label}, in collection "${refusal.collection}". An index without \`map\` is named after its keys and directions. Give one of them another name with \`map\`.`);
|
|
567
|
+
}
|
|
548
568
|
case "generatedOnValueObject": return generatedOnValueObjectDiagnostic(fieldSiteOf(sites, refusal.key), refusal.key.owner.name);
|
|
549
569
|
case "generatorPhaseSetTwice": throw new InternalError(`Field "${refusal.key.owner.name}.${refusal.key.field}" sets a phase twice, which PSL refuses as a repeated type alias attribute before building.`);
|
|
550
570
|
case "generatedList": return generatedListDiagnostic(fieldSiteOf(sites, refusal.key), `Field "${refusal.key.owner.name}.${refusal.key.field}"`);
|
|
@@ -1044,6 +1064,7 @@ function buildNormalIndex(parsed, unique, ctx) {
|
|
|
1044
1064
|
return {
|
|
1045
1065
|
fields: resolved.fields,
|
|
1046
1066
|
options: indexOptions({
|
|
1067
|
+
...ifDefined("name", parsed.map),
|
|
1047
1068
|
...unique && { unique: true },
|
|
1048
1069
|
...ifDefined("sparse", parsed.sparse),
|
|
1049
1070
|
...ifDefined("expireAfterSeconds", parsed.expireAfterSeconds),
|
|
@@ -1072,6 +1093,7 @@ function buildTextIndex(parsed, ctx) {
|
|
|
1072
1093
|
return {
|
|
1073
1094
|
fields: resolved.fields,
|
|
1074
1095
|
options: indexOptions({
|
|
1096
|
+
...ifDefined("name", parsed.map),
|
|
1075
1097
|
...ifDefined("partialFilterExpression", parsed.filter),
|
|
1076
1098
|
...ifDefined("collation", collation),
|
|
1077
1099
|
...ifDefined("weights", parsed.weights),
|
|
@@ -1108,9 +1130,10 @@ function collectIndexes(pslModel, specContext, sources, binder, diagnostics) {
|
|
|
1108
1130
|
const indexes = [];
|
|
1109
1131
|
for (const field of Object.values(pslModel.fields)) {
|
|
1110
1132
|
if (fieldTypeResolution(field, binder)?.kind === "model") continue;
|
|
1111
|
-
const
|
|
1112
|
-
|
|
1113
|
-
if (
|
|
1133
|
+
const uniqueAttribute = field.attributes.find((attr) => attr.name === "unique");
|
|
1134
|
+
const uniqueNode = uniqueAttribute?.node;
|
|
1135
|
+
if (!uniqueAttribute || !uniqueNode) continue;
|
|
1136
|
+
const unique = interpretFieldAttribute({
|
|
1114
1137
|
symbols: specContext.symbols,
|
|
1115
1138
|
node: uniqueNode,
|
|
1116
1139
|
spec: mongoAttributeSpecs.field.unique({
|
|
@@ -1124,14 +1147,25 @@ function collectIndexes(pslModel, specContext, sources, binder, diagnostics) {
|
|
|
1124
1147
|
sources,
|
|
1125
1148
|
binder,
|
|
1126
1149
|
diagnostics
|
|
1127
|
-
})
|
|
1150
|
+
});
|
|
1151
|
+
if (unique === void 0) continue;
|
|
1152
|
+
const source = diagnosticSource(sources, uniqueNode.syntax);
|
|
1153
|
+
const span = nodePslSpan(uniqueNode.syntax, sources);
|
|
1154
|
+
if (unique.map === "") {
|
|
1155
|
+
reportEmptyIndexMap(diagnostics, source, span);
|
|
1156
|
+
continue;
|
|
1157
|
+
}
|
|
1128
1158
|
indexes.push({
|
|
1129
1159
|
index: {
|
|
1130
1160
|
fields: { [field.name]: 1 },
|
|
1131
|
-
options: {
|
|
1161
|
+
options: {
|
|
1162
|
+
unique: true,
|
|
1163
|
+
...ifDefined("name", unique.map)
|
|
1164
|
+
}
|
|
1132
1165
|
},
|
|
1133
|
-
source
|
|
1134
|
-
span
|
|
1166
|
+
source,
|
|
1167
|
+
span,
|
|
1168
|
+
label: `${attributeText("@", uniqueAttribute)} on field "${pslModel.name}.${field.name}"`
|
|
1135
1169
|
});
|
|
1136
1170
|
}
|
|
1137
1171
|
for (const attr of pslModel.attributes) {
|
|
@@ -1179,14 +1213,33 @@ function collectIndexes(pslModel, specContext, sources, binder, diagnostics) {
|
|
|
1179
1213
|
if (!parsed) continue;
|
|
1180
1214
|
index = buildNormalIndex(parsed, unique, ctx);
|
|
1181
1215
|
}
|
|
1182
|
-
if (index
|
|
1216
|
+
if (index === void 0) continue;
|
|
1217
|
+
if (index.options?.name === "") {
|
|
1218
|
+
reportEmptyIndexMap(diagnostics, source, attr.span);
|
|
1219
|
+
continue;
|
|
1220
|
+
}
|
|
1221
|
+
indexes.push({
|
|
1183
1222
|
index,
|
|
1184
1223
|
source,
|
|
1185
|
-
span: attr.span
|
|
1224
|
+
span: attr.span,
|
|
1225
|
+
label: `${attributeText("@@", attr)} on model "${pslModel.name}"`
|
|
1186
1226
|
});
|
|
1187
1227
|
}
|
|
1188
1228
|
return indexes;
|
|
1189
1229
|
}
|
|
1230
|
+
/** An attribute as the schema writes it, with its arguments as written. */
|
|
1231
|
+
function attributeText(prefix, attribute) {
|
|
1232
|
+
if (attribute.args.length === 0) return `${prefix}${attribute.name}`;
|
|
1233
|
+
const args = attribute.args.map((arg) => arg.kind === "named" ? `${arg.name}: ${arg.value}` : arg.value);
|
|
1234
|
+
return `${prefix}${attribute.name}(${args.join(", ")})`;
|
|
1235
|
+
}
|
|
1236
|
+
function reportEmptyIndexMap(diagnostics, source, span) {
|
|
1237
|
+
diagnostics.push({
|
|
1238
|
+
code: "PSL_INVALID_INDEX",
|
|
1239
|
+
message: "The `map` argument of an index cannot be an empty string.",
|
|
1240
|
+
...source.at(span)
|
|
1241
|
+
});
|
|
1242
|
+
}
|
|
1190
1243
|
function fieldTypeResolution(field, binder) {
|
|
1191
1244
|
const node = typeReferenceNode(field);
|
|
1192
1245
|
return node === void 0 ? void 0 : binder.symbolForNode(node);
|
|
@@ -1771,7 +1824,7 @@ function interpretPslDocumentToMongoContract(input) {
|
|
|
1771
1824
|
...node,
|
|
1772
1825
|
relations: relationsByModel.get(node.modelName) ?? []
|
|
1773
1826
|
}));
|
|
1774
|
-
const { definition, removedIndexes } = mergeRedundantIndexes({
|
|
1827
|
+
const { definition, removedIndexes } = mergeRedundantIndexes(nameIndexes({
|
|
1775
1828
|
target: input.target,
|
|
1776
1829
|
...ifDefined("extensions", input.extensionPacks),
|
|
1777
1830
|
models: [...modelNodes.filter((model) => model.base === void 0), ...modelNodes.filter((model) => model.base !== void 0)],
|
|
@@ -1779,7 +1832,7 @@ function interpretPslDocumentToMongoContract(input) {
|
|
|
1779
1832
|
enums: enumHandles,
|
|
1780
1833
|
writesCollectionValidators: true,
|
|
1781
1834
|
warnings: void 0
|
|
1782
|
-
}, codecLookup, input.dataTypes);
|
|
1835
|
+
}), codecLookup, input.dataTypes);
|
|
1783
1836
|
const sites = {
|
|
1784
1837
|
models: withoutMergedIndexSites(modelSites, removedIndexes),
|
|
1785
1838
|
fields: fieldSites,
|
|
@@ -1801,4 +1854,4 @@ function interpretPslDocumentToMongoContract(input) {
|
|
|
1801
1854
|
//#endregion
|
|
1802
1855
|
export { pairMongoBackRelations as i, interpretPslDocumentToMongoContract as n, mongoAttributeSpecs as r, describeUnsupportedMongoAttribute as t };
|
|
1803
1856
|
|
|
1804
|
-
//# sourceMappingURL=interpreter-
|
|
1857
|
+
//# sourceMappingURL=interpreter-DpW_wEiP-Clp24cvz.mjs.map
|