@oridune/epic-odm
Advanced tools
Comparing version 1.1.2 to 1.1.3
{ | ||
"name": "@oridune/epic-odm", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"description": "Install 1 ODM and code once with any database driver.", | ||
@@ -5,0 +5,0 @@ "main": "./src/index.js", |
@@ -107,23 +107,77 @@ "use strict"; | ||
break; | ||
case "SZEQ": | ||
Results[Key] = { $size: Target.Value }; | ||
break; | ||
case "NE": | ||
Results[Key] = { $ne: Target.Value }; | ||
break; | ||
case "SZNE": | ||
Results[Key] = { $not: { $size: Target.Value } }; | ||
break; | ||
case "GT": | ||
Results[Key] = { $gt: Target.Value }; | ||
break; | ||
case "SZGT": | ||
Results["$expr"] = { | ||
$gt: [{ $size: `$${Key}` }, Target.Value], | ||
}; | ||
break; | ||
case "ST": | ||
Results[Key] = { $lt: Target.Value }; | ||
break; | ||
case "SZST": | ||
Results["$expr"] = { | ||
$lt: [{ $size: `$${Key}` }, Target.Value], | ||
}; | ||
break; | ||
case "GE": | ||
Results[Key] = { $gte: Target.Value }; | ||
break; | ||
case "SZGE": | ||
Results["$expr"] = { | ||
$gte: [{ $size: `$${Key}` }, Target.Value], | ||
}; | ||
break; | ||
case "SE": | ||
Results[Key] = { $lte: Target.Value }; | ||
break; | ||
case "SZSE": | ||
Results["$expr"] = { | ||
$lte: [{ $size: `$${Key}` }, Target.Value], | ||
}; | ||
break; | ||
case "NG": | ||
Results[Key] = { $not: { $gt: Target.Value } }; | ||
break; | ||
case "SZNG": | ||
Results["$expr"] = { | ||
$not: { | ||
$gt: [{ $size: `$${Key}` }, Target.Value], | ||
}, | ||
}; | ||
break; | ||
case "SZNGE": | ||
Results["$expr"] = { | ||
$not: { | ||
$gte: [{ $size: `$${Key}` }, Target.Value], | ||
}, | ||
}; | ||
break; | ||
case "NS": | ||
Results[Key] = { $not: { $lt: Target.Value } }; | ||
break; | ||
case "SZNS": | ||
Results["$expr"] = { | ||
$not: { | ||
$lt: [{ $size: `$${Key}` }, Target.Value], | ||
}, | ||
}; | ||
break; | ||
case "SZNSE": | ||
Results["$expr"] = { | ||
$not: { | ||
$lte: [{ $size: `$${Key}` }, Target.Value], | ||
}, | ||
}; | ||
break; | ||
case "RG": | ||
@@ -130,0 +184,0 @@ Results[Key] = { $regex: Target.Value }; |
@@ -1,2 +0,2 @@ | ||
export declare type TComparisonOperators = "EQ" | "NE" | "GT" | "ST" | "GE" | "SE" | "NG" | "NS" | "RG" | "QF" | "ALL"; | ||
export declare type TComparisonOperators = "EQ" | "SZEQ" | "NE" | "SZNE" | "GT" | "SZGT" | "ST" | "SZST" | "GE" | "SZGE" | "SE" | "SZSE" | "NG" | "SZNG" | "NGE" | "SZNGE" | "NS" | "SZNS" | "NSE" | "SZNSE" | "RG" | "QF" | "ALL"; | ||
export declare type TRangeOperators = "BT" | "NB" | "IN" | "NI"; | ||
@@ -18,2 +18,6 @@ export declare type TMutationOperators = "ObjectID" | "SetTo" | "Push" | "PushToSet" | "ReplaceWith" | "Increment" | "Decrement" | "Toggle"; | ||
/** | ||
* Size Equality clause | ||
*/ | ||
export declare const SizeEqual: <T extends number>(value: T) => Operator<"SZEQ", T>; | ||
/** | ||
* Null Equality clause | ||
@@ -27,2 +31,6 @@ */ | ||
/** | ||
* Size Not Equal clause | ||
*/ | ||
export declare const SizeNotEqual: <T extends number>(value: T) => Operator<"SZNE", T>; | ||
/** | ||
* Null Inequality clause | ||
@@ -36,2 +44,6 @@ */ | ||
/** | ||
* Size Greater Than clause | ||
*/ | ||
export declare const SizeGreater: <T extends number>(value: T) => Operator<"SZGT", T>; | ||
/** | ||
* Not Greater Than clause | ||
@@ -41,2 +53,14 @@ */ | ||
/** | ||
* Size Not Greater Than clause | ||
*/ | ||
export declare const SizeNotGreater: <T extends number>(value: T) => Operator<"SZNG", T>; | ||
/** | ||
* Not Greater Than or Equal clause | ||
*/ | ||
export declare const NotGreaterEqual: <T extends string | number | boolean | null>(value: T) => Operator<"NGE", T>; | ||
/** | ||
* Size Not Greater Than or Equal clause | ||
*/ | ||
export declare const SizeNotGreaterEqual: <T extends number>(value: T) => Operator<"SZNGE", T>; | ||
/** | ||
* Smaller Than clause | ||
@@ -46,2 +70,6 @@ */ | ||
/** | ||
* Size Smaller Than clause | ||
*/ | ||
export declare const SizeSmaller: <T extends number>(value: T) => Operator<"SZST", T>; | ||
/** | ||
* Not Smaller Than clause | ||
@@ -51,2 +79,14 @@ */ | ||
/** | ||
* Size Not Smaller Than clause | ||
*/ | ||
export declare const SizeNotSmaller: <T extends number>(value: T) => Operator<"SZNS", T>; | ||
/** | ||
* Not Smaller Than or Equal clause | ||
*/ | ||
export declare const NotSmallerEqual: <T extends string | number | boolean | null>(value: T) => Operator<"NSE", T>; | ||
/** | ||
* Size Not Smaller Than or Equal clause | ||
*/ | ||
export declare const SizeNotSmallerEqual: <T extends number>(value: T) => Operator<"SZNSE", T>; | ||
/** | ||
* Greater Than or Equal clause | ||
@@ -56,2 +96,6 @@ */ | ||
/** | ||
* Size Greater Than or Equal clause | ||
*/ | ||
export declare const SizeGreaterEqual: <T extends number>(value: T) => Operator<"SZGE", T>; | ||
/** | ||
* Smaller Than or Equal clause | ||
@@ -61,2 +105,6 @@ */ | ||
/** | ||
* Size Smaller Than or Equal clause | ||
*/ | ||
export declare const SizeSmallerEqual: <T extends number>(value: T) => Operator<"SZSE", T>; | ||
/** | ||
* Match RegExp clause | ||
@@ -63,0 +111,0 @@ */ |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Raw = exports.ObjectID = exports.ReplaceWith = exports.NotArrayEmpty = exports.IsArrayEmpty = exports.Toggle = exports.Decrement = exports.Increment = exports.PushToSet = exports.Push = exports.SetTo = exports.NotBetween = exports.Between = exports.NotIn = exports.In = exports.All = exports.Matches = exports.SmallerEqual = exports.GreaterEqual = exports.NotSmaller = exports.Smaller = exports.NotGreater = exports.Greater = exports.NotNull = exports.NotEqual = exports.IsNull = exports.IsEqual = exports.Operator = void 0; | ||
exports.Raw = exports.ObjectID = exports.ReplaceWith = exports.NotArrayEmpty = exports.IsArrayEmpty = exports.Toggle = exports.Decrement = exports.Increment = exports.PushToSet = exports.Push = exports.SetTo = exports.NotBetween = exports.Between = exports.NotIn = exports.In = exports.All = exports.Matches = exports.SizeSmallerEqual = exports.SmallerEqual = exports.SizeGreaterEqual = exports.GreaterEqual = exports.SizeNotSmallerEqual = exports.NotSmallerEqual = exports.SizeNotSmaller = exports.NotSmaller = exports.SizeSmaller = exports.Smaller = exports.SizeNotGreaterEqual = exports.NotGreaterEqual = exports.SizeNotGreater = exports.NotGreater = exports.SizeGreater = exports.Greater = exports.NotNull = exports.SizeNotEqual = exports.NotEqual = exports.IsNull = exports.SizeEqual = exports.IsEqual = exports.Operator = void 0; | ||
class Operator { | ||
@@ -17,2 +17,7 @@ constructor(Type, Value) { | ||
/** | ||
* Size Equality clause | ||
*/ | ||
const SizeEqual = (value) => new Operator("SZEQ", value); | ||
exports.SizeEqual = SizeEqual; | ||
/** | ||
* Null Equality clause | ||
@@ -28,2 +33,7 @@ */ | ||
/** | ||
* Size Not Equal clause | ||
*/ | ||
const SizeNotEqual = (value) => new Operator("SZNE", value); | ||
exports.SizeNotEqual = SizeNotEqual; | ||
/** | ||
* Null Inequality clause | ||
@@ -39,2 +49,7 @@ */ | ||
/** | ||
* Size Greater Than clause | ||
*/ | ||
const SizeGreater = (value) => new Operator("SZGT", value); | ||
exports.SizeGreater = SizeGreater; | ||
/** | ||
* Not Greater Than clause | ||
@@ -45,2 +60,17 @@ */ | ||
/** | ||
* Size Not Greater Than clause | ||
*/ | ||
const SizeNotGreater = (value) => new Operator("SZNG", value); | ||
exports.SizeNotGreater = SizeNotGreater; | ||
/** | ||
* Not Greater Than or Equal clause | ||
*/ | ||
const NotGreaterEqual = (value) => new Operator("NGE", value); | ||
exports.NotGreaterEqual = NotGreaterEqual; | ||
/** | ||
* Size Not Greater Than or Equal clause | ||
*/ | ||
const SizeNotGreaterEqual = (value) => new Operator("SZNGE", value); | ||
exports.SizeNotGreaterEqual = SizeNotGreaterEqual; | ||
/** | ||
* Smaller Than clause | ||
@@ -51,2 +81,7 @@ */ | ||
/** | ||
* Size Smaller Than clause | ||
*/ | ||
const SizeSmaller = (value) => new Operator("SZST", value); | ||
exports.SizeSmaller = SizeSmaller; | ||
/** | ||
* Not Smaller Than clause | ||
@@ -57,2 +92,17 @@ */ | ||
/** | ||
* Size Not Smaller Than clause | ||
*/ | ||
const SizeNotSmaller = (value) => new Operator("SZNS", value); | ||
exports.SizeNotSmaller = SizeNotSmaller; | ||
/** | ||
* Not Smaller Than or Equal clause | ||
*/ | ||
const NotSmallerEqual = (value) => new Operator("NSE", value); | ||
exports.NotSmallerEqual = NotSmallerEqual; | ||
/** | ||
* Size Not Smaller Than or Equal clause | ||
*/ | ||
const SizeNotSmallerEqual = (value) => new Operator("SZNSE", value); | ||
exports.SizeNotSmallerEqual = SizeNotSmallerEqual; | ||
/** | ||
* Greater Than or Equal clause | ||
@@ -63,2 +113,7 @@ */ | ||
/** | ||
* Size Greater Than or Equal clause | ||
*/ | ||
const SizeGreaterEqual = (value) => new Operator("SZGE", value); | ||
exports.SizeGreaterEqual = SizeGreaterEqual; | ||
/** | ||
* Smaller Than or Equal clause | ||
@@ -69,2 +124,7 @@ */ | ||
/** | ||
* Size Smaller Than or Equal clause | ||
*/ | ||
const SizeSmallerEqual = (value) => new Operator("SZSE", value); | ||
exports.SizeSmallerEqual = SizeSmallerEqual; | ||
/** | ||
* Match RegExp clause | ||
@@ -71,0 +131,0 @@ */ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
129665
2704