import { n as __require } from "../chunk-ClPoSABd.mjs";

//#region src/db/sqlite.ts
/**
* Create a SQLite dialect from config
*/
function createDialect(config) {
	const BetterSqlite3 = __require("better-sqlite3");
	const { SqliteDialect } = __require("kysely");
	const url = config.url;
	return new SqliteDialect({ database: new BetterSqlite3(url.startsWith("file:") ? url.slice(5) : url) });
}

//#endregion
export { createDialect };
//# sourceMappingURL=sqlite.mjs.map