Skip to content
Discussion options

You must be logged in to vote

There are several things going on here:
1.- Those are not strictly the same. When you do db.select() drizzle is listing all the columns in the query to ensure the columns will come back in a known order. Also, you are only selecting the columns from the tasks table in your raw query.
2.- Drizzle is mapping the result to different objects per table in javascript, so you have easier nullability on the joined table. Drizzle is also making sure that if there are repeated column names, those column names will not colide.
3.- Depending on your dialect and driver, db.execute() will accept a generic parameter that describes the shape of a row in your raw query. That's the way you can have types t…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by DanClubb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants