drizzle 349 Q&As

Drizzle FAQ & Answers

349 expert Drizzle answers researched from official documentation. Every answer cites authoritative sources you can verify.

Getting Started > Query Operations

60 questions
A

Use notExists(subquery) in a where clause. Example: const query = db.select().from(table2); db.select().from(table).where(notExists(query)). This generates: SELECT * FROM table WHERE NOT EXISTS (SELECT * from table2). Import notExists from 'drizzle-orm'.

95% confidence
A

Use intersect(query1, query2) or chain with .intersect(). Example: await db.select({ courseName: depA.courseName }).from(depA).intersect(db.select({ courseName: depB.courseName }).from(depB)). Import from the dialect module like 'drizzle-orm/sqlite-core'.

95% confidence
A

Use except(query1, query2) or chain with .except(). Example: await db.select({ courseName: depA.projectsName }).from(depA).except(db.select({ courseName: depB.projectsName }).from(depB)). Import from the dialect module.

95% confidence

Getting Started > Schema Definition

44 questions

Getting Started > Database Connection

37 questions

Schema Declaration > Column Types

36 questions

Getting Started > Installation & Setup

34 questions

Schema Declaration > Table Definition

30 questions

Schema Declaration > Column Modifiers & Generation

30 questions

Getting Started > Migration Management

28 questions

Why Drizzle

25 questions
A

Drizzle Kit is a CLI companion tool for Drizzle ORM that handles hassle-free migrations. It can generate SQL migration files or apply schema changes directly to the database.

95% confidence
A

Drizzle Studio is an open-source SQL editor and database browser that connects to your database and lets you browse, add, delete, and update data based on your Drizzle SQL schema. It supports PostgreSQL, MySQL, and SQLite databases.

95% confidence

Getting Started > Configuration

25 questions
A

No, there is a known limitation where you cannot use both url and ssl keys together in the same configuration. If you need SSL with a URL connection, you may need to use individual connection parameters instead or include SSL parameters in the URL string itself.

Sources
95% confidence
A

Yes, schemaFilter now supports glob patterns like ['tenant_*'], though earlier documentation indicated it only supported string or array of strings without glob. It accepts patterns like ['public', 'auth'] or glob patterns to filter schemas.

95% confidence
A

The tablesFilter supports glob patterns like [''] for all tables, ['user'] for tables starting with 'user', or ['project1_*'] for prefix matching. To exclude tables, use the '!' prefix like ['!myprefix_*'] or ['!geography_columns'].

95% confidence
A

The driver parameter accepts: 'aws-data-api', 'd1-http', 'expo', 'turso', and 'pglite'. This parameter is required for HTTP-based databases and exceptions like aws-data-api, pglite, and d1-http that don't share standard connection parameters.

95% confidence