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
Angelelz13mo ago
You can pass {logger: true} to the drizzle object when instantiating That will log the query to the console for inspection
zendev
zendev13mo ago
Cool thanks
Want results from more Discord servers?
Add your server