Skip to content
Discussion options

You must be logged in to vote

The relational query API (Prisma-like syntax) was replaced by a new "Relations V2" API that ships with Drizzle v1. The [OLD] tag means that specific API is being phased out in favor of the new version.

That said, for a team of junior developers I'd actually recommend starting with the SQL-like query builder instead — it's the core Drizzle API and isn't going anywhere:

const users = await db
  .select()
  .from(usersTable)
  .where(eq(usersTable.role, 'admin'))
  .orderBy(usersTable.createdAt);

I use this in production (20+ tables, PostgreSQL) and it has a big advantage for juniors: it maps directly to SQL. They learn real query patterns instead of an abstraction layer, which pays off when…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by RDIL
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