Types for use with leftJoin
Hiya! I'm attempting to do a leftJoin and return the result:
I'd like to have the result be a type, like
Selectable<Account & Application>
but I'm not sure if this is supported or what the proper way to do this is. Any help would be appreciated, thank you!2 Replies
Hey 👋
You forgot to call
.select
/.selectAll
.
You could keep the query in some global const, without .where
, and use InferResult<typeof query>
to get the type. Then, since Kysely is immutable, call .where
in a function and execute.Thanks! I ended up figuring out the answer to my question, sorry, forgot to follow up here 🙂
I really appreciate the help!