Bun SQLite
According to their official website (opens in a new tab), Bun is a fast all-in-one JavaScript runtime
Drizzle ORM natively supports bun:sqlite (opens in a new tab) module and it's crazy fast 🚀
We embraces SQL dialects and dialect specific drivers and syntax and unlike any other ORM,
for synchronous drivers like bun:sqlite we have both async and sync APIs and we mirror most popular
SQLite-like all, get, values and run query methods syntax.
bun add drizzle-orm
bun add -d drizzle-kit import { drizzle, BunSQLiteDatabase } from 'drizzle-orm/bun-sqlite';
import { Database } from 'bun:sqlite';
const sqlite = new Database('sqlite.db');
const db: BunSQLiteDatabase = drizzle(sqlite);
const result = await db.select().from(users);If you want to use sync APIs:
import { drizzle, BunSQLiteDatabase } from 'drizzle-orm/bun-sqlite';
import { Database } from 'bun:sqlite';
const sqlite = new Database('sqlite.db');
const db: BunSQLiteDatabase = drizzle(sqlite);
const result = db.select().from(users).all();
const result = db.select().from(users).get();
const result = db.select().from(users).values();
const result = db.select().from(users).run();More on sync and async APIs for sqlite - read here.