drizzle
Drizzle ORM is a TypeScript ORM offering both relational and SQL-like query APIs, and which is serverless-ready by design.
Usage
npx sv add drizzleWhat you get
- a setup that keeps your database access in SvelteKit’s server files
- an
.envfile to store your credentials - compatibility with the Lucia auth add-on
- an optional Docker configuration to help with running a local database
Options
database
Which database variant to use:
postgresql— the most popular open source databasemysql— another popular open source databasesqlite— file-based database not requiring a database server
npx sv add drizzle=database:postgresqlclient
The SQL client to use, depends on database:
- For
postgresql:postgres.js,neon, - For
mysql:mysql2,planetscale - For
sqlite:better-sqlite3,libsql,turso
npx sv add drizzle=database:postgresql+client:postgres.jsDrizzle is compatible with well over a dozen database drivers. We just offer a few of the most common ones here for simplicity, but if you’d like to use another one you can choose one as a placeholder and swap it out for another after setup by choosing from Drizzle’s full list of compatible drivers.
docker
Whether to add Docker Compose configuration. Only available for database postgresql or mysql
npx sv add drizzle=database:postgresql+client:postgres.js+docker:yesEdit this page on GitHub llms.txt
previous next