where clause with length

Kkewp5/16/2023
How do I have a where clause with a length, e.g.

select * from data where length(prodcode) = 3
Kkewp5/16/2023
I've managed to do it like this:

where(sqllength(product_cd), "=", 4)
Wwirekang5/16/2023
Type-safe and extensible way: https://kyse.link/?p=s&i=ucs9UpJeiJAhAc69C9gv
Kkoskimas5/16/2023
No need to use ref in the function arguments. They are references by default
Kkewp5/17/2023
Thank you, will try them