@snowtop/ent 0.1.16 → 0.1.18
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/core/clause.d.ts +6 -0
- package/core/clause.js +26 -2
- package/package.json +1 -1
package/core/clause.d.ts
CHANGED
|
@@ -73,6 +73,12 @@ export declare function ArrayEq<T extends Data, K = keyof T>(col: K, value: any)
|
|
|
73
73
|
*/
|
|
74
74
|
export declare function ArrayNotEq<T extends Data, K = keyof T>(col: K, value: any): Clause<T, K>;
|
|
75
75
|
export declare function Eq<T extends Data, K = keyof T>(col: K, value: any): Clause<T, K>;
|
|
76
|
+
export declare function StartsWith<T extends Data, K = keyof T>(col: K, value: string): Clause<T, K>;
|
|
77
|
+
export declare function EndsWith<T extends Data, K = keyof T>(col: K, value: string): Clause<T, K>;
|
|
78
|
+
export declare function Contains<T extends Data, K = keyof T>(col: K, value: string): Clause<T, K>;
|
|
79
|
+
export declare function StartsWithIgnoreCase<T extends Data, K = keyof T>(col: K, value: string): Clause<T, K>;
|
|
80
|
+
export declare function EndsWithIgnoreCase<T extends Data, K = keyof T>(col: K, value: string): Clause<T, K>;
|
|
81
|
+
export declare function ContainsIgnoreCase<T extends Data, K = keyof T>(col: K, value: string): Clause<T, K>;
|
|
76
82
|
export declare function NotEq<T extends Data, K = keyof T>(col: K, value: any): Clause<T, K>;
|
|
77
83
|
export declare function Greater<T extends Data, K = keyof T>(col: K, value: any): Clause<T, K>;
|
|
78
84
|
export declare function Less<T extends Data, K = keyof T>(col: K, value: any): Clause<T, K>;
|
package/core/clause.js
CHANGED
|
@@ -23,8 +23,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.
|
|
27
|
-
exports.Expression = exports.getCombinedClause = void 0;
|
|
26
|
+
exports.JSONKeyInList = exports.JSONBKeyInList = exports.JSONKeyExists = exports.JSONPathValuePredicate = exports.JSONObjectFieldKeyAsText = exports.JSONObjectFieldKeyASJSON = exports.sensitiveValue = exports.TsVectorWebsearchToTsQuery = exports.TsVectorPhraseToTsQuery = exports.TsVectorPlainToTsQuery = exports.TsVectorColTsQuery = exports.WebsearchToTsQuery = exports.PhraseToTsQuery = exports.PlainToTsQuery = exports.TsQuery = exports.DBTypeNotIn = exports.TextNotIn = exports.IntegerNotIn = exports.UuidNotIn = exports.DBTypeIn = exports.TextIn = exports.IntegerIn = exports.UuidIn = exports.In = exports.OrOptional = exports.Or = exports.AndOptional = exports.And = exports.LessEq = exports.GreaterEq = exports.Less = exports.Greater = exports.NotEq = exports.ContainsIgnoreCase = exports.EndsWithIgnoreCase = exports.StartsWithIgnoreCase = exports.Contains = exports.EndsWith = exports.StartsWith = exports.Eq = exports.ArrayNotEq = exports.ArrayEq = exports.PostgresArrayNotOverlaps = exports.PostgresArrayOverlaps = exports.PostgresArrayNotContains = exports.PostgresArrayNotContainsValue = exports.PostgresArrayContains = exports.PostgresArrayContainsValue = exports.notInClause = exports.inClause = void 0;
|
|
27
|
+
exports.Expression = exports.getCombinedClause = exports.Modulo = exports.Divide = exports.Multiply = exports.Subtract = exports.Add = exports.PaginationMultipleColsSubQuery = void 0;
|
|
28
28
|
const db_1 = __importStar(require("./db"));
|
|
29
29
|
const query_impl_1 = require("./query_impl");
|
|
30
30
|
function isSensitive(val) {
|
|
@@ -566,6 +566,30 @@ function Eq(col, value) {
|
|
|
566
566
|
return new simpleClause(col, value, "=", new isNullClause(col));
|
|
567
567
|
}
|
|
568
568
|
exports.Eq = Eq;
|
|
569
|
+
function StartsWith(col, value) {
|
|
570
|
+
return new simpleClause(col, `${value}%`, "LIKE");
|
|
571
|
+
}
|
|
572
|
+
exports.StartsWith = StartsWith;
|
|
573
|
+
function EndsWith(col, value) {
|
|
574
|
+
return new simpleClause(col, `%${value}`, "LIKE");
|
|
575
|
+
}
|
|
576
|
+
exports.EndsWith = EndsWith;
|
|
577
|
+
function Contains(col, value) {
|
|
578
|
+
return new simpleClause(col, `%${value}%`, "LIKE");
|
|
579
|
+
}
|
|
580
|
+
exports.Contains = Contains;
|
|
581
|
+
function StartsWithIgnoreCase(col, value) {
|
|
582
|
+
return new simpleClause(col, `${value}%`, "ILIKE");
|
|
583
|
+
}
|
|
584
|
+
exports.StartsWithIgnoreCase = StartsWithIgnoreCase;
|
|
585
|
+
function EndsWithIgnoreCase(col, value) {
|
|
586
|
+
return new simpleClause(col, `%${value}`, "ILIKE");
|
|
587
|
+
}
|
|
588
|
+
exports.EndsWithIgnoreCase = EndsWithIgnoreCase;
|
|
589
|
+
function ContainsIgnoreCase(col, value) {
|
|
590
|
+
return new simpleClause(col, `%${value}%`, "ILIKE");
|
|
591
|
+
}
|
|
592
|
+
exports.ContainsIgnoreCase = ContainsIgnoreCase;
|
|
569
593
|
function NotEq(col, value) {
|
|
570
594
|
return new simpleClause(col, value, "!=", new isNotNullClause(col));
|
|
571
595
|
}
|