web: allow core to specify custom sql db name

This commit is contained in:
Abdullah Atta
2023-12-12 10:03:24 +05:00
parent 1b2479cad2
commit af5b05df70

View File

@@ -57,13 +57,13 @@ async function initializeDatabase(persistence: DatabasePersistence) {
database.setup({
sqliteOptions: {
dialect: {
dialect: (name) => ({
createDriver: () =>
new WaSqliteWorkerDriver({ async: true, dbName: "test.db" }),
new WaSqliteWorkerDriver({ async: true, dbName: name }),
createAdapter: () => new SqliteAdapter(),
createIntrospector: (db) => new SqliteIntrospector(db),
createQueryCompiler: () => new SqliteQueryCompiler()
},
}),
journalMode: "MEMORY",
synchronous: "normal",
pageSize: 8192,