© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Drizzle TeamDT
Drizzle Team•3y ago•
3 replies
zendev

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,
  },
});
Drizzle TeamJoin
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
11,879Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Conditional Relational Queries
Drizzle TeamDTDrizzle Team / help
3y ago
Relational queries (PlanetScale)
Drizzle TeamDTDrizzle Team / help
3y ago
node-postgres uses crypto under the hood ?
Drizzle TeamDTDrizzle Team / help
3y ago
How do you get defined types for relational queries
Drizzle TeamDTDrizzle Team / help
3y ago