@react-querybuilder/core 8.22.5 → 8.23.0
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/derivations/package.json +4 -0
- package/dist/cjs/react-querybuilder_core.cjs.development.d.ts +2078 -1665
- package/dist/cjs/react-querybuilder_core.cjs.development.js +1293 -422
- package/dist/cjs/react-querybuilder_core.cjs.development.js.map +1 -1
- package/dist/cjs/react-querybuilder_core.cjs.production.d.ts +2078 -1665
- package/dist/cjs/react-querybuilder_core.cjs.production.js +1 -1
- package/dist/cjs/react-querybuilder_core.cjs.production.js.map +1 -1
- package/dist/{convertQuery-Cw76XFIn.js → convertQuery-BLT0GIhM.js} +17 -8
- package/dist/{convertQuery-Cw76XFIn.js.map → convertQuery-BLT0GIhM.js.map} +1 -1
- package/dist/{convertQuery-D_4J7E-Z.mjs → convertQuery-DaXv3h7S.mjs} +6 -3
- package/dist/{convertQuery-D_4J7E-Z.mjs.map → convertQuery-DaXv3h7S.mjs.map} +1 -1
- package/dist/derivations.d.mts +2902 -0
- package/dist/derivations.d.ts +2902 -0
- package/dist/derivations.js +2845 -0
- package/dist/derivations.js.map +1 -0
- package/dist/derivations.mjs +2678 -0
- package/dist/derivations.mjs.map +1 -0
- package/dist/formatQuery.d.mts +2 -895
- package/dist/formatQuery.d.ts +2 -895
- package/dist/formatQuery.js +120 -140
- package/dist/formatQuery.js.map +1 -1
- package/dist/formatQuery.mjs +8 -28
- package/dist/formatQuery.mjs.map +1 -1
- package/dist/{import-DVWI7Fdh.d.mts → import-BdKPtLzo.d.mts} +2 -2
- package/dist/{import-6ExjhifL.d.ts → import-BfZTwhp2.d.ts} +2 -2
- package/dist/{index-CX9mehdL.d.mts → index-DOIE2pwx.d.mts} +274 -3
- package/dist/{index-CX9mehdL.d.ts → index-DOIE2pwx.d.ts} +274 -3
- package/dist/index-OF2Q1gTp.d.mts +895 -0
- package/dist/index-XueTy_XQ.d.ts +895 -0
- package/dist/isRuleOrGroupValid-CIMZNkt4.mjs +27 -0
- package/dist/isRuleOrGroupValid-CIMZNkt4.mjs.map +1 -0
- package/dist/isRuleOrGroupValid-CtUf4_4x.js +38 -0
- package/dist/isRuleOrGroupValid-CtUf4_4x.js.map +1 -0
- package/dist/{isRuleGroup-CqLThsbu.mjs → objectUtils-DDZ-KhV5.mjs} +25 -2
- package/dist/objectUtils-DDZ-KhV5.mjs.map +1 -0
- package/dist/{isRuleGroup-0JNiQgLg.js → objectUtils-DfnEmDSV.js} +48 -1
- package/dist/objectUtils-DfnEmDSV.js.map +1 -0
- package/dist/parseCEL.d.mts +2 -2
- package/dist/parseCEL.d.ts +2 -2
- package/dist/parseCEL.js +19 -16
- package/dist/parseCEL.js.map +1 -1
- package/dist/parseCEL.mjs +12 -9
- package/dist/parseCEL.mjs.map +1 -1
- package/dist/parseCypher.d.mts +1 -1
- package/dist/parseCypher.d.ts +1 -1
- package/dist/parseGremlin.d.mts +1 -1
- package/dist/parseGremlin.d.ts +1 -1
- package/dist/parseJSONata.d.mts +2 -2
- package/dist/parseJSONata.d.ts +2 -2
- package/dist/parseJSONata.js +17 -14
- package/dist/parseJSONata.js.map +1 -1
- package/dist/parseJSONata.mjs +11 -8
- package/dist/parseJSONata.mjs.map +1 -1
- package/dist/parseJsonLogic.d.mts +2 -2
- package/dist/parseJsonLogic.d.ts +2 -2
- package/dist/parseJsonLogic.js +38 -38
- package/dist/parseJsonLogic.js.map +1 -1
- package/dist/parseJsonLogic.mjs +5 -5
- package/dist/parseMongoDB.d.mts +2 -2
- package/dist/parseMongoDB.d.ts +2 -2
- package/dist/parseMongoDB.js +50 -47
- package/dist/parseMongoDB.js.map +1 -1
- package/dist/parseMongoDB.mjs +35 -32
- package/dist/parseMongoDB.mjs.map +1 -1
- package/dist/parseSPARQL.d.mts +1 -1
- package/dist/parseSPARQL.d.ts +1 -1
- package/dist/parseSQL.d.mts +2 -2
- package/dist/parseSQL.d.ts +2 -2
- package/dist/parseSQL.js +27 -23
- package/dist/parseSQL.js.map +1 -1
- package/dist/parseSQL.mjs +21 -17
- package/dist/parseSQL.mjs.map +1 -1
- package/dist/parseSpEL.d.mts +2 -2
- package/dist/parseSpEL.d.ts +2 -2
- package/dist/parseSpEL.js +16 -13
- package/dist/parseSpEL.js.map +1 -1
- package/dist/parseSpEL.mjs +12 -9
- package/dist/parseSpEL.mjs.map +1 -1
- package/dist/parserUtils-BKPstAaO.mjs +30 -0
- package/dist/parserUtils-BKPstAaO.mjs.map +1 -0
- package/dist/parserUtils-DbBXyAht.js +41 -0
- package/dist/parserUtils-DbBXyAht.js.map +1 -0
- package/dist/{prepareQueryObjects-BnGL91Tt.js → prepareQueryObjects-Dj9cTl9D.js} +90 -63
- package/dist/prepareQueryObjects-Dj9cTl9D.js.map +1 -0
- package/dist/{prepareQueryObjects-ChINDIap.mjs → prepareQueryObjects-Dmyf3Wi_.mjs} +56 -59
- package/dist/prepareQueryObjects-Dmyf3Wi_.mjs.map +1 -0
- package/dist/react-querybuilder_core.d.mts +2078 -1665
- package/dist/react-querybuilder_core.legacy-esm.d.ts +2078 -1665
- package/dist/react-querybuilder_core.legacy-esm.js +1445 -635
- package/dist/react-querybuilder_core.legacy-esm.js.map +1 -1
- package/dist/react-querybuilder_core.mjs +1288 -424
- package/dist/react-querybuilder_core.mjs.map +1 -1
- package/dist/react-querybuilder_core.production.d.mts +2078 -1665
- package/dist/react-querybuilder_core.production.mjs +1 -1
- package/dist/react-querybuilder_core.production.mjs.map +1 -1
- package/dist/transformQuery-B7d9AWUf.d.mts +116 -0
- package/dist/transformQuery-BXDiUBGB.d.ts +116 -0
- package/dist/transformQuery.d.mts +2 -116
- package/dist/transformQuery.d.ts +2 -116
- package/dist/transformQuery.js +3 -4
- package/dist/transformQuery.js.map +1 -1
- package/dist/transformQuery.mjs +1 -2
- package/dist/transformQuery.mjs.map +1 -1
- package/dist/utils-CP5Jqy1P.mjs +1294 -0
- package/dist/utils-CP5Jqy1P.mjs.map +1 -0
- package/dist/utils-e-7KHkjV.js +1779 -0
- package/dist/utils-e-7KHkjV.js.map +1 -0
- package/package.json +33 -22
- package/dist/isRuleGroup-0JNiQgLg.js.map +0 -1
- package/dist/isRuleGroup-CqLThsbu.mjs.map +0 -1
- package/dist/objectUtils-Cr02aGxb.js +0 -27
- package/dist/objectUtils-Cr02aGxb.js.map +0 -1
- package/dist/objectUtils-DBlmJgBf.mjs +0 -16
- package/dist/objectUtils-DBlmJgBf.mjs.map +0 -1
- package/dist/prepareQueryObjects-BnGL91Tt.js.map +0 -1
- package/dist/prepareQueryObjects-ChINDIap.mjs.map +0 -1
- package/dist/utils-4k-j5FBa.mjs +0 -537
- package/dist/utils-4k-j5FBa.mjs.map +0 -1
- package/dist/utils-C79dxwZb.js +0 -752
- package/dist/utils-C79dxwZb.js.map +0 -1
package/dist/utils-C79dxwZb.js
DELETED
|
@@ -1,752 +0,0 @@
|
|
|
1
|
-
const require_isRuleGroup = require("./isRuleGroup-0JNiQgLg.js");
|
|
2
|
-
let numeric_quantity = require("numeric-quantity");
|
|
3
|
-
//#region src/defaults.ts
|
|
4
|
-
/**
|
|
5
|
-
* Map of default operators to their respective opposite/negating operators.
|
|
6
|
-
*
|
|
7
|
-
* @group Defaults
|
|
8
|
-
*/
|
|
9
|
-
const defaultOperatorNegationMap = {
|
|
10
|
-
"=": "!=",
|
|
11
|
-
"!=": "=",
|
|
12
|
-
"<": ">=",
|
|
13
|
-
"<=": ">",
|
|
14
|
-
">": "<=",
|
|
15
|
-
">=": "<",
|
|
16
|
-
beginsWith: "doesNotBeginWith",
|
|
17
|
-
doesNotBeginWith: "beginsWith",
|
|
18
|
-
endsWith: "doesNotEndWith",
|
|
19
|
-
doesNotEndWith: "endsWith",
|
|
20
|
-
contains: "doesNotContain",
|
|
21
|
-
doesNotContain: "contains",
|
|
22
|
-
between: "notBetween",
|
|
23
|
-
notBetween: "between",
|
|
24
|
-
in: "notIn",
|
|
25
|
-
notIn: "in",
|
|
26
|
-
notNull: "null",
|
|
27
|
-
null: "notNull"
|
|
28
|
-
};
|
|
29
|
-
//#endregion
|
|
30
|
-
//#region src/utils/arrayUtils.ts
|
|
31
|
-
/**
|
|
32
|
-
* Splits a string by a given character (see {@link defaultJoinChar}). Escaped characters
|
|
33
|
-
* (characters preceded by a backslash) will not apply to the split, and the backslash will
|
|
34
|
-
* be removed in the array element. Inverse of {@link joinWith}.
|
|
35
|
-
*
|
|
36
|
-
* @example
|
|
37
|
-
* splitBy('this\\,\\,that,,the other,,,\\,')
|
|
38
|
-
* // or
|
|
39
|
-
* splitBy('this\\,\\,that,,the other,,,\\,', ',')
|
|
40
|
-
* // would return
|
|
41
|
-
* ['this,,that', '', 'the other', '', '', ',']
|
|
42
|
-
*/
|
|
43
|
-
const splitBy = (str, splitChar = ",") => typeof str === "string" ? str.split(`\\${splitChar}`).map((c) => c.split(splitChar)).reduce((prev, curr, idx) => {
|
|
44
|
-
if (idx === 0) return curr;
|
|
45
|
-
return [
|
|
46
|
-
...prev.slice(0, -1),
|
|
47
|
-
`${prev.at(-1)}${splitChar}${curr[0]}`,
|
|
48
|
-
...curr.slice(1)
|
|
49
|
-
];
|
|
50
|
-
}, []) : [];
|
|
51
|
-
/**
|
|
52
|
-
* Joins an array of strings using the given character (see {@link defaultJoinChar}). When
|
|
53
|
-
* the given character appears in an array element, a backslash will be added just before it
|
|
54
|
-
* to distinguish it from the join character. Effectively the inverse of {@link splitBy}.
|
|
55
|
-
*
|
|
56
|
-
* TIP: The join character can actually be a string of any length. Only the first character
|
|
57
|
-
* will be searched for in the array elements and preceded by a backslash.
|
|
58
|
-
*
|
|
59
|
-
* @example
|
|
60
|
-
* joinWith(['this,,that', '', 'the other', '', '', ','], ', ')
|
|
61
|
-
* // would return
|
|
62
|
-
* 'this\\,\\,that, , the other, , , \\,'
|
|
63
|
-
*/
|
|
64
|
-
const joinWith = (strArr, joinChar = ",") => strArr.map((str) => `${str ?? ""}`.replaceAll(joinChar[0], `\\${joinChar[0]}`)).join(joinChar);
|
|
65
|
-
/**
|
|
66
|
-
* Trims the value if it is a string. Otherwise returns the value as is.
|
|
67
|
-
*/
|
|
68
|
-
const trimIfString = (val) => typeof val === "string" ? val.trim() : val;
|
|
69
|
-
/**
|
|
70
|
-
* Splits a string by comma then trims each element. Arrays are returned as is except
|
|
71
|
-
* any string elements are trimmed.
|
|
72
|
-
*/
|
|
73
|
-
const toArray = (a, { retainEmptyStrings } = {}) => Array.isArray(a) ? a.map(trimIfString) : typeof a === "string" ? splitBy(a, ",").filter(retainEmptyStrings ? () => true : (s) => !/^\s*$/.test(s)).map((s) => s.trim()) : typeof a === "number" ? [a] : [];
|
|
74
|
-
//#endregion
|
|
75
|
-
//#region src/utils/parseNumber.ts
|
|
76
|
-
/**
|
|
77
|
-
* Converts a string to a number. Uses native `parseFloat` if `parseNumbers` is "native",
|
|
78
|
-
* otherwise uses [`numeric-quantity`](https://jakeboone02.github.io/numeric-quantity/).
|
|
79
|
-
* If that returns `NaN`, the string is returned unchanged. Numeric values are returned
|
|
80
|
-
* as-is regardless of the `parseNumbers` option.
|
|
81
|
-
*/
|
|
82
|
-
const parseNumber = (val, { parseNumbers, bigIntOnOverflow } = {}) => {
|
|
83
|
-
if (!parseNumbers || typeof val === "bigint" || typeof val === "number") return val;
|
|
84
|
-
if (parseNumbers === "native") return Number.parseFloat(val);
|
|
85
|
-
const valAsNum = (0, numeric_quantity.numericQuantity)(val, {
|
|
86
|
-
allowTrailingInvalid: parseNumbers === "enhanced",
|
|
87
|
-
bigIntOnOverflow,
|
|
88
|
-
romanNumerals: false,
|
|
89
|
-
round: false
|
|
90
|
-
});
|
|
91
|
-
return typeof valAsNum === "bigint" || !Number.isNaN(valAsNum) ? valAsNum : val;
|
|
92
|
-
};
|
|
93
|
-
//#endregion
|
|
94
|
-
//#region src/utils/optGroupUtils.ts
|
|
95
|
-
const isOptionWithName = (opt) => require_isRuleGroup.isPojo(opt) && "name" in opt && typeof opt.name === "string";
|
|
96
|
-
const isOptionWithValue = (opt) => require_isRuleGroup.isPojo(opt) && "value" in opt && typeof opt.value === "string";
|
|
97
|
-
/**
|
|
98
|
-
* Converts an {@link Option} or {@link ValueOption} (i.e., {@link BaseOption})
|
|
99
|
-
* into a {@link FullOption}. Full options are left unchanged.
|
|
100
|
-
*
|
|
101
|
-
* @group Option Lists
|
|
102
|
-
*/
|
|
103
|
-
function toFullOption(opt, baseProperties, labelMap) {
|
|
104
|
-
if (typeof opt === "string") return {
|
|
105
|
-
...baseProperties,
|
|
106
|
-
name: opt,
|
|
107
|
-
value: opt,
|
|
108
|
-
label: labelMap?.[opt] ?? opt
|
|
109
|
-
};
|
|
110
|
-
const idObj = {};
|
|
111
|
-
let needsUpdating = !!baseProperties;
|
|
112
|
-
if (isOptionWithName(opt) && !isOptionWithValue(opt)) {
|
|
113
|
-
idObj.value = opt.name;
|
|
114
|
-
needsUpdating = true;
|
|
115
|
-
} else if (!isOptionWithName(opt) && isOptionWithValue(opt)) {
|
|
116
|
-
idObj.name = opt.value;
|
|
117
|
-
needsUpdating = true;
|
|
118
|
-
}
|
|
119
|
-
if (needsUpdating) return Object.assign({}, baseProperties, opt, idObj);
|
|
120
|
-
return opt;
|
|
121
|
-
}
|
|
122
|
-
/**
|
|
123
|
-
* Converts an {@link OptionList} or {@link FlexibleOptionList} into a {@link FullOptionList}.
|
|
124
|
-
* Lists of full options are left unchanged.
|
|
125
|
-
*
|
|
126
|
-
* @group Option Lists
|
|
127
|
-
*/
|
|
128
|
-
function toFullOptionList(optList, baseProperties, labelMap) {
|
|
129
|
-
if (!Array.isArray(optList)) return [];
|
|
130
|
-
const list = optList;
|
|
131
|
-
if (isFlexibleOptionGroupArray(list)) return list.map((optGroup) => ({
|
|
132
|
-
...optGroup,
|
|
133
|
-
options: optGroup.options.map((opt) => toFullOption(opt, baseProperties, labelMap))
|
|
134
|
-
}));
|
|
135
|
-
return list.map((opt) => toFullOption(opt, baseProperties, labelMap));
|
|
136
|
-
}
|
|
137
|
-
/**
|
|
138
|
-
* Generates a new array of objects with duplicates removed based
|
|
139
|
-
* on the identifying property (`value` or `name`)
|
|
140
|
-
*
|
|
141
|
-
* @group Option Lists
|
|
142
|
-
*/
|
|
143
|
-
const uniqByIdentifier = (originalArray) => {
|
|
144
|
-
const names = /* @__PURE__ */ new Set();
|
|
145
|
-
const newArray = [];
|
|
146
|
-
for (const el of originalArray) if (!names.has(el.value ?? el.name)) {
|
|
147
|
-
names.add(el.value ?? el.name);
|
|
148
|
-
newArray.push(el);
|
|
149
|
-
}
|
|
150
|
-
return originalArray.length === newArray.length ? originalArray : newArray;
|
|
151
|
-
};
|
|
152
|
-
/**
|
|
153
|
-
* Determines if an {@link OptionList} is an {@link OptionGroup} array.
|
|
154
|
-
*
|
|
155
|
-
* @group Option Lists
|
|
156
|
-
*/
|
|
157
|
-
const isOptionGroupArray = (arr) => Array.isArray(arr) && arr.length > 0 && require_isRuleGroup.isPojo(arr[0]) && "options" in arr[0] && Array.isArray(arr[0].options);
|
|
158
|
-
/**
|
|
159
|
-
* Determines if an array is a flat array of {@link FlexibleOption}.
|
|
160
|
-
*
|
|
161
|
-
* @group Option Lists
|
|
162
|
-
*/
|
|
163
|
-
const isFlexibleOptionArray = (arr) => {
|
|
164
|
-
let isFOA = false;
|
|
165
|
-
if (Array.isArray(arr)) for (const o of arr) if (isOptionWithName(o) || isOptionWithValue(o)) isFOA = true;
|
|
166
|
-
else return false;
|
|
167
|
-
return isFOA;
|
|
168
|
-
};
|
|
169
|
-
/**
|
|
170
|
-
* Determines if a {@link FlexibleOptionList} is a {@link FlexibleOptionGroup} array.
|
|
171
|
-
*
|
|
172
|
-
* @group Option Lists
|
|
173
|
-
*/
|
|
174
|
-
const isFlexibleOptionGroupArray = (arr, { allowEmpty = false } = {}) => {
|
|
175
|
-
let isFOGA = false;
|
|
176
|
-
if (Array.isArray(arr)) for (const og of arr) if (require_isRuleGroup.isPojo(og) && "options" in og && (isFlexibleOptionArray(og.options) || allowEmpty && Array.isArray(og.options) && og.options.length === 0)) isFOGA = true;
|
|
177
|
-
else return false;
|
|
178
|
-
return isFOGA;
|
|
179
|
-
};
|
|
180
|
-
function getOption(arr, name) {
|
|
181
|
-
return (isFlexibleOptionGroupArray(arr, { allowEmpty: true }) ? arr.flatMap((og) => og.options) : arr).find((op) => op.value === name || op.name === name);
|
|
182
|
-
}
|
|
183
|
-
/**
|
|
184
|
-
* Flattens {@link FlexibleOptionGroup} arrays into {@link BaseOption} arrays.
|
|
185
|
-
* If the array is already flat, it is returned as is.
|
|
186
|
-
*
|
|
187
|
-
* @group Option Lists
|
|
188
|
-
*/
|
|
189
|
-
const toFlatOptionArray = (arr) => uniqByIdentifier(isOptionGroupArray(arr) ? arr.flatMap((og) => og.options) : arr);
|
|
190
|
-
//#endregion
|
|
191
|
-
//#region src/utils/getParseNumberMethod.ts
|
|
192
|
-
const getParseNumberMethod = ({ parseNumbers, inputType }) => {
|
|
193
|
-
if (typeof parseNumbers === "string") {
|
|
194
|
-
const [method, level] = parseNumbers.split("-");
|
|
195
|
-
if (level === "limited") return inputType === "number" ? method : false;
|
|
196
|
-
return method;
|
|
197
|
-
}
|
|
198
|
-
return parseNumbers ? "strict" : false;
|
|
199
|
-
};
|
|
200
|
-
//#endregion
|
|
201
|
-
//#region src/utils/formatQuery/utils.ts
|
|
202
|
-
/**
|
|
203
|
-
* Maps a {@link DefaultOperatorName} to a SQL operator.
|
|
204
|
-
*
|
|
205
|
-
* @group Export
|
|
206
|
-
*/
|
|
207
|
-
const mapSQLOperator = (rqbOperator) => {
|
|
208
|
-
switch (require_isRuleGroup.lc(rqbOperator)) {
|
|
209
|
-
case "null": return "is null";
|
|
210
|
-
case "notnull": return "is not null";
|
|
211
|
-
case "notin": return "not in";
|
|
212
|
-
case "notbetween": return "not between";
|
|
213
|
-
case "contains":
|
|
214
|
-
case "beginswith":
|
|
215
|
-
case "endswith": return "like";
|
|
216
|
-
case "doesnotcontain":
|
|
217
|
-
case "doesnotbeginwith":
|
|
218
|
-
case "doesnotendwith": return "not like";
|
|
219
|
-
default: return rqbOperator;
|
|
220
|
-
}
|
|
221
|
-
};
|
|
222
|
-
/**
|
|
223
|
-
* Returns a preset-aware SQL string-concatenation function. Emits `CONCAT(a, b, ...)` when
|
|
224
|
-
* `concatOperator` is `"CONCAT"` (case-insensitive), otherwise joins with the infix operator
|
|
225
|
-
* (e.g. `a || b`, `a + b`).
|
|
226
|
-
*
|
|
227
|
-
* @group Export
|
|
228
|
-
*/
|
|
229
|
-
const getSQLConcat = (concatOperator = "||") => (...values) => concatOperator.toUpperCase() === "CONCAT" ? `CONCAT(${values.join(", ")})` : values.join(` ${concatOperator} `);
|
|
230
|
-
/**
|
|
231
|
-
* Returns the `[prefix, suffix]` `LIKE` wildcards for a string-match operator (e.g. `contains`
|
|
232
|
-
* → `['%', '%']`, `beginsWith` → `['', '%']`, `endsWith` → `['%', '']`). Unknown operators
|
|
233
|
-
* yield `['', '']`.
|
|
234
|
-
*
|
|
235
|
-
* @group Export
|
|
236
|
-
*/
|
|
237
|
-
const getLikeWildcards = (operatorLC) => {
|
|
238
|
-
switch (operatorLC) {
|
|
239
|
-
case "contains":
|
|
240
|
-
case "doesnotcontain": return ["%", "%"];
|
|
241
|
-
case "beginswith":
|
|
242
|
-
case "doesnotbeginwith": return ["", "%"];
|
|
243
|
-
case "endswith":
|
|
244
|
-
case "doesnotendwith": return ["%", ""];
|
|
245
|
-
default: return ["", ""];
|
|
246
|
-
}
|
|
247
|
-
};
|
|
248
|
-
/**
|
|
249
|
-
* Wraps an already-serialized SQL fragment (a quoted field name or an expression) with the
|
|
250
|
-
* `LIKE` wildcards for the given (lowercase) string-match operator, concatenating the literal
|
|
251
|
-
* `%` markers via the preset-aware {@link getSQLConcat}. Returns the fragment untouched for
|
|
252
|
-
* operators without wildcards.
|
|
253
|
-
*
|
|
254
|
-
* @group Export
|
|
255
|
-
*/
|
|
256
|
-
const wrapLikeFragment = (fragment, operatorLC, { concatOperator = "||", quoteValuesWith, wrapValueWith = ["", ""] } = {}) => {
|
|
257
|
-
const [pre, post] = getLikeWildcards(operatorLC);
|
|
258
|
-
const quoteChar = quoteValuesWith || `'`;
|
|
259
|
-
const quote = (p) => `${wrapValueWith[0]}${quoteChar}${p}${quoteChar}${wrapValueWith[1]}`;
|
|
260
|
-
const parts = [
|
|
261
|
-
pre && quote(pre),
|
|
262
|
-
fragment,
|
|
263
|
-
post && quote(post)
|
|
264
|
-
].filter(Boolean);
|
|
265
|
-
return parts.length > 1 ? getSQLConcat(concatOperator)(...parts) : fragment;
|
|
266
|
-
};
|
|
267
|
-
/**
|
|
268
|
-
* Maps a (lowercase) {@link DefaultOperatorName} to a MongoDB operator.
|
|
269
|
-
*
|
|
270
|
-
* @group Export
|
|
271
|
-
*/
|
|
272
|
-
const mongoOperators = {
|
|
273
|
-
"=": "$eq",
|
|
274
|
-
"!=": "$ne",
|
|
275
|
-
"<": "$lt",
|
|
276
|
-
"<=": "$lte",
|
|
277
|
-
">": "$gt",
|
|
278
|
-
">=": "$gte",
|
|
279
|
-
in: "$in",
|
|
280
|
-
notin: "$nin",
|
|
281
|
-
notIn: "$nin"
|
|
282
|
-
};
|
|
283
|
-
/**
|
|
284
|
-
* Maps a (lowercase) {@link DefaultOperatorName} to a Prisma ORM operator.
|
|
285
|
-
*
|
|
286
|
-
* @group Export
|
|
287
|
-
*/
|
|
288
|
-
const prismaOperators = {
|
|
289
|
-
"=": "equals",
|
|
290
|
-
"!=": "not",
|
|
291
|
-
"<": "lt",
|
|
292
|
-
"<=": "lte",
|
|
293
|
-
">": "gt",
|
|
294
|
-
">=": "gte",
|
|
295
|
-
in: "in",
|
|
296
|
-
notin: "notIn"
|
|
297
|
-
};
|
|
298
|
-
/**
|
|
299
|
-
* Maps a {@link DefaultCombinatorName} to a CEL combinator.
|
|
300
|
-
*
|
|
301
|
-
* @group Export
|
|
302
|
-
*/
|
|
303
|
-
const celCombinatorMap = {
|
|
304
|
-
and: "&&",
|
|
305
|
-
or: "||"
|
|
306
|
-
};
|
|
307
|
-
/**
|
|
308
|
-
* Register these operators with `jsonLogic` before applying the result
|
|
309
|
-
* of `formatQuery(query, 'jsonlogic')`.
|
|
310
|
-
*
|
|
311
|
-
* @example
|
|
312
|
-
* ```
|
|
313
|
-
* for (const [op, func] of Object.entries(jsonLogicAdditionalOperators)) {
|
|
314
|
-
* jsonLogic.add_operation(op, func);
|
|
315
|
-
* }
|
|
316
|
-
* jsonLogic.apply({ "startsWith": [{ "var": "firstName" }, "Stev"] }, data);
|
|
317
|
-
* ```
|
|
318
|
-
*
|
|
319
|
-
* @group Export
|
|
320
|
-
*/
|
|
321
|
-
const jsonLogicAdditionalOperators = {
|
|
322
|
-
startsWith: (a, b) => typeof a === "string" && a.startsWith(b),
|
|
323
|
-
endsWith: (a, b) => typeof a === "string" && a.endsWith(b)
|
|
324
|
-
};
|
|
325
|
-
/**
|
|
326
|
-
* Returns a new query object with all `string`-type `value` properties converted
|
|
327
|
-
* to `number` where appropriate.
|
|
328
|
-
*
|
|
329
|
-
* Used by {@link formatQuery} for the `json*` formats when `parseNumbers` is `true`.
|
|
330
|
-
*
|
|
331
|
-
* @group Export
|
|
332
|
-
*/
|
|
333
|
-
const numerifyValues = (rg, options) => ({
|
|
334
|
-
...rg,
|
|
335
|
-
rules: rg.rules.map((r) => {
|
|
336
|
-
if (typeof r === "string") return r;
|
|
337
|
-
if (require_isRuleGroup.isRuleGroup(r)) return numerifyValues(r, options);
|
|
338
|
-
const fieldData = getOption(options.fields, r.field);
|
|
339
|
-
const parseNumbers = getParseNumberMethod({
|
|
340
|
-
parseNumbers: options.parseNumbers,
|
|
341
|
-
inputType: fieldData?.inputType
|
|
342
|
-
});
|
|
343
|
-
if (Array.isArray(r.value)) return {
|
|
344
|
-
...r,
|
|
345
|
-
value: r.value.map((v) => parseNumber(v, { parseNumbers }))
|
|
346
|
-
};
|
|
347
|
-
const valAsArray = toArray(r.value, { retainEmptyStrings: true }).map((v) => parseNumber(v, { parseNumbers }));
|
|
348
|
-
if (valAsArray.every((v) => typeof v === "number")) {
|
|
349
|
-
// v8 ignore else
|
|
350
|
-
if (valAsArray.length > 1) return {
|
|
351
|
-
...r,
|
|
352
|
-
value: valAsArray
|
|
353
|
-
};
|
|
354
|
-
else if (valAsArray.length === 1) return {
|
|
355
|
-
...r,
|
|
356
|
-
value: valAsArray[0]
|
|
357
|
-
};
|
|
358
|
-
}
|
|
359
|
-
return r;
|
|
360
|
-
})
|
|
361
|
-
});
|
|
362
|
-
/**
|
|
363
|
-
* Determines whether a value is _anything_ except an empty `string` or `NaN`.
|
|
364
|
-
*
|
|
365
|
-
* @group Export
|
|
366
|
-
*/
|
|
367
|
-
const isValidValue = (value) => typeof value === "string" && value.length > 0 || typeof value === "number" && !Number.isNaN(value) || typeof value !== "string" && typeof value !== "number";
|
|
368
|
-
/**
|
|
369
|
-
* Determines whether {@link formatQuery} should render the given value as a number.
|
|
370
|
-
* As long as `parseNumbers` is `true`, `number` and `bigint` values will return `true` and
|
|
371
|
-
* `string` values will return `true` if they test positive against {@link numericRegex}.
|
|
372
|
-
*
|
|
373
|
-
* @group Export
|
|
374
|
-
*/
|
|
375
|
-
const shouldRenderAsNumber = (value, parseNumbers) => !!parseNumbers && (typeof value === "number" || typeof value === "bigint" || typeof value === "string" && require_isRuleGroup.numericRegex.test(value));
|
|
376
|
-
/**
|
|
377
|
-
* Used by {@link formatQuery} to determine whether the given value processor is a
|
|
378
|
-
* "legacy" value processor by counting the number of arguments. Legacy value
|
|
379
|
-
* processors take 3 arguments (not counting any arguments with default values), while
|
|
380
|
-
* rule-based value processors take no more than 2 arguments.
|
|
381
|
-
*
|
|
382
|
-
* @group Export
|
|
383
|
-
*/
|
|
384
|
-
const isValueProcessorLegacy = (valueProcessor) => valueProcessor.length >= 3;
|
|
385
|
-
/**
|
|
386
|
-
* Converts the `quoteFieldNamesWith` option into an array of two strings.
|
|
387
|
-
* If the option is a string, the array elements are both that string.
|
|
388
|
-
*
|
|
389
|
-
* @default
|
|
390
|
-
* ['', '']
|
|
391
|
-
*
|
|
392
|
-
* @group Export
|
|
393
|
-
*/
|
|
394
|
-
const getQuoteFieldNamesWithArray = (quoteFieldNamesWith = ["", ""]) => Array.isArray(quoteFieldNamesWith) ? quoteFieldNamesWith : typeof quoteFieldNamesWith === "string" ? [quoteFieldNamesWith, quoteFieldNamesWith] : quoteFieldNamesWith ?? ["", ""];
|
|
395
|
-
/**
|
|
396
|
-
* Given a field name and relevant {@link ValueProcessorOptions}, returns the field name
|
|
397
|
-
* wrapped in the configured quote character(s).
|
|
398
|
-
*
|
|
399
|
-
* @group Export
|
|
400
|
-
*/
|
|
401
|
-
const getQuotedFieldName = (fieldName, { quoteFieldNamesWith, fieldIdentifierSeparator }) => {
|
|
402
|
-
const [qPre, qPost] = getQuoteFieldNamesWithArray(quoteFieldNamesWith);
|
|
403
|
-
return typeof fieldIdentifierSeparator === "string" && fieldIdentifierSeparator.length > 0 ? joinWith(splitBy(fieldName, fieldIdentifierSeparator).map((part) => `${qPre}${part}${qPost}`), fieldIdentifierSeparator) : `${qPre}${fieldName}${qPost}`;
|
|
404
|
-
};
|
|
405
|
-
const defaultWordOrder = [
|
|
406
|
-
"S",
|
|
407
|
-
"V",
|
|
408
|
-
"O"
|
|
409
|
-
];
|
|
410
|
-
/**
|
|
411
|
-
* Given a [Constituent word order](https://en.wikipedia.org/wiki/Word_order#Constituent_word_orders)
|
|
412
|
-
* like "svo" or "sov", returns a permutation of `["S", "V", "O"]` based on the first occurrence of
|
|
413
|
-
* each letter in the input string (case insensitive). This widens the valid input from abbreviations
|
|
414
|
-
* like "svo" to more expressive strings like "subject-verb-object" or "sub ver obj". Any missing
|
|
415
|
-
* letters are appended in the default order "SVO" (e.g., "object" would yield `["O", "S", "V"]`).
|
|
416
|
-
*
|
|
417
|
-
* @group Export
|
|
418
|
-
*/
|
|
419
|
-
const normalizeConstituentWordOrder = (input) => {
|
|
420
|
-
const result = [];
|
|
421
|
-
const letterSet = new Set(defaultWordOrder);
|
|
422
|
-
for (const char of input.toUpperCase()) if (letterSet.has(char)) {
|
|
423
|
-
result.push(char);
|
|
424
|
-
letterSet.delete(char);
|
|
425
|
-
if (letterSet.size === 0) break;
|
|
426
|
-
}
|
|
427
|
-
for (const letter of defaultWordOrder) if (letterSet.has(letter)) result.push(letter);
|
|
428
|
-
return result;
|
|
429
|
-
};
|
|
430
|
-
/**
|
|
431
|
-
* Prefixes a named-parameter value with the given `paramPrefix` unless the value already
|
|
432
|
-
* begins with it. Used by {@link formatQuery} to render rules whose `valueSource` is
|
|
433
|
-
* `"parameter"` (e.g. `"p1"` with prefix `":"` → `":p1"`; `":p1"` → `":p1"`).
|
|
434
|
-
*
|
|
435
|
-
* @group Export
|
|
436
|
-
*/
|
|
437
|
-
const withParamPrefix = (value, paramPrefix = ":") => {
|
|
438
|
-
const v = `${value ?? ""}`;
|
|
439
|
-
return paramPrefix && v.startsWith(paramPrefix) ? v : `${paramPrefix}${v}`;
|
|
440
|
-
};
|
|
441
|
-
/**
|
|
442
|
-
* Strips a leading `paramPrefix` from a named-parameter value if present. Inverse of
|
|
443
|
-
* {@link withParamPrefix}; used to normalize parameter names for validation/lookup.
|
|
444
|
-
*
|
|
445
|
-
* @group Export
|
|
446
|
-
*/
|
|
447
|
-
const stripParamPrefix = (value, paramPrefix = ":") => {
|
|
448
|
-
const v = `${value ?? ""}`;
|
|
449
|
-
return paramPrefix && v.startsWith(paramPrefix) ? v.slice(paramPrefix.length) : v;
|
|
450
|
-
};
|
|
451
|
-
/**
|
|
452
|
-
* Default translations used by {@link formatQuery} for "natural_language" format.
|
|
453
|
-
*
|
|
454
|
-
* @group Export
|
|
455
|
-
*/
|
|
456
|
-
const defaultNLTranslations = {
|
|
457
|
-
groupPrefix: "",
|
|
458
|
-
groupPrefix_not_xor: "either zero or more than one of",
|
|
459
|
-
groupPrefix_xor: "exactly one of",
|
|
460
|
-
groupSuffix: "is true",
|
|
461
|
-
groupSuffix_not: "is not true"
|
|
462
|
-
};
|
|
463
|
-
/**
|
|
464
|
-
* Note: This function assumes `conditions.length > 0`
|
|
465
|
-
*/
|
|
466
|
-
const translationMatchFilter = (key, keyToTest, conditions) => keyToTest.startsWith(key) && conditions.every((c) => keyToTest.includes(`_${c}`) && keyToTest.match(/_/g)?.length === conditions.length);
|
|
467
|
-
/**
|
|
468
|
-
* Used by {@link formatQuery} to get a translation based on certain conditions
|
|
469
|
-
* for the "natural_language" format.
|
|
470
|
-
*
|
|
471
|
-
* @group Export
|
|
472
|
-
*/
|
|
473
|
-
const getNLTranslataion = (key, translations, conditions = []) => conditions.length === 0 ? translations[key] ?? defaultNLTranslations[key] ??
|
|
474
|
-
/* v8 ignore start -- @preserve */ "" : Object.entries(translations).find(([keyToTest]) => translationMatchFilter(key, keyToTest, conditions))?.[1] ?? Object.entries(defaultNLTranslations).find(([keyToTest]) => translationMatchFilter(key, keyToTest, conditions))?.[1] ?? defaultNLTranslations[key] ??
|
|
475
|
-
/* v8 ignore next -- @preserve */ "";
|
|
476
|
-
/**
|
|
477
|
-
* Transforms
|
|
478
|
-
* - `match: { mode: "atLeast", threshold: 1 }` to `match: { mode: "some" }`
|
|
479
|
-
* - `match: { mode: "atMost", threshold: 0 }` to `match: { mode: "none" }`.
|
|
480
|
-
*
|
|
481
|
-
* Returns:
|
|
482
|
-
* - Processed `{ mode, threshold }` object for valid subqueries
|
|
483
|
-
* - `null` if match mode is not applicable for the rule
|
|
484
|
-
* - `false` if match mode is valid, but either
|
|
485
|
-
* 1. `threshold` is required and invalid, or
|
|
486
|
-
* 2. `value` is not a valid rule group.
|
|
487
|
-
*/
|
|
488
|
-
const processMatchMode = (rule) => {
|
|
489
|
-
const { mode, threshold } = rule.match ?? {};
|
|
490
|
-
if (!mode) return null;
|
|
491
|
-
if (!require_isRuleGroup.isRuleGroup(rule.value)) return false;
|
|
492
|
-
const matchModeLC = require_isRuleGroup.lc(mode);
|
|
493
|
-
const matchModeCoerced = matchModeLC === "atleast" && threshold === 1 ? "some" : matchModeLC === "atmost" && threshold === 0 ? "none" : matchModeLC;
|
|
494
|
-
if ((matchModeCoerced === "atleast" || matchModeCoerced === "atmost" || matchModeCoerced === "exactly") && (typeof threshold !== "number" || threshold < 0)) return false;
|
|
495
|
-
return {
|
|
496
|
-
mode: matchModeCoerced,
|
|
497
|
-
threshold
|
|
498
|
-
};
|
|
499
|
-
};
|
|
500
|
-
/**
|
|
501
|
-
* Base alias assigned to the element binding of a subquery generated for a rule's
|
|
502
|
-
* {@link MatchMode `match` mode} (e.g. `unnest(field) as elem_alias`).
|
|
503
|
-
*/
|
|
504
|
-
const subqueryElementAliasBase = "elem_alias";
|
|
505
|
-
/**
|
|
506
|
-
* Returns the element alias for a subquery at the given nesting depth. Depth 0 (the common,
|
|
507
|
-
* non-nested case) uses {@link subqueryElementAliasBase} unchanged; deeper levels are suffixed
|
|
508
|
-
* with the depth, so a subquery nested within a subquery cannot shadow its parent's binding.
|
|
509
|
-
*
|
|
510
|
-
* Deterministic by depth rather than randomized, so output remains stable and snapshot-friendly.
|
|
511
|
-
*
|
|
512
|
-
* @group Export
|
|
513
|
-
*/
|
|
514
|
-
const getSubqueryElementAlias = (subqueryDepth = 0) => subqueryDepth > 0 ? `${subqueryElementAliasBase}_${subqueryDepth}` : subqueryElementAliasBase;
|
|
515
|
-
/**
|
|
516
|
-
* "Replacer" method for JSON.stringify's second argument. Converts `bigint` values to
|
|
517
|
-
* objects with a `$bigint` property having a value of a string representation of
|
|
518
|
-
* the actual `bigint`-type value.
|
|
519
|
-
*
|
|
520
|
-
* Inverse of {@link bigIntJsonParseReviver}.
|
|
521
|
-
*
|
|
522
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt#use_within_json
|
|
523
|
-
*/
|
|
524
|
-
const bigIntJsonStringifyReplacer = (_key, value) => typeof value === "bigint" ? { $bigint: value.toString() } : value;
|
|
525
|
-
/**
|
|
526
|
-
* "Reviver" method for JSON.parse's second argument. Converts objects having a single
|
|
527
|
-
* `$bigint: string` property to an actual `bigint` value.
|
|
528
|
-
*
|
|
529
|
-
* Inverse of {@link bigIntJsonStringifyReplacer}.
|
|
530
|
-
*
|
|
531
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt#use_within_json
|
|
532
|
-
*/
|
|
533
|
-
const bigIntJsonParseReviver = (_key, value) => require_isRuleGroup.isPojo(value) && Object.keys(value).length === 1 && typeof value.$bigint === "string" ? BigInt(value.$bigint) : value;
|
|
534
|
-
//#endregion
|
|
535
|
-
Object.defineProperty(exports, "bigIntJsonParseReviver", {
|
|
536
|
-
enumerable: true,
|
|
537
|
-
get: function() {
|
|
538
|
-
return bigIntJsonParseReviver;
|
|
539
|
-
}
|
|
540
|
-
});
|
|
541
|
-
Object.defineProperty(exports, "bigIntJsonStringifyReplacer", {
|
|
542
|
-
enumerable: true,
|
|
543
|
-
get: function() {
|
|
544
|
-
return bigIntJsonStringifyReplacer;
|
|
545
|
-
}
|
|
546
|
-
});
|
|
547
|
-
Object.defineProperty(exports, "celCombinatorMap", {
|
|
548
|
-
enumerable: true,
|
|
549
|
-
get: function() {
|
|
550
|
-
return celCombinatorMap;
|
|
551
|
-
}
|
|
552
|
-
});
|
|
553
|
-
Object.defineProperty(exports, "defaultNLTranslations", {
|
|
554
|
-
enumerable: true,
|
|
555
|
-
get: function() {
|
|
556
|
-
return defaultNLTranslations;
|
|
557
|
-
}
|
|
558
|
-
});
|
|
559
|
-
Object.defineProperty(exports, "defaultOperatorNegationMap", {
|
|
560
|
-
enumerable: true,
|
|
561
|
-
get: function() {
|
|
562
|
-
return defaultOperatorNegationMap;
|
|
563
|
-
}
|
|
564
|
-
});
|
|
565
|
-
Object.defineProperty(exports, "getLikeWildcards", {
|
|
566
|
-
enumerable: true,
|
|
567
|
-
get: function() {
|
|
568
|
-
return getLikeWildcards;
|
|
569
|
-
}
|
|
570
|
-
});
|
|
571
|
-
Object.defineProperty(exports, "getNLTranslataion", {
|
|
572
|
-
enumerable: true,
|
|
573
|
-
get: function() {
|
|
574
|
-
return getNLTranslataion;
|
|
575
|
-
}
|
|
576
|
-
});
|
|
577
|
-
Object.defineProperty(exports, "getOption", {
|
|
578
|
-
enumerable: true,
|
|
579
|
-
get: function() {
|
|
580
|
-
return getOption;
|
|
581
|
-
}
|
|
582
|
-
});
|
|
583
|
-
Object.defineProperty(exports, "getParseNumberMethod", {
|
|
584
|
-
enumerable: true,
|
|
585
|
-
get: function() {
|
|
586
|
-
return getParseNumberMethod;
|
|
587
|
-
}
|
|
588
|
-
});
|
|
589
|
-
Object.defineProperty(exports, "getQuoteFieldNamesWithArray", {
|
|
590
|
-
enumerable: true,
|
|
591
|
-
get: function() {
|
|
592
|
-
return getQuoteFieldNamesWithArray;
|
|
593
|
-
}
|
|
594
|
-
});
|
|
595
|
-
Object.defineProperty(exports, "getQuotedFieldName", {
|
|
596
|
-
enumerable: true,
|
|
597
|
-
get: function() {
|
|
598
|
-
return getQuotedFieldName;
|
|
599
|
-
}
|
|
600
|
-
});
|
|
601
|
-
Object.defineProperty(exports, "getSQLConcat", {
|
|
602
|
-
enumerable: true,
|
|
603
|
-
get: function() {
|
|
604
|
-
return getSQLConcat;
|
|
605
|
-
}
|
|
606
|
-
});
|
|
607
|
-
Object.defineProperty(exports, "getSubqueryElementAlias", {
|
|
608
|
-
enumerable: true,
|
|
609
|
-
get: function() {
|
|
610
|
-
return getSubqueryElementAlias;
|
|
611
|
-
}
|
|
612
|
-
});
|
|
613
|
-
Object.defineProperty(exports, "isFlexibleOptionArray", {
|
|
614
|
-
enumerable: true,
|
|
615
|
-
get: function() {
|
|
616
|
-
return isFlexibleOptionArray;
|
|
617
|
-
}
|
|
618
|
-
});
|
|
619
|
-
Object.defineProperty(exports, "isFlexibleOptionGroupArray", {
|
|
620
|
-
enumerable: true,
|
|
621
|
-
get: function() {
|
|
622
|
-
return isFlexibleOptionGroupArray;
|
|
623
|
-
}
|
|
624
|
-
});
|
|
625
|
-
Object.defineProperty(exports, "isValidValue", {
|
|
626
|
-
enumerable: true,
|
|
627
|
-
get: function() {
|
|
628
|
-
return isValidValue;
|
|
629
|
-
}
|
|
630
|
-
});
|
|
631
|
-
Object.defineProperty(exports, "isValueProcessorLegacy", {
|
|
632
|
-
enumerable: true,
|
|
633
|
-
get: function() {
|
|
634
|
-
return isValueProcessorLegacy;
|
|
635
|
-
}
|
|
636
|
-
});
|
|
637
|
-
Object.defineProperty(exports, "joinWith", {
|
|
638
|
-
enumerable: true,
|
|
639
|
-
get: function() {
|
|
640
|
-
return joinWith;
|
|
641
|
-
}
|
|
642
|
-
});
|
|
643
|
-
Object.defineProperty(exports, "jsonLogicAdditionalOperators", {
|
|
644
|
-
enumerable: true,
|
|
645
|
-
get: function() {
|
|
646
|
-
return jsonLogicAdditionalOperators;
|
|
647
|
-
}
|
|
648
|
-
});
|
|
649
|
-
Object.defineProperty(exports, "mapSQLOperator", {
|
|
650
|
-
enumerable: true,
|
|
651
|
-
get: function() {
|
|
652
|
-
return mapSQLOperator;
|
|
653
|
-
}
|
|
654
|
-
});
|
|
655
|
-
Object.defineProperty(exports, "mongoOperators", {
|
|
656
|
-
enumerable: true,
|
|
657
|
-
get: function() {
|
|
658
|
-
return mongoOperators;
|
|
659
|
-
}
|
|
660
|
-
});
|
|
661
|
-
Object.defineProperty(exports, "normalizeConstituentWordOrder", {
|
|
662
|
-
enumerable: true,
|
|
663
|
-
get: function() {
|
|
664
|
-
return normalizeConstituentWordOrder;
|
|
665
|
-
}
|
|
666
|
-
});
|
|
667
|
-
Object.defineProperty(exports, "numerifyValues", {
|
|
668
|
-
enumerable: true,
|
|
669
|
-
get: function() {
|
|
670
|
-
return numerifyValues;
|
|
671
|
-
}
|
|
672
|
-
});
|
|
673
|
-
Object.defineProperty(exports, "parseNumber", {
|
|
674
|
-
enumerable: true,
|
|
675
|
-
get: function() {
|
|
676
|
-
return parseNumber;
|
|
677
|
-
}
|
|
678
|
-
});
|
|
679
|
-
Object.defineProperty(exports, "prismaOperators", {
|
|
680
|
-
enumerable: true,
|
|
681
|
-
get: function() {
|
|
682
|
-
return prismaOperators;
|
|
683
|
-
}
|
|
684
|
-
});
|
|
685
|
-
Object.defineProperty(exports, "processMatchMode", {
|
|
686
|
-
enumerable: true,
|
|
687
|
-
get: function() {
|
|
688
|
-
return processMatchMode;
|
|
689
|
-
}
|
|
690
|
-
});
|
|
691
|
-
Object.defineProperty(exports, "shouldRenderAsNumber", {
|
|
692
|
-
enumerable: true,
|
|
693
|
-
get: function() {
|
|
694
|
-
return shouldRenderAsNumber;
|
|
695
|
-
}
|
|
696
|
-
});
|
|
697
|
-
Object.defineProperty(exports, "stripParamPrefix", {
|
|
698
|
-
enumerable: true,
|
|
699
|
-
get: function() {
|
|
700
|
-
return stripParamPrefix;
|
|
701
|
-
}
|
|
702
|
-
});
|
|
703
|
-
Object.defineProperty(exports, "subqueryElementAliasBase", {
|
|
704
|
-
enumerable: true,
|
|
705
|
-
get: function() {
|
|
706
|
-
return subqueryElementAliasBase;
|
|
707
|
-
}
|
|
708
|
-
});
|
|
709
|
-
Object.defineProperty(exports, "toArray", {
|
|
710
|
-
enumerable: true,
|
|
711
|
-
get: function() {
|
|
712
|
-
return toArray;
|
|
713
|
-
}
|
|
714
|
-
});
|
|
715
|
-
Object.defineProperty(exports, "toFlatOptionArray", {
|
|
716
|
-
enumerable: true,
|
|
717
|
-
get: function() {
|
|
718
|
-
return toFlatOptionArray;
|
|
719
|
-
}
|
|
720
|
-
});
|
|
721
|
-
Object.defineProperty(exports, "toFullOption", {
|
|
722
|
-
enumerable: true,
|
|
723
|
-
get: function() {
|
|
724
|
-
return toFullOption;
|
|
725
|
-
}
|
|
726
|
-
});
|
|
727
|
-
Object.defineProperty(exports, "toFullOptionList", {
|
|
728
|
-
enumerable: true,
|
|
729
|
-
get: function() {
|
|
730
|
-
return toFullOptionList;
|
|
731
|
-
}
|
|
732
|
-
});
|
|
733
|
-
Object.defineProperty(exports, "trimIfString", {
|
|
734
|
-
enumerable: true,
|
|
735
|
-
get: function() {
|
|
736
|
-
return trimIfString;
|
|
737
|
-
}
|
|
738
|
-
});
|
|
739
|
-
Object.defineProperty(exports, "withParamPrefix", {
|
|
740
|
-
enumerable: true,
|
|
741
|
-
get: function() {
|
|
742
|
-
return withParamPrefix;
|
|
743
|
-
}
|
|
744
|
-
});
|
|
745
|
-
Object.defineProperty(exports, "wrapLikeFragment", {
|
|
746
|
-
enumerable: true,
|
|
747
|
-
get: function() {
|
|
748
|
-
return wrapLikeFragment;
|
|
749
|
-
}
|
|
750
|
-
});
|
|
751
|
-
|
|
752
|
-
//# sourceMappingURL=utils-C79dxwZb.js.map
|