K
Kysely2y ago
kika

How to inject parentheses in the generated arithmetic expression?

https://kyse.link/?p=s&i=SD8v0Fo6NqqCrPEXMbx1 That's obviously not what I meant
2 Replies
koskimas
koskimas2y ago
Currently there's no function that adds parentheses. You can use raw sql for now. We should add a parens method. https://kyse.link/?p=s&i=TvrJYDSCkSshYrCGDWjw Or you can easily implement your own parens function: https://kyse.link/?p=s&i=aJVg2bjcpG7H3DIxnlt4 It's often way more readable to use raw sql strings for arithmetic expressions though. When you use ref, you don't even lose that much type safety.
kika
kikaOP2y ago
thanks!
Want results from more Discord servers?
Add your server