According to the official website,
D1 is Cloudflare’s first queryable relational database.
Drizzle ORM fully supports the Cloudflare D1 database and Cloudflare Workers environment.
We embrace SQL dialects and dialect specific drivers and syntax and mirror most popular
SQLite-like all, get, values and run query methods syntax.
To setup project for your Cloudflare D1 please refer to official docs.
Initialize local database and run server locally:
Install Drizzle ORM:
Make your first D1 query:
Unless you plan on writing every SQL query by hand, a table declaration is helpful: