Return `null` by default if no record found
Hey, I am looking to have my queries return
null
instead of undefined
if no records match my query when using executeTakeFirst
. Is there a way to set this in the Kysely client?4 Replies
Solution
There's no way to do modify Kysely to return null in those cases.
Unknown User•11mo ago
Message Not Public
Sign In & Join Server To View
Yeah thats how we handle it but didnt want to sprinkle this all over the code in our queries or have to create a helper if it was avoidable.