wal
This commit is contained in:
1 parent
be526df88a
commit
5cbb6ea728
2 files changed
+1
-11
No files matched your search
@@ -5,7 +5,6 @@ import { runMigrations } from "../Migrations.ts";
|
||||
|
||||
type RuntimeSqliteLayerConfig = {
|
||||
readonly filename: string;
|
||||
readonly disableWAL?: boolean | undefined;
|
||||
};
|
||||
|
||||
type Loader = {
|
||||
@@ -46,8 +45,5 @@ export const makeSqlitePersistenceLive = (dbPath: string) =>
|
||||
|
||||
export const SqlitePersistenceMemory = Layer.provideMerge(
|
||||
setup,
|
||||
makeRuntimeSqliteLayer({
|
||||
filename: ":memory:",
|
||||
disableWAL: true,
|
||||
}),
|
||||
makeRuntimeSqliteLayer({ filename: ":memory:" }),
|
||||
);
|
||||
@@ -35,7 +35,6 @@ export interface SqliteClientConfig {
|
||||
readonly allowExtension?: boolean | undefined;
|
||||
readonly prepareCacheSize?: number | undefined;
|
||||
readonly prepareCacheTTL?: Duration.Input | undefined;
|
||||
readonly disableWAL?: boolean | undefined;
|
||||
readonly spanAttributes?: Record<string, unknown> | undefined;
|
||||
readonly transformResultNames?: ((str: string) => string) | undefined;
|
||||
readonly transformQueryNames?: ((str: string) => string) | undefined;
|
||||
@@ -64,10 +63,6 @@ const makeWithDatabase = (
|
||||
Effect.sync(() => db.close()),
|
||||
);
|
||||
|
||||
if (options.disableWAL !== true) {
|
||||
db.exec("PRAGMA journal_mode = WAL");
|
||||
}
|
||||
|
||||
const statementReaderCache = new WeakMap<StatementSync, boolean>();
|
||||
const hasRows = (statement: StatementSync): boolean => {
|
||||
const cached = statementReaderCache.get(statement);
|
||||
@@ -203,7 +198,6 @@ const makeMemory = (
|
||||
...config,
|
||||
filename: ":memory:",
|
||||
readonly: false,
|
||||
disableWAL: config.disableWAL ?? true,
|
||||
},
|
||||
() => {
|
||||
const database = new DatabaseSync(":memory:", {
|
||||
|
||||
Reference in new issue
Block a user