This commit is contained in:
2026-05-24 04:37:51 +01:00
parent 6796a36464
commit a357f69380
5 changed files with 16 additions and 1 deletions
+3
View File
@@ -14,4 +14,7 @@ const DbClient = new Database(db_file_path, {
create: true,
});
sqliteVec.load(DbClient);
if (config.wal_mode) {
DbClient.run("PRAGMA journal_mode = WAL;");
}
export default DbClient;
+4
View File
@@ -1370,6 +1370,10 @@ export type BunSQLiteConfig = {
* definition export. Example `db_types.ts` or `types/db_types.ts`
*/
typedef_file_path?: string;
/**
* Whether to enable `WAL` mode
*/
wal_mode?: boolean;
};
/**
* Resolved Bun SQLite config paired with the loaded database schema.