© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Drizzle TeamDT
Drizzle Team•3y ago•
37 replies
Marcin.B

[Beginner] complex "where" clause

Hi. I'm getting from frontend app following (quite complex) filtering criteria:
[[["documentDate",">=","2023-11-23T23:00:00.000Z"],"and",["documentDate","<","2023-11-24T23:00:00.000Z"]],"and",[["inOut","contains","FV"],"or",["customerId","contains","FV"],"or",["documentTypeId","contains","FV"],"or",["documentNo","contains","FV"]]]
[[["documentDate",">=","2023-11-23T23:00:00.000Z"],"and",["documentDate","<","2023-11-24T23:00:00.000Z"]],"and",[["inOut","contains","FV"],"or",["customerId","contains","FV"],"or",["documentTypeId","contains","FV"],"or",["documentNo","contains","FV"]]]

As it comes from a data grid, a user can specify any criterias basing on available columns
I need to convert these to proper params of where() method. Is it possible with drizzle at all? If so, can someone share some tips how to start? Or maybe the better option is to convert it to plain sql...
TIA
Drizzle TeamJoin
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
11,879Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Dynamic where clause
Drizzle TeamDTDrizzle Team / help
3y ago
Missing nested where clause
Drizzle TeamDTDrizzle Team / help
2y ago
Can't use `where` clause?
Drizzle TeamDTDrizzle Team / help
12mo ago
Parameterized Interval in Where Clause
Drizzle TeamDTDrizzle Team / help
2y ago