@react-querybuilder/core 8.20.2 → 8.21.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.
Files changed (108) hide show
  1. package/README.md +4 -0
  2. package/dist/cjs/react-querybuilder_core.cjs.development.d.ts +2261 -2113
  3. package/dist/cjs/react-querybuilder_core.cjs.development.js +319 -22
  4. package/dist/cjs/react-querybuilder_core.cjs.development.js.map +1 -1
  5. package/dist/cjs/react-querybuilder_core.cjs.production.d.ts +2261 -2113
  6. package/dist/cjs/react-querybuilder_core.cjs.production.js +1 -1
  7. package/dist/cjs/react-querybuilder_core.cjs.production.js.map +1 -1
  8. package/dist/{convertQuery-BJKNgecE.js → convertQuery-Cw76XFIn.js} +8 -8
  9. package/dist/{convertQuery-BJKNgecE.js.map → convertQuery-Cw76XFIn.js.map} +1 -1
  10. package/dist/{convertQuery-J1CaoDxe.mjs → convertQuery-D_4J7E-Z.mjs} +2 -2
  11. package/dist/{convertQuery-J1CaoDxe.mjs.map → convertQuery-D_4J7E-Z.mjs.map} +1 -1
  12. package/dist/formatQuery.d.mts +499 -459
  13. package/dist/formatQuery.d.ts +499 -459
  14. package/dist/formatQuery.js +170 -88
  15. package/dist/formatQuery.js.map +1 -1
  16. package/dist/formatQuery.mjs +97 -20
  17. package/dist/formatQuery.mjs.map +1 -1
  18. package/dist/import-BVdxeIBO.d.mts +26 -0
  19. package/dist/import-Ddc3d_8q.d.ts +26 -0
  20. package/dist/{index-DlVg-QXo.d.mts → index-BSwFvkeI.d.mts} +679 -648
  21. package/dist/{index-DlVg-QXo.d.ts → index-BSwFvkeI.d.ts} +679 -648
  22. package/dist/{objectUtils-DBJI82bl.js → isRuleGroup-0JNiQgLg.js} +1 -26
  23. package/dist/isRuleGroup-0JNiQgLg.js.map +1 -0
  24. package/dist/{objectUtils-ZvPkF6u6.mjs → isRuleGroup-CqLThsbu.mjs} +2 -15
  25. package/dist/isRuleGroup-CqLThsbu.mjs.map +1 -0
  26. package/dist/objectUtils-Cr02aGxb.js +27 -0
  27. package/dist/objectUtils-Cr02aGxb.js.map +1 -0
  28. package/dist/objectUtils-DBlmJgBf.mjs +16 -0
  29. package/dist/objectUtils-DBlmJgBf.mjs.map +1 -0
  30. package/dist/parseCEL.d.mts +64 -30
  31. package/dist/parseCEL.d.ts +64 -30
  32. package/dist/parseCEL.js +91 -12
  33. package/dist/parseCEL.js.map +1 -1
  34. package/dist/parseCEL.mjs +85 -8
  35. package/dist/parseCEL.mjs.map +1 -1
  36. package/dist/parseCypher.d.mts +24 -25
  37. package/dist/parseCypher.d.ts +24 -25
  38. package/dist/parseGremlin.d.mts +18 -19
  39. package/dist/parseGremlin.d.ts +18 -19
  40. package/dist/parseJSONata.d.mts +207 -20
  41. package/dist/parseJSONata.d.ts +207 -20
  42. package/dist/parseJSONata.js +92 -7
  43. package/dist/parseJSONata.js.map +1 -1
  44. package/dist/parseJSONata.mjs +80 -4
  45. package/dist/parseJSONata.mjs.map +1 -1
  46. package/dist/parseJsonLogic.d.mts +51 -18
  47. package/dist/parseJsonLogic.d.ts +51 -18
  48. package/dist/parseJsonLogic.js +95 -34
  49. package/dist/parseJsonLogic.js.map +1 -1
  50. package/dist/parseJsonLogic.mjs +65 -6
  51. package/dist/parseJsonLogic.mjs.map +1 -1
  52. package/dist/parseMongoDB.d.mts +89 -58
  53. package/dist/parseMongoDB.d.ts +89 -58
  54. package/dist/parseMongoDB.js +140 -15
  55. package/dist/parseMongoDB.js.map +1 -1
  56. package/dist/parseMongoDB.mjs +128 -5
  57. package/dist/parseMongoDB.mjs.map +1 -1
  58. package/dist/parseSPARQL.d.mts +17 -18
  59. package/dist/parseSPARQL.d.ts +17 -18
  60. package/dist/parseSPARQL.js.map +1 -1
  61. package/dist/parseSPARQL.mjs.map +1 -1
  62. package/dist/parseSQL.d.mts +266 -18
  63. package/dist/parseSQL.d.ts +266 -18
  64. package/dist/parseSQL.js +163 -10
  65. package/dist/parseSQL.js.map +1 -1
  66. package/dist/parseSQL.mjs +149 -7
  67. package/dist/parseSQL.mjs.map +1 -1
  68. package/dist/parseSpEL.d.mts +193 -19
  69. package/dist/parseSpEL.d.ts +193 -19
  70. package/dist/parseSpEL.js +166 -7
  71. package/dist/parseSpEL.js.map +1 -1
  72. package/dist/parseSpEL.mjs +142 -6
  73. package/dist/parseSpEL.mjs.map +1 -1
  74. package/dist/{prepareQueryObjects-Bni5VgYM.js → prepareQueryObjects-C2-kTZvR.js} +5 -5
  75. package/dist/prepareQueryObjects-C2-kTZvR.js.map +1 -0
  76. package/dist/{prepareQueryObjects-BCLU20Cg.mjs → prepareQueryObjects-Q18lHCKl.mjs} +3 -3
  77. package/dist/prepareQueryObjects-Q18lHCKl.mjs.map +1 -0
  78. package/dist/query-builder-layout.css.map +1 -1
  79. package/dist/query-builder.css.map +1 -1
  80. package/dist/react-querybuilder_core.d.mts +2261 -2113
  81. package/dist/react-querybuilder_core.legacy-esm.d.ts +2261 -2113
  82. package/dist/react-querybuilder_core.legacy-esm.js +335 -40
  83. package/dist/react-querybuilder_core.legacy-esm.js.map +1 -1
  84. package/dist/react-querybuilder_core.mjs +309 -23
  85. package/dist/react-querybuilder_core.mjs.map +1 -1
  86. package/dist/react-querybuilder_core.production.d.mts +2261 -2113
  87. package/dist/react-querybuilder_core.production.mjs +1 -1
  88. package/dist/react-querybuilder_core.production.mjs.map +1 -1
  89. package/dist/styles/_layout.scss +4 -10
  90. package/dist/transformQuery.d.mts +91 -92
  91. package/dist/transformQuery.d.ts +91 -92
  92. package/dist/transformQuery.js +4 -3
  93. package/dist/transformQuery.js.map +1 -1
  94. package/dist/transformQuery.mjs +2 -1
  95. package/dist/transformQuery.mjs.map +1 -1
  96. package/dist/{utils-BpaOtylk.js → utils-DEwV7F6B.js} +108 -12
  97. package/dist/utils-DEwV7F6B.js.map +1 -0
  98. package/dist/{utils-CJRGiPb-.mjs → utils-Dt0D_DMV.mjs} +69 -3
  99. package/dist/utils-Dt0D_DMV.mjs.map +1 -0
  100. package/package.json +14 -14
  101. package/dist/import-Qs1-kgv5.d.ts +0 -27
  102. package/dist/import-ShTj5IdB.d.mts +0 -27
  103. package/dist/objectUtils-DBJI82bl.js.map +0 -1
  104. package/dist/objectUtils-ZvPkF6u6.mjs.map +0 -1
  105. package/dist/prepareQueryObjects-BCLU20Cg.mjs.map +0 -1
  106. package/dist/prepareQueryObjects-Bni5VgYM.js.map +0 -1
  107. package/dist/utils-BpaOtylk.js.map +0 -1
  108. package/dist/utils-CJRGiPb-.mjs.map +0 -1
@@ -1,217 +1,216 @@
1
- import { A as SetRequired, O as RuleType, S as RuleGroupTypeAny, _ as ValueProcessorLegacy, a as ExportOperatorMap, c as NLTranslationKey, d as ParameterizedSQL, f as RQBJsonLogic, g as ValueProcessorByRule, h as SQLPreset, i as ExportObjectFormats, l as NLTranslations, m as RuleProcessor, n as DiagnosticsResult, o as FormatQueryOptions, p as RuleGroupProcessor, r as ExportFormat, s as GroupVariantCondition, t as ConstituentWordOrder, u as ParameterizedNamedSQL, v as ValueProcessorOptions } from "./index-DlVg-QXo.js";
1
+ import { E as RuleGroupTypeAny, I as SetRequired, N as RuleType, S as ValueProcessorOptions, _ as RuleGroupProcessor, a as DiagnosticsResult, b as ValueProcessorByRule, c as ExportOperatorMap, d as NLTranslationKey, f as NLTranslations, h as RQBJsonLogic, i as ConstituentWordOrder, l as FormatQueryOptions, m as ParameterizedSQL, o as ExportFormat, p as ParameterizedNamedSQL, s as ExportObjectFormats, u as GroupVariantCondition, v as RuleProcessor, x as ValueProcessorLegacy, y as SQLPreset } from "./index-BSwFvkeI.js";
2
2
  import { Column, Operators, SQL, Table } from "drizzle-orm";
3
3
  import { WhereOptions } from "sequelize";
4
4
  import { eq } from "@tanstack/db";
5
-
6
5
  //#region src/utils/formatQuery/defaultRuleProcessorCEL.d.ts
7
6
  /**
8
- * Default rule processor used by {@link formatQuery} for "cel" format.
9
- *
10
- * @group Export
11
- */
7
+ * Default rule processor used by {@link formatQuery} for "cel" format.
8
+ *
9
+ * @group Export
10
+ */
12
11
  declare const defaultRuleProcessorCEL: RuleProcessor;
13
12
  //#endregion
14
13
  //#region src/utils/formatQuery/defaultRuleProcessorMongoDB.d.ts
15
14
  /**
16
- * Default rule processor used by {@link formatQuery} for "mongodb" format.
17
- *
18
- * Note that the "mongodb" format is deprecated in favor of the "mongodb_query" format.
19
- *
20
- * @group Export
21
- */
15
+ * Default rule processor used by {@link formatQuery} for "mongodb" format.
16
+ *
17
+ * Note that the "mongodb" format is deprecated in favor of the "mongodb_query" format.
18
+ *
19
+ * @group Export
20
+ */
22
21
  declare const defaultRuleProcessorMongoDB: RuleProcessor;
23
22
  //#endregion
24
23
  //#region src/utils/formatQuery/defaultRuleProcessorSpEL.d.ts
25
24
  /**
26
- * Default rule processor used by {@link formatQuery} for "spel" format.
27
- *
28
- * @group Export
29
- */
25
+ * Default rule processor used by {@link formatQuery} for "spel" format.
26
+ *
27
+ * @group Export
28
+ */
30
29
  declare const defaultRuleProcessorSpEL: RuleProcessor;
31
30
  //#endregion
32
31
  //#region src/utils/formatQuery/defaultValueProcessorByRule.d.ts
33
32
  /**
34
- * Default value processor used by {@link formatQuery} for "sql" format.
35
- *
36
- * @group Export
37
- */
33
+ * Default value processor used by {@link formatQuery} for "sql" format.
34
+ *
35
+ * @group Export
36
+ */
38
37
  declare const defaultValueProcessorByRule: ValueProcessorByRule;
39
38
  //#endregion
40
39
  //#region src/utils/formatQuery/defaultRuleGroupProcessorCEL.d.ts
41
40
  /**
42
- * Rule group processor used by {@link formatQuery} for "cel" format.
43
- *
44
- * @group Export
45
- */
41
+ * Rule group processor used by {@link formatQuery} for "cel" format.
42
+ *
43
+ * @group Export
44
+ */
46
45
  declare const defaultRuleGroupProcessorCEL: RuleGroupProcessor<string>;
47
46
  //#endregion
48
47
  //#region src/utils/formatQuery/defaultRuleGroupProcessorCypher.d.ts
49
48
  /**
50
- * Maps a {@link DefaultCombinatorName} to a Cypher combinator keyword.
51
- *
52
- * @group Export
53
- */
49
+ * Maps a {@link DefaultCombinatorName} to a Cypher combinator keyword.
50
+ *
51
+ * @group Export
52
+ */
54
53
  declare const cypherCombinatorMap: {
55
54
  and: "AND";
56
55
  or: "OR";
57
56
  };
58
57
  /**
59
- * Rule group processor used by {@link formatQuery} for "cypher" and "gql" formats.
60
- *
61
- * @group Export
62
- */
58
+ * Rule group processor used by {@link formatQuery} for "cypher" and "gql" formats.
59
+ *
60
+ * @group Export
61
+ */
63
62
  declare const defaultRuleGroupProcessorCypher: RuleGroupProcessor<string>;
64
63
  //#endregion
65
64
  //#region src/utils/formatQuery/defaultRuleGroupProcessorDrizzle.d.ts
66
65
  /**
67
- * Default rule group processor used by {@link formatQuery} for the "drizzle" format. The returned
68
- * function can be assigned to the `where` property in the Drizzle relational queries API.
69
- *
70
- * @example
71
- * const where = formatQuery(query, 'drizzle');
72
- * const results = db.query.users.findMany({ where });
73
- *
74
- * @returns Function that takes a Drizzle table config and an object of Drizzle operators.
75
- *
76
- * @group Export
77
- */
66
+ * Default rule group processor used by {@link formatQuery} for the "drizzle" format. The returned
67
+ * function can be assigned to the `where` property in the Drizzle relational queries API.
68
+ *
69
+ * @example
70
+ * const where = formatQuery(query, 'drizzle');
71
+ * const results = db.query.users.findMany({ where });
72
+ *
73
+ * @returns Function that takes a Drizzle table config and an object of Drizzle operators.
74
+ *
75
+ * @group Export
76
+ */
78
77
  declare const defaultRuleGroupProcessorDrizzle: RuleGroupProcessor<(columns: Record<string, Column> | Table, drizzleOperators: Operators) => SQL | undefined>;
79
78
  //#endregion
80
79
  //#region src/utils/formatQuery/defaultRuleGroupProcessorElasticSearch.d.ts
81
80
  /**
82
- * Rule group processor used by {@link formatQuery} for "elasticsearch" format.
83
- *
84
- * @group Export
85
- */
81
+ * Rule group processor used by {@link formatQuery} for "elasticsearch" format.
82
+ *
83
+ * @group Export
84
+ */
86
85
  declare const defaultRuleGroupProcessorElasticSearch: RuleGroupProcessor<Record<string, unknown>>;
87
86
  //#endregion
88
87
  //#region src/utils/formatQuery/defaultRuleGroupProcessorGremlin.d.ts
89
88
  /**
90
- * Rule group processor used by {@link formatQuery} for "gremlin" format.
91
- *
92
- * At the top level, filter rules produce chained `.has()` steps (implicit AND).
93
- * Nested groups use `.and()` / `.or()` / `.not()` compound traversals with
94
- * `__` anonymous traversal prefixes.
95
- *
96
- * @group Export
97
- */
89
+ * Rule group processor used by {@link formatQuery} for "gremlin" format.
90
+ *
91
+ * At the top level, filter rules produce chained `.has()` steps (implicit AND).
92
+ * Nested groups use `.and()` / `.or()` / `.not()` compound traversals with
93
+ * `__` anonymous traversal prefixes.
94
+ *
95
+ * @group Export
96
+ */
98
97
  declare const defaultRuleGroupProcessorGremlin: RuleGroupProcessor<string>;
99
98
  //#endregion
100
99
  //#region src/utils/formatQuery/defaultRuleGroupProcessorJSONata.d.ts
101
100
  /**
102
- * Rule group processor used by {@link formatQuery} for "jsonata" format.
103
- *
104
- * @group Export
105
- */
101
+ * Rule group processor used by {@link formatQuery} for "jsonata" format.
102
+ *
103
+ * @group Export
104
+ */
106
105
  declare const defaultRuleGroupProcessorJSONata: RuleGroupProcessor<string>;
107
106
  //#endregion
108
107
  //#region src/utils/formatQuery/defaultRuleGroupProcessorJsonLogic.d.ts
109
108
  /**
110
- * Rule group processor used by {@link formatQuery} for "jsonlogic" format.
111
- *
112
- * @group Export
113
- */
109
+ * Rule group processor used by {@link formatQuery} for "jsonlogic" format.
110
+ *
111
+ * @group Export
112
+ */
114
113
  declare const defaultRuleGroupProcessorJsonLogic: RuleGroupProcessor<RQBJsonLogic>;
115
114
  //#endregion
116
115
  //#region src/utils/formatQuery/defaultRuleGroupProcessorLDAP.d.ts
117
116
  /**
118
- * Rule group processor used by {@link formatQuery} for "ldap" format.
119
- *
120
- * @group Export
121
- */
117
+ * Rule group processor used by {@link formatQuery} for "ldap" format.
118
+ *
119
+ * @group Export
120
+ */
122
121
  declare const defaultRuleGroupProcessorLDAP: RuleGroupProcessor<string>;
123
122
  //#endregion
124
123
  //#region src/utils/formatQuery/defaultRuleGroupProcessorMongoDB.d.ts
125
124
  /**
126
- * Rule group processor used by {@link formatQuery} for "mongodb" format.
127
- *
128
- * Note that the "mongodb" format is deprecated in favor of the "mongodb_query" format.
129
- *
130
- * @group Export
131
- */
125
+ * Rule group processor used by {@link formatQuery} for "mongodb" format.
126
+ *
127
+ * Note that the "mongodb" format is deprecated in favor of the "mongodb_query" format.
128
+ *
129
+ * @group Export
130
+ */
132
131
  declare const defaultRuleGroupProcessorMongoDB: RuleGroupProcessor<string>;
133
132
  //#endregion
134
133
  //#region src/utils/formatQuery/defaultRuleGroupProcessorMongoDBQuery.d.ts
135
134
  /**
136
- * Default fallback object used by {@link formatQuery} for "mongodb_query" format.
137
- *
138
- * @group Export
139
- */
135
+ * Default fallback object used by {@link formatQuery} for "mongodb_query" format.
136
+ *
137
+ * @group Export
138
+ */
140
139
  declare const mongoDbFallback: {
141
140
  readonly $and: readonly [{
142
141
  readonly $expr: true;
143
142
  }];
144
143
  };
145
144
  /**
146
- * Rule group processor used by {@link formatQuery} for "mongodb_query" format.
147
- *
148
- * @group Export
149
- */
145
+ * Rule group processor used by {@link formatQuery} for "mongodb_query" format.
146
+ *
147
+ * @group Export
148
+ */
150
149
  declare const defaultRuleGroupProcessorMongoDBQuery: RuleGroupProcessor;
151
150
  //#endregion
152
151
  //#region src/utils/formatQuery/defaultRuleGroupProcessorNL.d.ts
153
152
  /**
154
- * Rule group processor used by {@link formatQuery} for "natural_language" format.
155
- *
156
- * @group Export
157
- */
153
+ * Rule group processor used by {@link formatQuery} for "natural_language" format.
154
+ *
155
+ * @group Export
156
+ */
158
157
  declare const defaultRuleGroupProcessorNL: RuleGroupProcessor<string>;
159
158
  //#endregion
160
159
  //#region src/utils/formatQuery/defaultRuleGroupProcessorParameterized.d.ts
161
160
  /**
162
- * Rule group processor used by {@link formatQuery} for "parameterized" and
163
- * "parameterized_named" formats.
164
- *
165
- * @group Export
166
- */
161
+ * Rule group processor used by {@link formatQuery} for "parameterized" and
162
+ * "parameterized_named" formats.
163
+ *
164
+ * @group Export
165
+ */
167
166
  declare const defaultRuleGroupProcessorParameterized: RuleGroupProcessor<ParameterizedSQL | ParameterizedNamedSQL>;
168
167
  //#endregion
169
168
  //#region src/utils/formatQuery/defaultRuleGroupProcessorPrisma.d.ts
170
169
  /**
171
- * Default fallback object used by {@link formatQuery} for "prisma" format.
172
- *
173
- * @group Export
174
- */
170
+ * Default fallback object used by {@link formatQuery} for "prisma" format.
171
+ *
172
+ * @group Export
173
+ */
175
174
  declare const prismaFallback: {};
176
175
  /**
177
- * Rule group processor used by {@link formatQuery} for "prisma" format.
178
- *
179
- * @group Export
180
- */
176
+ * Rule group processor used by {@link formatQuery} for "prisma" format.
177
+ *
178
+ * @group Export
179
+ */
181
180
  declare const defaultRuleGroupProcessorPrisma: RuleGroupProcessor<Record<string, unknown> | undefined>;
182
181
  //#endregion
183
182
  //#region src/utils/formatQuery/defaultRuleGroupProcessorSequelize.d.ts
184
183
  /**
185
- * Rule group processor used by {@link formatQuery} for "sequelize" format.
186
- *
187
- * @group Export
188
- */
184
+ * Rule group processor used by {@link formatQuery} for "sequelize" format.
185
+ *
186
+ * @group Export
187
+ */
189
188
  declare const defaultRuleGroupProcessorSequelize: RuleGroupProcessor<WhereOptions | undefined>;
190
189
  //#endregion
191
190
  //#region src/utils/formatQuery/defaultRuleGroupProcessorSPARQL.d.ts
192
191
  /**
193
- * Rule group processor used by {@link formatQuery} for "sparql" format.
194
- *
195
- * SPARQL uses the same combinators as CEL (`&&` / `||`) and `!()` for negation.
196
- *
197
- * @group Export
198
- */
192
+ * Rule group processor used by {@link formatQuery} for "sparql" format.
193
+ *
194
+ * SPARQL uses the same combinators as CEL (`&&` / `||`) and `!()` for negation.
195
+ *
196
+ * @group Export
197
+ */
199
198
  declare const defaultRuleGroupProcessorSPARQL: RuleGroupProcessor<string>;
200
199
  //#endregion
201
200
  //#region src/utils/formatQuery/defaultRuleGroupProcessorSpEL.d.ts
202
201
  /**
203
- * Default rule processor used by {@link formatQuery} for "spel" format.
204
- *
205
- * @group Export
206
- */
202
+ * Default rule processor used by {@link formatQuery} for "spel" format.
203
+ *
204
+ * @group Export
205
+ */
207
206
  declare const defaultRuleGroupProcessorSpEL: RuleGroupProcessor<string>;
208
207
  //#endregion
209
208
  //#region src/utils/formatQuery/defaultRuleGroupProcessorSQL.d.ts
210
209
  /**
211
- * Default rule processor used by {@link formatQuery} for "sql" format.
212
- *
213
- * @group Export
214
- */
210
+ * Default rule processor used by {@link formatQuery} for "sql" format.
211
+ *
212
+ * @group Export
213
+ */
215
214
  declare const defaultRuleGroupProcessorSQL: RuleGroupProcessor<string>;
216
215
  //#endregion
217
216
  //#region src/utils/formatQuery/tanStackDbTypes.d.ts
@@ -220,366 +219,395 @@ type TanStackDbWhereCallback = (refs: Record<string, unknown>) => TanStackDbWher
220
219
  //#endregion
221
220
  //#region src/utils/formatQuery/defaultRuleGroupProcessorTanStackDB.d.ts
222
221
  /**
223
- * Default rule group processor used by {@link formatQuery} for the "tanstack_db" format.
224
- * Returns a `WhereCallback` suitable for TanStack DB's `.where()` method.
225
- *
226
- * @example
227
- * const where = formatQuery(query, { format: 'tanstack_db', context: { tanstackDb: tsdb } });
228
- * const results = useLiveQuery(q => q.from({ todo: todosCollection }).where(where));
229
- *
230
- * @group Export
231
- */
222
+ * Default rule group processor used by {@link formatQuery} for the "tanstack_db" format.
223
+ * Returns a `WhereCallback` suitable for TanStack DB's `.where()` method.
224
+ *
225
+ * @example
226
+ * const where = formatQuery(query, { format: 'tanstack_db', context: { tanstackDb: tsdb } });
227
+ * const results = useLiveQuery(q => q.from({ todo: todosCollection }).where(where));
228
+ *
229
+ * @group Export
230
+ */
232
231
  declare const defaultRuleGroupProcessorTanStackDB: RuleGroupProcessor<TanStackDbWhereCallback>;
233
232
  //#endregion
234
233
  //#region src/utils/formatQuery/defaultRuleGroupProcessorDiagnostics.d.ts
235
234
  /**
236
- * Rule group processor used by {@link formatQuery} for "diagnostics" format.
237
- *
238
- * Produces a {@link DiagnosticsResult} containing an annotated copy of the query
239
- * tree (`query`) with `valid`, `reasons`, `path`, and `level` properties on every
240
- * rule and group; a flat `diagnostics` array; aggregate `stats`; and a per-field
241
- * `fieldSummary`.
242
- *
243
- * @group Export
244
- */
235
+ * Rule group processor used by {@link formatQuery} for "diagnostics" format.
236
+ *
237
+ * Produces a {@link DiagnosticsResult} containing an annotated copy of the query
238
+ * tree (`query`) with `valid`, `reasons`, `path`, and `level` properties on every
239
+ * rule and group; a flat `diagnostics` array; aggregate `stats`; and a per-field
240
+ * `fieldSummary`.
241
+ *
242
+ * @group Export
243
+ */
245
244
  declare const defaultRuleGroupProcessorDiagnostics: RuleGroupProcessor<DiagnosticsResult>;
246
245
  //#endregion
247
246
  //#region src/utils/formatQuery/defaultRuleProcessorCypher.d.ts
248
247
  /**
249
- * Default rule processor used by {@link formatQuery} for "cypher" and "gql" formats.
250
- *
251
- * @group Export
252
- */
248
+ * Default rule processor used by {@link formatQuery} for "cypher" and "gql" formats.
249
+ *
250
+ * @group Export
251
+ */
253
252
  declare const defaultRuleProcessorCypher: RuleProcessor;
254
253
  //#endregion
255
254
  //#region src/utils/formatQuery/defaultRuleProcessorDrizzle.d.ts
256
255
  /**
257
- * Default rule processor used by {@link formatQuery} for the "drizzle" format.
258
- *
259
- * @group Export
260
- */
256
+ * Default rule processor used by {@link formatQuery} for the "drizzle" format.
257
+ *
258
+ * @group Export
259
+ */
261
260
  declare const defaultRuleProcessorDrizzle: RuleProcessor;
262
261
  //#endregion
263
262
  //#region src/utils/formatQuery/defaultRuleProcessorElasticSearch.d.ts
264
263
  /**
265
- * Default rule processor used by {@link formatQuery} for "elasticsearch" format.
266
- *
267
- * @group Export
268
- */
264
+ * Default rule processor used by {@link formatQuery} for "elasticsearch" format.
265
+ *
266
+ * @group Export
267
+ */
269
268
  declare const defaultRuleProcessorElasticSearch: RuleProcessor;
270
269
  //#endregion
271
270
  //#region src/utils/formatQuery/defaultRuleProcessorGremlin.d.ts
272
271
  /**
273
- * Default rule processor used by {@link formatQuery} for "gremlin" format.
274
- *
275
- * Each rule becomes a `.has()` step (or `.hasNot()`/`.has()` for null checks).
276
- *
277
- * @group Export
278
- */
272
+ * Default rule processor used by {@link formatQuery} for "gremlin" format.
273
+ *
274
+ * Each rule becomes a `.has()` step (or `.hasNot()`/`.has()` for null checks).
275
+ *
276
+ * @group Export
277
+ */
279
278
  declare const defaultRuleProcessorGremlin: RuleProcessor;
280
279
  //#endregion
281
280
  //#region src/utils/formatQuery/defaultRuleProcessorJSONata.d.ts
282
281
  /**
283
- * Default rule processor used by {@link formatQuery} for "jsonata" format.
284
- *
285
- * @group Export
286
- */
282
+ * Default rule processor used by {@link formatQuery} for "jsonata" format.
283
+ *
284
+ * @group Export
285
+ */
287
286
  declare const defaultRuleProcessorJSONata: RuleProcessor;
288
287
  //#endregion
289
288
  //#region src/utils/formatQuery/defaultRuleProcessorJsonLogic.d.ts
290
289
  /**
291
- * Default rule processor used by {@link formatQuery} for "jsonlogic" format.
292
- *
293
- * @group Export
294
- */
290
+ * Default rule processor used by {@link formatQuery} for "jsonlogic" format.
291
+ *
292
+ * @group Export
293
+ */
295
294
  declare const defaultRuleProcessorJsonLogic: RuleProcessor;
296
295
  //#endregion
297
296
  //#region src/utils/formatQuery/defaultRuleProcessorLDAP.d.ts
298
297
  /**
299
- * Default rule processor used by {@link formatQuery} for "ldap" format.
300
- *
301
- * @group Export
302
- */
298
+ * Default rule processor used by {@link formatQuery} for "ldap" format.
299
+ *
300
+ * @group Export
301
+ */
303
302
  declare const defaultRuleProcessorLDAP: RuleProcessor;
304
303
  //#endregion
305
304
  //#region src/utils/formatQuery/defaultRuleProcessorMongoDBQuery.d.ts
306
305
  /**
307
- * Default rule processor used by {@link formatQuery} for "mongodb_query" format.
308
- *
309
- * @group Export
310
- */
306
+ * Default rule processor used by {@link formatQuery} for "mongodb_query" format.
307
+ *
308
+ * @group Export
309
+ */
311
310
  declare const defaultRuleProcessorMongoDBQuery: RuleProcessor;
312
311
  //#endregion
313
312
  //#region src/utils/formatQuery/defaultRuleProcessorNL.d.ts
314
313
  /**
315
- * Default operator map used by {@link formatQuery} for "natural_language" format.
316
- *
317
- * @group Export
318
- */
314
+ * Default operator map used by {@link formatQuery} for "natural_language" format.
315
+ *
316
+ * @group Export
317
+ */
319
318
  declare const defaultExportOperatorMap: ExportOperatorMap;
320
319
  /**
321
- * Default operator processor used by {@link formatQuery} for "natural_language" format.
322
- *
323
- * @group Export
324
- */
320
+ * Default operator processor used by {@link formatQuery} for "natural_language" format.
321
+ *
322
+ * @group Export
323
+ */
325
324
  declare const defaultOperatorProcessorNL: RuleProcessor;
326
325
  /**
327
- * Default rule processor used by {@link formatQuery} for "natural_language" format.
328
- *
329
- * @group Export
330
- */
326
+ * Default rule processor used by {@link formatQuery} for "natural_language" format.
327
+ *
328
+ * @group Export
329
+ */
331
330
  declare const defaultRuleProcessorNL: RuleProcessor;
332
331
  //#endregion
333
332
  //#region src/utils/formatQuery/defaultRuleProcessorParameterized.d.ts
334
333
  /**
335
- * Default rule processor used by {@link formatQuery} for "parameterized" and
336
- * "parameterized_named" formats.
337
- *
338
- * @group Export
339
- */
334
+ * Default rule processor used by {@link formatQuery} for "parameterized" and
335
+ * "parameterized_named" formats.
336
+ *
337
+ * @group Export
338
+ */
340
339
  declare const defaultRuleProcessorParameterized: RuleProcessor;
341
340
  //#endregion
342
341
  //#region src/utils/formatQuery/defaultRuleProcessorPrisma.d.ts
343
342
  /**
344
- * Default rule processor used by {@link formatQuery} for "prisma" format.
345
- *
346
- * @group Export
347
- */
343
+ * Default rule processor used by {@link formatQuery} for "prisma" format.
344
+ *
345
+ * @group Export
346
+ */
348
347
  declare const defaultRuleProcessorPrisma: RuleProcessor;
349
348
  //#endregion
350
349
  //#region src/utils/formatQuery/defaultRuleProcessorSequelize.d.ts
351
350
  /**
352
- * Default rule processor used by {@link formatQuery} for the "sequelize" format.
353
- *
354
- * @group Export
355
- */
351
+ * Default rule processor used by {@link formatQuery} for the "sequelize" format.
352
+ *
353
+ * @group Export
354
+ */
356
355
  declare const defaultRuleProcessorSequelize: RuleProcessor;
357
356
  //#endregion
358
357
  //#region src/utils/formatQuery/defaultRuleProcessorSPARQL.d.ts
359
358
  /** Auto-prefix a SPARQL variable name with `?` unless it's already prefixed, a URI, or a prefixed name.
360
- *
361
- * @group Export
362
- */
359
+ *
360
+ * @group Export
361
+ */
363
362
  declare const sparqlVar: (name: string) => string;
364
363
  /**
365
- * Default rule processor used by {@link formatQuery} for "sparql" format.
366
- *
367
- * @group Export
368
- */
364
+ * Default rule processor used by {@link formatQuery} for "sparql" format.
365
+ *
366
+ * @group Export
367
+ */
369
368
  declare const defaultRuleProcessorSPARQL: RuleProcessor;
370
369
  //#endregion
371
370
  //#region src/utils/formatQuery/defaultRuleProcessorSQL.d.ts
372
371
  /**
373
- * Default operator processor used by {@link formatQuery} for "sql" and "parameterized*" formats.
374
- *
375
- * @group Export
376
- */
372
+ * Default operator processor used by {@link formatQuery} for "sql" and "parameterized*" formats.
373
+ *
374
+ * @group Export
375
+ */
377
376
  declare const defaultOperatorProcessorSQL: RuleProcessor;
378
377
  /**
379
- * Default rule processor used by {@link formatQuery} for "sql" format.
380
- *
381
- * @group Export
382
- */
378
+ * Default rule processor used by {@link formatQuery} for "sql" format.
379
+ *
380
+ * @group Export
381
+ */
383
382
  declare const defaultRuleProcessorSQL: RuleProcessor;
384
383
  //#endregion
385
384
  //#region src/utils/formatQuery/defaultRuleProcessorTanStackDB.d.ts
386
385
  /**
387
- * Default rule processor used by {@link formatQuery} for the "tanstack_db" format.
388
- *
389
- * @group Export
390
- */
386
+ * Default rule processor used by {@link formatQuery} for the "tanstack_db" format.
387
+ *
388
+ * @group Export
389
+ */
391
390
  declare const defaultRuleProcessorTanStackDB: RuleProcessor;
392
391
  //#endregion
393
392
  //#region src/utils/formatQuery/defaultValueProcessorNL.d.ts
394
393
  /**
395
- * Default value processor used by {@link formatQuery} for "natural_language" format.
396
- *
397
- * @group Export
398
- */
394
+ * Default value processor used by {@link formatQuery} for "natural_language" format.
395
+ *
396
+ * @group Export
397
+ */
399
398
  declare const defaultValueProcessorNL: ValueProcessorByRule;
400
399
  //#endregion
401
400
  //#region src/utils/formatQuery/formatQuery.d.ts
402
401
  /**
403
- * A collection of option presets for {@link formatQuery}, specifically for SQL-based formats.
404
- *
405
- * @group Export
406
- */
402
+ * A collection of option presets for {@link formatQuery}, specifically for SQL-based formats.
403
+ *
404
+ * @group Export
405
+ */
407
406
  declare const sqlDialectPresets: Record<SQLPreset, FormatQueryOptions>;
408
407
  /**
409
- * A collection of option presets for {@link formatQuery}.
410
- *
411
- * @group Export
412
- */
408
+ * A collection of option presets for {@link formatQuery}.
409
+ *
410
+ * @group Export
411
+ */
413
412
  declare const formatQueryOptionPresets: Record<string, FormatQueryOptions>;
414
413
  /**
415
- * Generates a formatted (indented two spaces) JSON string from a query object.
416
- *
417
- * @group Export
418
- */
414
+ * Generates a formatted (indented two spaces) JSON string from a query object.
415
+ *
416
+ * @group Export
417
+ */
419
418
  declare function formatQuery(ruleGroup: RuleGroupTypeAny): string;
420
419
  /**
421
- * Generates a result based on the provided rule group processor.
422
- *
423
- * @group Export
424
- */
420
+ * Generates a result based on the provided rule group processor.
421
+ *
422
+ * @group Export
423
+ */
425
424
  declare function formatQuery<TResult = unknown>(ruleGroup: RuleGroupTypeAny, options: FormatQueryOptions & {
426
425
  ruleGroupProcessor: RuleGroupProcessor<TResult>;
427
426
  }): TResult;
428
427
  /**
429
- * Generates a {@link index!ParameterizedSQL ParameterizedSQL} object from a query object.
430
- *
431
- * @group Export
432
- */
428
+ * Generates a {@link index!ParameterizedSQL ParameterizedSQL} object from a query object.
429
+ *
430
+ * @group Export
431
+ */
433
432
  declare function formatQuery(ruleGroup: RuleGroupTypeAny, options: "parameterized" | (FormatQueryOptions & {
434
433
  format: "parameterized";
435
434
  })): ParameterizedSQL;
436
435
  /**
437
- * Generates a {@link index!ParameterizedNamedSQL ParameterizedNamedSQL} object from a query object.
438
- *
439
- * @group Export
440
- */
436
+ * Generates a {@link index!ParameterizedNamedSQL ParameterizedNamedSQL} object from a query object.
437
+ *
438
+ * @group Export
439
+ */
441
440
  declare function formatQuery(ruleGroup: RuleGroupTypeAny, options: "parameterized_named" | (FormatQueryOptions & {
442
441
  format: "parameterized_named";
443
442
  })): ParameterizedNamedSQL;
444
443
  /**
445
- * Generates a {@link index!RQBJsonLogic JsonLogic} object from a query object.
446
- *
447
- * @group Export
448
- */
444
+ * Generates a {@link index!RQBJsonLogic JsonLogic} object from a query object.
445
+ *
446
+ * @group Export
447
+ */
449
448
  declare function formatQuery(ruleGroup: RuleGroupTypeAny, options: "jsonlogic" | (FormatQueryOptions & {
450
449
  format: "jsonlogic";
451
450
  })): RQBJsonLogic;
452
451
  /**
453
- * Generates an ElasticSearch query object from an RQB query object.
454
- *
455
- * NOTE: Support for the ElasticSearch format is experimental.
456
- * You may have better results exporting "sql" format then using
457
- * [ElasticSearch SQL](https://www.elastic.co/guide/en/elasticsearch/reference/current/xpack-sql.html).
458
- *
459
- * @group Export
460
- */
452
+ * Generates an ElasticSearch query object from an RQB query object.
453
+ *
454
+ * NOTE: Support for the ElasticSearch format is experimental.
455
+ * You may have better results exporting "sql" format then using
456
+ * [ElasticSearch SQL](https://www.elastic.co/guide/en/elasticsearch/reference/current/xpack-sql.html).
457
+ *
458
+ * @group Export
459
+ */
461
460
  declare function formatQuery(ruleGroup: RuleGroupTypeAny, options: "elasticsearch" | (FormatQueryOptions & {
462
461
  format: "elasticsearch";
463
462
  })): Record<string, any>;
464
463
  /**
465
- * Generates a MongoDB query object from an RQB query object.
466
- *
467
- * This is equivalent to the "mongodb" format, but returns a JSON object
468
- * instead of a string.
469
- *
470
- * @group Export
471
- */
464
+ * Generates a MongoDB query object from an RQB query object.
465
+ *
466
+ * This is equivalent to the "mongodb" format, but returns a JSON object
467
+ * instead of a string.
468
+ *
469
+ * @group Export
470
+ */
472
471
  declare function formatQuery(ruleGroup: RuleGroupTypeAny, options: "mongodb_query" | (FormatQueryOptions & {
473
472
  format: "mongodb_query";
474
473
  })): Record<string, any>;
475
474
  /**
476
- * Generates a JSON.stringify'd MongoDB query object from an RQB query object.
477
- *
478
- * This is equivalent to the "mongodb_query" format, but returns a string
479
- * instead of a JSON object.
480
- *
481
- * @deprecated Use the "mongodb_query" format for greater flexibility.
482
- *
483
- * @group Export
484
- */
475
+ * Generates a JSON.stringify'd MongoDB query object from an RQB query object.
476
+ *
477
+ * This is equivalent to the "mongodb_query" format, but returns a string
478
+ * instead of a JSON object.
479
+ *
480
+ * @deprecated Use the "mongodb_query" format for greater flexibility.
481
+ *
482
+ * @group Export
483
+ */
485
484
  declare function formatQuery(ruleGroup: RuleGroupTypeAny, options: "mongodb" | (FormatQueryOptions & {
486
485
  format: "mongodb";
487
486
  })): string;
488
487
  /**
489
- * Generates a Prisma ORM query object from an RQB query object.
490
- *
491
- * @group Export
492
- */
488
+ * Generates a Prisma ORM query object from an RQB query object.
489
+ *
490
+ * @group Export
491
+ */
493
492
  declare function formatQuery(ruleGroup: RuleGroupTypeAny, options: "prisma" | (FormatQueryOptions & {
494
493
  format: "prisma";
495
494
  })): Record<string, any>;
496
495
  /**
497
- * Generates a Drizzle ORM query function from an RQB query object. The function can
498
- * be assigned to the `where` property in the Drizzle relational queries API.
499
- *
500
- * @group Export
501
- */
496
+ * Generates a Drizzle ORM query function from an RQB query object. The function can
497
+ * be assigned to the `where` property in the Drizzle relational queries API.
498
+ *
499
+ * @group Export
500
+ */
502
501
  declare function formatQuery(ruleGroup: RuleGroupTypeAny, options: "drizzle" | (FormatQueryOptions & {
503
502
  format: "drizzle";
504
503
  })): ReturnType<typeof defaultRuleGroupProcessorDrizzle>;
505
504
  /**
506
- * Generates a TanStack DB WhereCallback from an RQB query object. The callback can
507
- * be passed directly to TanStack DB's `.where()` method.
508
- *
509
- * @group Export
510
- */
505
+ * Generates a TanStack DB WhereCallback from an RQB query object. The callback can
506
+ * be passed directly to TanStack DB's `.where()` method.
507
+ *
508
+ * @group Export
509
+ */
511
510
  declare function formatQuery(ruleGroup: RuleGroupTypeAny, options: "tanstack_db" | (FormatQueryOptions & {
512
511
  format: "tanstack_db";
513
512
  })): ReturnType<typeof defaultRuleGroupProcessorTanStackDB>;
514
513
  /**
515
- * be assigned to the `where` property in the Sequelize query functions.
516
- *
517
- * @group Export
518
- */
514
+ * be assigned to the `where` property in the Sequelize query functions.
515
+ *
516
+ * @group Export
517
+ */
519
518
  declare function formatQuery(ruleGroup: RuleGroupTypeAny, options: "sequelize" | (FormatQueryOptions & {
520
519
  format: "sequelize";
521
520
  })): ReturnType<typeof defaultRuleGroupProcessorSequelize>;
522
521
  /**
523
- * Generates a JSONata query string from an RQB query object.
524
- *
525
- * NOTE: Either `parseNumbers: "strict-limited"` or `parseNumbers: true`
526
- * are recommended for this format.
527
- *
528
- * @group Export
529
- */
522
+ * Generates a JSONata query string from an RQB query object.
523
+ *
524
+ * NOTE: Either `parseNumbers: "strict-limited"` or `parseNumbers: true`
525
+ * are recommended for this format.
526
+ *
527
+ * @group Export
528
+ */
530
529
  declare function formatQuery(ruleGroup: RuleGroupTypeAny, options: "jsonata" | (FormatQueryOptions & {
531
530
  format: "jsonata";
532
531
  })): string;
533
532
  /**
534
- * Generates an LDAP query string from an RQB query object.
535
- *
536
- * @group Export
537
- */
533
+ * Generates an LDAP query string from an RQB query object.
534
+ *
535
+ * @group Export
536
+ */
538
537
  declare function formatQuery(ruleGroup: RuleGroupTypeAny, options: "ldap" | (FormatQueryOptions & {
539
538
  format: "ldap";
540
539
  })): string;
541
540
  /**
542
- * Generates a {@link DiagnosticsResult} from a query object, containing an annotated
543
- * query tree, a flat diagnostics array, aggregate stats, and a per-field summary.
544
- *
545
- * @group Export
546
- */
541
+ * Generates a {@link DiagnosticsResult} from a query object, containing an annotated
542
+ * query tree, a flat diagnostics array, aggregate stats, and a per-field summary.
543
+ *
544
+ * @group Export
545
+ */
547
546
  declare function formatQuery(ruleGroup: RuleGroupTypeAny, options: "diagnostics" | (FormatQueryOptions & {
548
547
  format: "diagnostics";
549
548
  })): DiagnosticsResult;
550
549
  /**
551
- * Generates a formatted (indented two spaces) JSON string from a query object.
552
- *
553
- * @group Export
554
- */
550
+ * Generates a formatted (indented two spaces) JSON string from a query object.
551
+ *
552
+ * @group Export
553
+ */
555
554
  declare function formatQuery(ruleGroup: RuleGroupTypeAny, options: FormatQueryOptions): string;
556
555
  /**
557
- * Generates a query string in the requested format.
558
- *
559
- * @group Export
560
- */
556
+ * Generates a query string in the requested format.
557
+ *
558
+ * @group Export
559
+ */
561
560
  declare function formatQuery(ruleGroup: RuleGroupTypeAny, options: Exclude<ExportFormat, ExportObjectFormats>): string;
562
561
  /**
563
- * Generates a query string in the requested format.
564
- *
565
- * @group Export
566
- */
562
+ * Generates a query string in the requested format.
563
+ *
564
+ * @group Export
565
+ */
567
566
  declare function formatQuery(ruleGroup: RuleGroupTypeAny, options: FormatQueryOptions & {
568
567
  format: Exclude<ExportFormat, ExportObjectFormats>;
569
568
  }): string;
570
569
  //#endregion
571
570
  //#region src/utils/formatQuery/utils.d.ts
572
571
  /**
573
- * Maps a {@link DefaultOperatorName} to a SQL operator.
574
- *
575
- * @group Export
576
- */
572
+ * Maps a {@link DefaultOperatorName} to a SQL operator.
573
+ *
574
+ * @group Export
575
+ */
577
576
  declare const mapSQLOperator: (rqbOperator: string) => string;
578
577
  /**
579
- * Maps a (lowercase) {@link DefaultOperatorName} to a MongoDB operator.
580
- *
581
- * @group Export
582
- */
578
+ * Returns a preset-aware SQL string-concatenation function. Emits `CONCAT(a, b, ...)` when
579
+ * `concatOperator` is `"CONCAT"` (case-insensitive), otherwise joins with the infix operator
580
+ * (e.g. `a || b`, `a + b`).
581
+ *
582
+ * @group Export
583
+ */
584
+ declare const getSQLConcat: (concatOperator?: string) => (...values: string[]) => string;
585
+ /**
586
+ * Returns the `[prefix, suffix]` `LIKE` wildcards for a string-match operator (e.g. `contains`
587
+ * → `['%', '%']`, `beginsWith` → `['', '%']`, `endsWith` → `['%', '']`). Unknown operators
588
+ * yield `['', '']`.
589
+ *
590
+ * @group Export
591
+ */
592
+ declare const getLikeWildcards: (operatorLC: string) => [string, string];
593
+ /**
594
+ * Wraps an already-serialized SQL fragment (a quoted field name or an expression) with the
595
+ * `LIKE` wildcards for the given (lowercase) string-match operator, concatenating the literal
596
+ * `%` markers via the preset-aware {@link getSQLConcat}. Returns the fragment untouched for
597
+ * operators without wildcards.
598
+ *
599
+ * @group Export
600
+ */
601
+ declare const wrapLikeFragment: (fragment: string, operatorLC: string, { concatOperator, quoteValuesWith, wrapValueWith }?: {
602
+ concatOperator?: string;
603
+ quoteValuesWith?: string;
604
+ wrapValueWith?: [string, string];
605
+ }) => string;
606
+ /**
607
+ * Maps a (lowercase) {@link DefaultOperatorName} to a MongoDB operator.
608
+ *
609
+ * @group Export
610
+ */
583
611
  declare const mongoOperators: {
584
612
  "=": string;
585
613
  "!=": string;
@@ -592,10 +620,10 @@ declare const mongoOperators: {
592
620
  notIn: string;
593
621
  };
594
622
  /**
595
- * Maps a (lowercase) {@link DefaultOperatorName} to a Prisma ORM operator.
596
- *
597
- * @group Export
598
- */
623
+ * Maps a (lowercase) {@link DefaultOperatorName} to a Prisma ORM operator.
624
+ *
625
+ * @group Export
626
+ */
599
627
  declare const prismaOperators: {
600
628
  "=": string;
601
629
  "!=": string;
@@ -607,103 +635,115 @@ declare const prismaOperators: {
607
635
  notin: string;
608
636
  };
609
637
  /**
610
- * Maps a {@link DefaultCombinatorName} to a CEL combinator.
611
- *
612
- * @group Export
613
- */
638
+ * Maps a {@link DefaultCombinatorName} to a CEL combinator.
639
+ *
640
+ * @group Export
641
+ */
614
642
  declare const celCombinatorMap: {
615
643
  and: "&&";
616
644
  or: "||";
617
645
  };
618
646
  /**
619
- * Register these operators with `jsonLogic` before applying the result
620
- * of `formatQuery(query, 'jsonlogic')`.
621
- *
622
- * @example
623
- * ```
624
- * for (const [op, func] of Object.entries(jsonLogicAdditionalOperators)) {
625
- * jsonLogic.add_operation(op, func);
626
- * }
627
- * jsonLogic.apply({ "startsWith": [{ "var": "firstName" }, "Stev"] }, data);
628
- * ```
629
- *
630
- * @group Export
631
- */
647
+ * Register these operators with `jsonLogic` before applying the result
648
+ * of `formatQuery(query, 'jsonlogic')`.
649
+ *
650
+ * @example
651
+ * ```
652
+ * for (const [op, func] of Object.entries(jsonLogicAdditionalOperators)) {
653
+ * jsonLogic.add_operation(op, func);
654
+ * }
655
+ * jsonLogic.apply({ "startsWith": [{ "var": "firstName" }, "Stev"] }, data);
656
+ * ```
657
+ *
658
+ * @group Export
659
+ */
632
660
  declare const jsonLogicAdditionalOperators: Record<"startsWith" | "endsWith", (a: string, b: string) => boolean>;
633
661
  /**
634
- * Returns a new query object with all `string`-type `value` properties converted
635
- * to `number` where appropriate.
636
- *
637
- * Used by {@link formatQuery} for the `json*` formats when `parseNumbers` is `true`.
638
- *
639
- * @group Export
640
- */
662
+ * Returns a new query object with all `string`-type `value` properties converted
663
+ * to `number` where appropriate.
664
+ *
665
+ * Used by {@link formatQuery} for the `json*` formats when `parseNumbers` is `true`.
666
+ *
667
+ * @group Export
668
+ */
641
669
  declare const numerifyValues: (rg: RuleGroupTypeAny, options: SetRequired<FormatQueryOptions, "fields">) => RuleGroupTypeAny;
642
670
  /**
643
- * Determines whether a value is _anything_ except an empty `string` or `NaN`.
644
- *
645
- * @group Export
646
- */
671
+ * Determines whether a value is _anything_ except an empty `string` or `NaN`.
672
+ *
673
+ * @group Export
674
+ */
647
675
  declare const isValidValue: (value: unknown) => boolean;
648
676
  /**
649
- * Determines whether {@link formatQuery} should render the given value as a number.
650
- * As long as `parseNumbers` is `true`, `number` and `bigint` values will return `true` and
651
- * `string` values will return `true` if they test positive against {@link numericRegex}.
652
- *
653
- * @group Export
654
- */
677
+ * Determines whether {@link formatQuery} should render the given value as a number.
678
+ * As long as `parseNumbers` is `true`, `number` and `bigint` values will return `true` and
679
+ * `string` values will return `true` if they test positive against {@link numericRegex}.
680
+ *
681
+ * @group Export
682
+ */
655
683
  declare const shouldRenderAsNumber: (value: unknown, parseNumbers?: boolean) => boolean;
656
684
  /**
657
- * Used by {@link formatQuery} to determine whether the given value processor is a
658
- * "legacy" value processor by counting the number of arguments. Legacy value
659
- * processors take 3 arguments (not counting any arguments with default values), while
660
- * rule-based value processors take no more than 2 arguments.
661
- *
662
- * @group Export
663
- */
685
+ * Used by {@link formatQuery} to determine whether the given value processor is a
686
+ * "legacy" value processor by counting the number of arguments. Legacy value
687
+ * processors take 3 arguments (not counting any arguments with default values), while
688
+ * rule-based value processors take no more than 2 arguments.
689
+ *
690
+ * @group Export
691
+ */
664
692
  declare const isValueProcessorLegacy: (valueProcessor: ValueProcessorLegacy | ValueProcessorByRule) => valueProcessor is ValueProcessorLegacy;
665
693
  /**
666
- * Converts the `quoteFieldNamesWith` option into an array of two strings.
667
- * If the option is a string, the array elements are both that string.
668
- *
669
- * @default
670
- * ['', '']
671
- *
672
- * @group Export
673
- */
694
+ * Converts the `quoteFieldNamesWith` option into an array of two strings.
695
+ * If the option is a string, the array elements are both that string.
696
+ *
697
+ * @default
698
+ * ['', '']
699
+ *
700
+ * @group Export
701
+ */
674
702
  declare const getQuoteFieldNamesWithArray: (quoteFieldNamesWith?: null | string | [string, string]) => [string, string];
675
703
  /**
676
- * Given a field name and relevant {@link ValueProcessorOptions}, returns the field name
677
- * wrapped in the configured quote character(s).
678
- *
679
- * @group Export
680
- */
681
- declare const getQuotedFieldName: (fieldName: string, {
682
- quoteFieldNamesWith,
683
- fieldIdentifierSeparator
684
- }: ValueProcessorOptions) => string;
685
- /**
686
- * Given a [Constituent word order](https://en.wikipedia.org/wiki/Word_order#Constituent_word_orders)
687
- * like "svo" or "sov", returns a permutation of `["S", "V", "O"]` based on the first occurrence of
688
- * each letter in the input string (case insensitive). This widens the valid input from abbreviations
689
- * like "svo" to more expressive strings like "subject-verb-object" or "sub ver obj". Any missing
690
- * letters are appended in the default order "SVO" (e.g., "object" would yield `["O", "S", "V"]`).
691
- *
692
- * @group Export
693
- */
704
+ * Given a field name and relevant {@link ValueProcessorOptions}, returns the field name
705
+ * wrapped in the configured quote character(s).
706
+ *
707
+ * @group Export
708
+ */
709
+ declare const getQuotedFieldName: (fieldName: string, { quoteFieldNamesWith, fieldIdentifierSeparator }: ValueProcessorOptions) => string;
710
+ /**
711
+ * Given a [Constituent word order](https://en.wikipedia.org/wiki/Word_order#Constituent_word_orders)
712
+ * like "svo" or "sov", returns a permutation of `["S", "V", "O"]` based on the first occurrence of
713
+ * each letter in the input string (case insensitive). This widens the valid input from abbreviations
714
+ * like "svo" to more expressive strings like "subject-verb-object" or "sub ver obj". Any missing
715
+ * letters are appended in the default order "SVO" (e.g., "object" would yield `["O", "S", "V"]`).
716
+ *
717
+ * @group Export
718
+ */
694
719
  declare const normalizeConstituentWordOrder: (input: string) => ConstituentWordOrder;
695
720
  /**
696
- * Default translations used by {@link formatQuery} for "natural_language" format.
697
- *
698
- * @group Export
699
- */
721
+ * Prefixes a named-parameter value with the given `paramPrefix` unless the value already
722
+ * begins with it. Used by {@link formatQuery} to render rules whose `valueSource` is
723
+ * `"parameter"` (e.g. `"p1"` with prefix `":"` → `":p1"`; `":p1"` → `":p1"`).
724
+ *
725
+ * @group Export
726
+ */
727
+ declare const withParamPrefix: (value: unknown, paramPrefix?: string) => string;
728
+ /**
729
+ * Strips a leading `paramPrefix` from a named-parameter value if present. Inverse of
730
+ * {@link withParamPrefix}; used to normalize parameter names for validation/lookup.
731
+ *
732
+ * @group Export
733
+ */
734
+ declare const stripParamPrefix: (value: unknown, paramPrefix?: string) => string;
735
+ /**
736
+ * Default translations used by {@link formatQuery} for "natural_language" format.
737
+ *
738
+ * @group Export
739
+ */
700
740
  declare const defaultNLTranslations: NLTranslations;
701
741
  /**
702
- * Used by {@link formatQuery} to get a translation based on certain conditions
703
- * for the "natural_language" format.
704
- *
705
- * @group Export
706
- */
742
+ * Used by {@link formatQuery} to get a translation based on certain conditions
743
+ * for the "natural_language" format.
744
+ *
745
+ * @group Export
746
+ */
707
747
  declare const getNLTranslataion: (key: NLTranslationKey, translations: NLTranslations, conditions?: GroupVariantCondition[]) => string;
708
748
  type ProcessedMatchMode = {
709
749
  mode: "all";
@@ -725,83 +765,83 @@ type ProcessedMatchMode = {
725
765
  threshold: number;
726
766
  };
727
767
  /**
728
- * Transforms
729
- * - `match: { mode: "atLeast", threshold: 1 }` to `match: { mode: "some" }`
730
- * - `match: { mode: "atMost", threshold: 0 }` to `match: { mode: "none" }`.
731
- *
732
- * Returns:
733
- * - Processed `{ mode, threshold }` object for valid subqueries
734
- * - `null` if match mode is not applicable for the rule
735
- * - `false` if match mode is valid, but either
736
- * 1. `threshold` is required and invalid, or
737
- * 2. `value` is not a valid rule group.
738
- */
768
+ * Transforms
769
+ * - `match: { mode: "atLeast", threshold: 1 }` to `match: { mode: "some" }`
770
+ * - `match: { mode: "atMost", threshold: 0 }` to `match: { mode: "none" }`.
771
+ *
772
+ * Returns:
773
+ * - Processed `{ mode, threshold }` object for valid subqueries
774
+ * - `null` if match mode is not applicable for the rule
775
+ * - `false` if match mode is valid, but either
776
+ * 1. `threshold` is required and invalid, or
777
+ * 2. `value` is not a valid rule group.
778
+ */
739
779
  declare const processMatchMode: (rule: RuleType) => null | false | ProcessedMatchMode;
740
780
  /**
741
- * "Replacer" method for JSON.stringify's second argument. Converts `bigint` values to
742
- * objects with a `$bigint` property having a value of a string representation of
743
- * the actual `bigint`-type value.
744
- *
745
- * Inverse of {@link bigIntJsonParseReviver}.
746
- *
747
- * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt#use_within_json
748
- */
781
+ * "Replacer" method for JSON.stringify's second argument. Converts `bigint` values to
782
+ * objects with a `$bigint` property having a value of a string representation of
783
+ * the actual `bigint`-type value.
784
+ *
785
+ * Inverse of {@link bigIntJsonParseReviver}.
786
+ *
787
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt#use_within_json
788
+ */
749
789
  declare const bigIntJsonStringifyReplacer: (_key: string, value: unknown) => unknown;
750
790
  /**
751
- * "Reviver" method for JSON.parse's second argument. Converts objects having a single
752
- * `$bigint: string` property to an actual `bigint` value.
753
- *
754
- * Inverse of {@link bigIntJsonStringifyReplacer}.
755
- *
756
- * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt#use_within_json
757
- */
791
+ * "Reviver" method for JSON.parse's second argument. Converts objects having a single
792
+ * `$bigint: string` property to an actual `bigint` value.
793
+ *
794
+ * Inverse of {@link bigIntJsonStringifyReplacer}.
795
+ *
796
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt#use_within_json
797
+ */
758
798
  declare const bigIntJsonParseReviver: (_key: string, value: unknown) => unknown;
759
799
  //#endregion
760
800
  //#region src/utils/formatQuery/index.d.ts
761
801
  /**
762
- * Default value processor used by {@link formatQuery} for "sql" format.
763
- *
764
- * @deprecated Prefer {@link defaultValueProcessorByRule}.
765
- *
766
- * @group Export
767
- */
802
+ * Default value processor used by {@link formatQuery} for "sql" format.
803
+ *
804
+ * @deprecated Prefer {@link defaultValueProcessorByRule}.
805
+ *
806
+ * @group Export
807
+ */
768
808
  declare const defaultValueProcessor: ValueProcessorLegacy;
769
809
  /**
770
- * @deprecated Prefer {@link defaultRuleProcessorMongoDB}.
771
- *
772
- * @group Export
773
- */
810
+ * @deprecated Prefer {@link defaultRuleProcessorMongoDB}.
811
+ *
812
+ * @group Export
813
+ */
774
814
  declare const defaultMongoDBValueProcessor: ValueProcessorLegacy;
775
815
  /**
776
- * @deprecated Prefer {@link defaultRuleProcessorCEL}.
777
- *
778
- * @group Export
779
- */
816
+ * @deprecated Prefer {@link defaultRuleProcessorCEL}.
817
+ *
818
+ * @group Export
819
+ */
780
820
  declare const defaultCELValueProcessor: ValueProcessorLegacy;
781
821
  /**
782
- * @deprecated Prefer {@link defaultRuleProcessorSpEL}.
783
- *
784
- * @group Export
785
- */
822
+ * @deprecated Prefer {@link defaultRuleProcessorSpEL}.
823
+ *
824
+ * @group Export
825
+ */
786
826
  declare const defaultSpELValueProcessor: ValueProcessorLegacy;
787
827
  /**
788
- * @deprecated Renamed to {@link defaultRuleProcessorCEL}.
789
- *
790
- * @group Export
791
- */
828
+ * @deprecated Renamed to {@link defaultRuleProcessorCEL}.
829
+ *
830
+ * @group Export
831
+ */
792
832
  declare const defaultValueProcessorCELByRule: RuleProcessor;
793
833
  /**
794
- * @deprecated Renamed to {@link defaultRuleProcessorMongoDB}.
795
- *
796
- * @group Export
797
- */
834
+ * @deprecated Renamed to {@link defaultRuleProcessorMongoDB}.
835
+ *
836
+ * @group Export
837
+ */
798
838
  declare const defaultValueProcessorMongoDBByRule: RuleProcessor;
799
839
  /**
800
- * @deprecated Renamed to {@link defaultRuleProcessorSpEL}.
801
- *
802
- * @group Export
803
- */
840
+ * @deprecated Renamed to {@link defaultRuleProcessorSpEL}.
841
+ *
842
+ * @group Export
843
+ */
804
844
  declare const defaultValueProcessorSpELByRule: RuleProcessor;
805
845
  //#endregion
806
- export { bigIntJsonParseReviver, bigIntJsonStringifyReplacer, celCombinatorMap, cypherCombinatorMap, defaultCELValueProcessor, defaultExportOperatorMap, defaultMongoDBValueProcessor, defaultNLTranslations, defaultOperatorProcessorNL, defaultOperatorProcessorSQL, defaultRuleGroupProcessorCEL, defaultRuleGroupProcessorCypher, defaultRuleGroupProcessorDiagnostics, defaultRuleGroupProcessorDrizzle, defaultRuleGroupProcessorElasticSearch, defaultRuleGroupProcessorGremlin, defaultRuleGroupProcessorJSONata, defaultRuleGroupProcessorJsonLogic, defaultRuleGroupProcessorLDAP, defaultRuleGroupProcessorMongoDB, defaultRuleGroupProcessorMongoDBQuery, defaultRuleGroupProcessorNL, defaultRuleGroupProcessorParameterized, defaultRuleGroupProcessorPrisma, defaultRuleGroupProcessorSPARQL, defaultRuleGroupProcessorSQL, defaultRuleGroupProcessorSequelize, defaultRuleGroupProcessorSpEL, defaultRuleGroupProcessorTanStackDB, defaultRuleProcessorCEL, defaultRuleProcessorCypher, defaultRuleProcessorDrizzle, defaultRuleProcessorElasticSearch, defaultRuleProcessorGremlin, defaultRuleProcessorJSONata, defaultRuleProcessorJsonLogic, defaultRuleProcessorLDAP, defaultRuleProcessorMongoDB, defaultRuleProcessorMongoDBQuery, defaultRuleProcessorNL, defaultRuleProcessorParameterized, defaultRuleProcessorPrisma, defaultRuleProcessorSPARQL, defaultRuleProcessorSQL, defaultRuleProcessorSequelize, defaultRuleProcessorSpEL, defaultRuleProcessorTanStackDB, defaultSpELValueProcessor, defaultValueProcessor, defaultValueProcessorByRule, defaultValueProcessorCELByRule, defaultValueProcessorMongoDBByRule, defaultValueProcessorNL, defaultValueProcessorSpELByRule, formatQuery, formatQueryOptionPresets, getNLTranslataion, getQuoteFieldNamesWithArray, getQuotedFieldName, isValidValue, isValueProcessorLegacy, jsonLogicAdditionalOperators, mapSQLOperator, mongoDbFallback, mongoOperators, normalizeConstituentWordOrder, numerifyValues, prismaFallback, prismaOperators, processMatchMode, shouldRenderAsNumber, sparqlVar, sqlDialectPresets };
846
+ export { bigIntJsonParseReviver, bigIntJsonStringifyReplacer, celCombinatorMap, cypherCombinatorMap, defaultCELValueProcessor, defaultExportOperatorMap, defaultMongoDBValueProcessor, defaultNLTranslations, defaultOperatorProcessorNL, defaultOperatorProcessorSQL, defaultRuleGroupProcessorCEL, defaultRuleGroupProcessorCypher, defaultRuleGroupProcessorDiagnostics, defaultRuleGroupProcessorDrizzle, defaultRuleGroupProcessorElasticSearch, defaultRuleGroupProcessorGremlin, defaultRuleGroupProcessorJSONata, defaultRuleGroupProcessorJsonLogic, defaultRuleGroupProcessorLDAP, defaultRuleGroupProcessorMongoDB, defaultRuleGroupProcessorMongoDBQuery, defaultRuleGroupProcessorNL, defaultRuleGroupProcessorParameterized, defaultRuleGroupProcessorPrisma, defaultRuleGroupProcessorSPARQL, defaultRuleGroupProcessorSQL, defaultRuleGroupProcessorSequelize, defaultRuleGroupProcessorSpEL, defaultRuleGroupProcessorTanStackDB, defaultRuleProcessorCEL, defaultRuleProcessorCypher, defaultRuleProcessorDrizzle, defaultRuleProcessorElasticSearch, defaultRuleProcessorGremlin, defaultRuleProcessorJSONata, defaultRuleProcessorJsonLogic, defaultRuleProcessorLDAP, defaultRuleProcessorMongoDB, defaultRuleProcessorMongoDBQuery, defaultRuleProcessorNL, defaultRuleProcessorParameterized, defaultRuleProcessorPrisma, defaultRuleProcessorSPARQL, defaultRuleProcessorSQL, defaultRuleProcessorSequelize, defaultRuleProcessorSpEL, defaultRuleProcessorTanStackDB, defaultSpELValueProcessor, defaultValueProcessor, defaultValueProcessorByRule, defaultValueProcessorCELByRule, defaultValueProcessorMongoDBByRule, defaultValueProcessorNL, defaultValueProcessorSpELByRule, formatQuery, formatQueryOptionPresets, getLikeWildcards, getNLTranslataion, getQuoteFieldNamesWithArray, getQuotedFieldName, getSQLConcat, isValidValue, isValueProcessorLegacy, jsonLogicAdditionalOperators, mapSQLOperator, mongoDbFallback, mongoOperators, normalizeConstituentWordOrder, numerifyValues, prismaFallback, prismaOperators, processMatchMode, shouldRenderAsNumber, sparqlVar, sqlDialectPresets, stripParamPrefix, withParamPrefix, wrapLikeFragment };
807
847
  //# sourceMappingURL=formatQuery.d.ts.map