Marcin.B
DTDrizzle Team
•Created by Marcin.B on 1/8/2024 in #help
[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"]]]
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...
TIA38 replies
DTDrizzle Team
•Created by Marcin.B on 1/2/2024 in #help
Dynamic orderBy
I would like to dynamically add ordering to my select().from()... (I'm getting ordering criteria from frontend as a pair of column name and direction)
Is there something similar as getTableColumns to get typed colums so I could find desired column by its name to use in orderBy() method?
4 replies