various fixes: refactored imports, introduced fromDriver/toDriver to improve compat

This commit is contained in:
dswbx
2025-06-13 21:15:29 +02:00
parent cc038a0a9a
commit 2ada4e9f20
15 changed files with 100 additions and 35 deletions

View File

@@ -69,8 +69,9 @@ export async function createAdapterApp<Config extends BkndConfig = BkndConfig, A
connection = config.connection;
} else {
const sqlite = (await import("bknd/adapter/sqlite")).sqlite;
connection = sqlite(config.connection ?? { url: ":memory:" });
$console.info(`Using ${connection.name} connection`);
const conf = config.connection ?? { url: ":memory:" };
connection = sqlite(conf);
$console.info(`Using ${connection.name} connection`, conf.url);
}
appConfig.connection = connection;
}