mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-25 20:14:21 +01:00
core: Get rid of maybe_init_database_file
Initialization now only occurs in the first write transaction
This commit is contained in:
@@ -6,7 +6,7 @@ use std::num::NonZeroUsize;
|
||||
use std::rc::Rc;
|
||||
use std::sync::Arc;
|
||||
|
||||
use limbo_core::{maybe_init_database_file, LimboError, StepResult};
|
||||
use limbo_core::{LimboError, StepResult};
|
||||
use napi::iterator::Generator;
|
||||
use napi::{bindgen_prelude::ObjectFinalize, Env, JsUnknown};
|
||||
use napi_derive::napi;
|
||||
@@ -65,7 +65,6 @@ impl Database {
|
||||
let file = io
|
||||
.open_file(&path, limbo_core::OpenFlags::Create, false)
|
||||
.map_err(into_napi_error)?;
|
||||
maybe_init_database_file(&file, &io).map_err(into_napi_error)?;
|
||||
let db_file = Arc::new(DatabaseFile::new(file));
|
||||
let db = limbo_core::Database::open(io.clone(), &path, db_file, false)
|
||||
.map_err(into_napi_error)?;
|
||||
|
||||
Reference in New Issue
Block a user