@prisma-next/mongo-value 0.0.1 → 0.3.0-dev.147
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/index.d.mts +29 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +19 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +1 -1
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
//#region src/param-ref.d.ts
|
|
2
|
+
declare class MongoParamRef {
|
|
3
|
+
readonly value: unknown;
|
|
4
|
+
readonly name: string | undefined;
|
|
5
|
+
readonly codecId: string | undefined;
|
|
6
|
+
constructor(value: unknown, options?: {
|
|
7
|
+
name?: string;
|
|
8
|
+
codecId?: string;
|
|
9
|
+
});
|
|
10
|
+
static of(value: unknown, options?: {
|
|
11
|
+
name?: string;
|
|
12
|
+
codecId?: string;
|
|
13
|
+
}): MongoParamRef;
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
//#region src/values.d.ts
|
|
17
|
+
type LiteralValue = string | number | boolean | null | Date;
|
|
18
|
+
type MongoValue = MongoParamRef | LiteralValue | MongoDocument | MongoArray;
|
|
19
|
+
interface MongoDocument {
|
|
20
|
+
readonly [key: string]: MongoValue;
|
|
21
|
+
}
|
|
22
|
+
interface MongoArray extends ReadonlyArray<MongoValue> {}
|
|
23
|
+
type MongoExpr = MongoDocument;
|
|
24
|
+
type MongoUpdateDocument = Record<string, MongoValue>;
|
|
25
|
+
type RawPipeline = ReadonlyArray<Record<string, unknown>>;
|
|
26
|
+
type Document = Record<string, unknown>;
|
|
27
|
+
//#endregion
|
|
28
|
+
export { type Document, type LiteralValue, type MongoArray, type MongoDocument, type MongoExpr, MongoParamRef, type MongoUpdateDocument, type MongoValue, type RawPipeline };
|
|
29
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/param-ref.ts","../src/values.ts"],"sourcesContent":[],"mappings":";cAAa,aAAA;EAAA,SAAA,KAAA,EAAa,OAAA;;;qCCGD;IADb,IAAA,CAAA,EAAA,MAAY;IACZ,OAAA,CAAA,EAAU,MAAA;EAAG,CAAA;EAAgB,OAAA,EAAA,CAAA,KAAA,EAAA,OAAA,EAAA,OAAyC,CAAzC,EAAA;IAAe,IAAA,CAAA,EAAA,MAAA;IAAgB,OAAA,CAAA,EAAA,MAAA;EAAU,CAAA,CAAA,EDSN,aCTM;AAClF;;;ADJa,KCED,YAAA,GDFc,MAYkD,GAAA,MAAA,GAAa,OAAA,GAAA,IAAA,GCV3B,IDU2B;KCT7E,UAAA,GAAa,gBAAgB,eAAe,gBAAgB;UACvD,aAAA;0BACS;AAH1B;AACY,UAIK,UAAA,SAAmB,aAJd,CAI4B,UAJ5B,CAAA,CAAA;AAAmB,KAK7B,SAAA,GAAY,aALiB;AAAe,KAM5C,mBAAA,GAAsB,MANsB,CAAA,MAAA,EAMP,UANO,CAAA;AAAgB,KAO5D,WAAA,GAAc,aAP8C,CAOhC,MAPgC,CAAA,MAAA,EAAA,OAAA,CAAA,CAAA;AAAU,KAQtE,QAAA,GAAW,MAR2D,CAAA,MAAA,EAAA,OAAA,CAAA"}
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
//#region src/param-ref.ts
|
|
2
|
+
var MongoParamRef = class MongoParamRef {
|
|
3
|
+
value;
|
|
4
|
+
name;
|
|
5
|
+
codecId;
|
|
6
|
+
constructor(value, options) {
|
|
7
|
+
this.value = value;
|
|
8
|
+
this.name = options?.name;
|
|
9
|
+
this.codecId = options?.codecId;
|
|
10
|
+
Object.freeze(this);
|
|
11
|
+
}
|
|
12
|
+
static of(value, options) {
|
|
13
|
+
return new MongoParamRef(value, options);
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
//#endregion
|
|
18
|
+
export { MongoParamRef };
|
|
19
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../src/param-ref.ts"],"sourcesContent":["export class MongoParamRef {\n readonly value: unknown;\n readonly name: string | undefined;\n readonly codecId: string | undefined;\n\n constructor(value: unknown, options?: { name?: string; codecId?: string }) {\n this.value = value;\n this.name = options?.name;\n this.codecId = options?.codecId;\n Object.freeze(this);\n }\n\n static of(value: unknown, options?: { name?: string; codecId?: string }): MongoParamRef {\n return new MongoParamRef(value, options);\n }\n}\n"],"mappings":";AAAA,IAAa,gBAAb,MAAa,cAAc;CACzB,AAAS;CACT,AAAS;CACT,AAAS;CAET,YAAY,OAAgB,SAA+C;AACzE,OAAK,QAAQ;AACb,OAAK,OAAO,SAAS;AACrB,OAAK,UAAU,SAAS;AACxB,SAAO,OAAO,KAAK;;CAGrB,OAAO,GAAG,OAAgB,SAA8D;AACtF,SAAO,IAAI,cAAc,OAAO,QAAQ"}
|