K
Kysely2y ago
kewp

where clause with length

How do I have a where clause with a length, e.g. select * from data where length(prodcode) = 3
4 Replies
kewp
kewpOP2y ago
I've managed to do it like this: where(sqllength(product_cd), "=", 4)
wirekang
wirekang2y ago
Type-safe and extensible way: https://kyse.link/?p=s&i=ucs9UpJeiJAhAc69C9gv
koskimas
koskimas2y ago
Or simply https://kyse.link/?p=s&i=xtAnYYuk0pDFwymOAi2i No need to use ref in the function arguments. They are references by default
kewp
kewpOP2y ago
Thank you, will try them
Want results from more Discord servers?
Add your server