Using MySQL functions in SELECT statement
Hi!
Just trying to migrate over from Knex. Skimmed over the documentation but still unsure of how to replicate this query in Kysely, or might be looking in the wrong place? In Knex, I'd often have to use
selectRaw
for these
SELECT a, b, UPPER(c) FROM x;
3 Replies
Figured it has to do with
db.fn
, but not quite sure how to fit it in to make things happy
Hey 👋
Very close!
You have to alias it:
awesome, thanks!