Open History to see the last commit
1---
2id: ParseWhereOptions
3title: ParseWhereOptions
4---
5
6# Interface: ParseWhereOptions\<T\>
7
8Defined in: [packages/db/src/query/expression-helpers.ts:53](https://github.com/TanStack/db/blob/main/packages/db/src/query/expression-helpers.ts#L53)
9
10Options for customizing how WHERE expressions are parsed
11
12## Type Parameters
13
14### T
15
16`T` = `any`
17
18## Properties
19
20### handlers
21
22```ts
23handlers: object & object;
24```
25
26Defined in: [packages/db/src/query/expression-helpers.ts:67](https://github.com/TanStack/db/blob/main/packages/db/src/query/expression-helpers.ts#L67)
27
28Handler functions for different operators.
29Each handler receives the parsed field path(s) and value(s) and returns your custom format.
30
31Supported operators from TanStack DB:
32- Comparison: eq, gt, gte, lt, lte, in, like, ilike
33- Logical: and, or, not
34- Null checking: isNull, isUndefined
35- String functions: upper, lower, length, concat
36- Numeric: add
37- Utility: coalesce
38- Aggregates: count, avg, sum, min, max
39
40#### Type Declaration
41
42##### add()?
43
44```ts
45optional add: (...args) => T;
46```
47
48###### Parameters
49
50###### args
51
52...`any`[]
53
54###### Returns
55
56`T`
57
58##### and()?
59
60```ts
61optional and: (...args) => T;
62```
63
64###### Parameters
65
66###### args
67
68...`any`[]
69
70###### Returns
71
72`T`
73
74##### avg()?
75
76```ts
77optional avg: (...args) => T;
78```
79
80###### Parameters
81
82###### args
83
84...`any`[]
85
86###### Returns
87
88`T`
89
90##### caseWhen()?
91
92```ts
93optional caseWhen: (...args) => T;
94```
95
96###### Parameters
97
98###### args
99
100...`any`[]
101
102###### Returns
103
104`T`
105
106##### coalesce()?
107
108```ts
109optional coalesce: (...args) => T;
110```
111
112###### Parameters
113
114###### args
115
116...`any`[]
117
118###### Returns
119
120`T`
121
122##### concat()?
123
124```ts
125optional concat: (...args) => T;
126```
127
128###### Parameters
129
130###### args
131
132...`any`[]
133
134###### Returns
135
136`T`
137
138##### count()?
139
140```ts
141optional count: (...args) => T;
142```
143
144###### Parameters
145
146###### args
147
148...`any`[]
149
150###### Returns
151
152`T`
153
154##### divide()?
155
156```ts
157optional divide: (...args) => T;
158```
159
160###### Parameters
161
162###### args
163
164...`any`[]
165
166###### Returns
167
168`T`
169
170##### eq()?
171
172```ts
173optional eq: (...args) => T;
174```
175
176###### Parameters
177
178###### args
179
180...`any`[]
181
182###### Returns
183
184`T`
185
186##### gt()?
187
188```ts
189optional gt: (...args) => T;
190```
191
192###### Parameters
193
194###### args
195
196...`any`[]
197
198###### Returns
199
200`T`
201
202##### gte()?
203
204```ts
205optional gte: (...args) => T;
206```
207
208###### Parameters
209
210###### args
211
212...`any`[]
213
214###### Returns
215
216`T`
217
218##### ilike()?
219
220```ts
221optional ilike: (...args) => T;
222```
223
224###### Parameters
225
226###### args
227
228...`any`[]
229
230###### Returns
231
232`T`
233
234##### in()?
235
236```ts
237optional in: (...args) => T;
238```
239
240###### Parameters
241
242###### args
243
244...`any`[]
245
246###### Returns
247
248`T`
249
250##### isNull()?
251
252```ts
253optional isNull: (...args) => T;
254```
255
256###### Parameters
257
258###### args
259
260...`any`[]
261
262###### Returns
263
264`T`
265
266##### isUndefined()?
267
268```ts
269optional isUndefined: (...args) => T;
270```
271
272###### Parameters
273
274###### args
275
276...`any`[]
277
278###### Returns
279
280`T`
281
282##### length()?
283
284```ts
285optional length: (...args) => T;
286```
287
288###### Parameters
289
290###### args
291
292...`any`[]
293
294###### Returns
295
296`T`
297
298##### like()?
299
300```ts
301optional like: (...args) => T;
302```
303
304###### Parameters
305
306###### args
307
308...`any`[]
309
310###### Returns
311
312`T`
313
314##### lower()?
315
316```ts
317optional lower: (...args) => T;
318```
319
320###### Parameters
321
322###### args
323
324...`any`[]
325
326###### Returns
327
328`T`
329
330##### lt()?
331
332```ts
333optional lt: (...args) => T;
334```
335
336###### Parameters
337
338###### args
339
340...`any`[]
341
342###### Returns
343
344`T`
345
346##### lte()?
347
348```ts
349optional lte: (...args) => T;
350```
351
352###### Parameters
353
354###### args
355
356...`any`[]
357
358###### Returns
359
360`T`
361
362##### max()?
363
364```ts
365optional max: (...args) => T;
366```
367
368###### Parameters
369
370###### args
371
372...`any`[]
373
374###### Returns
375
376`T`
377
378##### min()?
379
380```ts
381optional min: (...args) => T;
382```
383
384###### Parameters
385
386###### args
387
388...`any`[]
389
390###### Returns
391
392`T`
393
394##### multiply()?
395
396```ts
397optional multiply: (...args) => T;
398```
399
400###### Parameters
401
402###### args
403
404...`any`[]
405
406###### Returns
407
408`T`
409
410##### not()?
411
412```ts
413optional not: (...args) => T;
414```
415
416###### Parameters
417
418###### args
419
420...`any`[]
421
422###### Returns
423
424`T`
425
426##### or()?
427
428```ts
429optional or: (...args) => T;
430```
431
432###### Parameters
433
434###### args
435
436...`any`[]
437
438###### Returns
439
440`T`
441
442##### subtract()?
443
444```ts
445optional subtract: (...args) => T;
446```
447
448###### Parameters
449
450###### args
451
452...`any`[]
453
454###### Returns
455
456`T`
457
458##### sum()?
459
460```ts
461optional sum: (...args) => T;
462```
463
464###### Parameters
465
466###### args
467
468...`any`[]
469
470###### Returns
471
472`T`
473
474##### upper()?
475
476```ts
477optional upper: (...args) => T;
478```
479
480###### Parameters
481
482###### args
483
484...`any`[]
485
486###### Returns
487
488`T`
489
490***
491
492### onUnknownOperator()?
493
494```ts
495optional onUnknownOperator: (operator, args) => T;
496```
497
498Defined in: [packages/db/src/query/expression-helpers.ts:76](https://github.com/TanStack/db/blob/main/packages/db/src/query/expression-helpers.ts#L76)
499
500Optional handler for when an unknown operator is encountered.
501If not provided, unknown operators throw an error.
502
503#### Parameters
504
505##### operator
506
507`string`
508
509##### args
510
511`any`[]
512
513#### Returns
514
515`T`