Overview
Bun 1.3 includes built-in database support. No external services needed—spin up databases directly in your sessions.Full documentation coming soon. Bun supports Redis, PostgreSQL, MySQL, and SQLite natively.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Use Redis, PostgreSQL, MySQL, and SQLite
await client.execute({
sessionId: session.id,
code: `
import { Database } from "bun:sqlite";
const db = new Database(":memory:");
db.run("CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT)");
db.run("INSERT INTO users (name) VALUES (?)", "Alice");
const user = db.query("SELECT * FROM users").get();
console.log(user);
`
});