All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 56s
11 lines
361 B
TypeScript
11 lines
361 B
TypeScript
import { Database, constants } from 'bun:sqlite'
|
|
|
|
const db = new Database('db.sqlite', {create: true, strict: true})
|
|
db.run('PRAGMA journal_mode = WAL;')
|
|
|
|
db.fileControl(constants.SQLITE_FCNTL_PERSIST_WAL, 0)
|
|
// Checkpoint and truncate the WAL file
|
|
db.run('PRAGMA wal_checkpoint(TRUNCATE);')
|
|
db.close()
|
|
|
|
const query = db.query(`select "Hello world" as message`) |