Const
import { DatabaseSync } from '@photostructure/sqlite';
// Create an in-memory database
const db = new DatabaseSync(':memory:');
// Create a file-based database
const fileDb = new DatabaseSync('./mydata.db');
// Create with options
const readOnlyDb = new DatabaseSync('./data.db', { readOnly: true });
The DatabaseSync class represents a synchronous connection to a SQLite database. All database operations are performed synchronously, blocking the thread until completion.