How do relational queries work under the hood?

Just trying to further my understanding of how drizzle works - how would the following relational query be written using the sql-like drizzle syntax?
const post = await db.query.posts.findFirst({
with: {
comments: true,
},
});
const post = await db.query.posts.findFirst({
with: {
comments: true,
},
});
2 Replies
Angelelz
Angelelz14mo ago
You can pass {logger: true} to the drizzle object when instantiating That will log the query to the console for inspection
zendev
zendevOP14mo ago
Cool thanks
Want results from more Discord servers?
Add your server