Effect CommunityEC
Effect Community6mo ago
13 replies
Maxz

Executing Multiple SQL Statements in Bun SQLite

how to run multiple SQL statements at once ?
like in bun sqlite:
import { Database } from "bun:sqlite";

const db = new Database("./local/db/testdb.db", { strict: true });
const query = db.run(`
  SELECT 'hello';
  SELECT 'world';
  INSERT INTO t1 (key,val) VALUES ("k4", 'v1');
  INSERT INTO t1 (key,val) VALUES ("k5", 'v1');
  `);
console.log(query);
Was this page helpful?