mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-01 15:34:19 +01:00
fix Database storage for WASM bindings
This commit is contained in:
@@ -16,5 +16,8 @@ napi = { version = "3.1.3", default-features = false, features = ["napi6"] }
|
||||
napi-derive = { version = "3.1.1", default-features = true }
|
||||
tracing-subscriber = { version = "0.3.19", features = ["env-filter"] }
|
||||
|
||||
[features]
|
||||
encryption = ["turso_core/encryption"]
|
||||
|
||||
[build-dependencies]
|
||||
napi-build = "2.2.3"
|
||||
|
||||
@@ -561,6 +561,7 @@ impl turso_core::DatabaseStorage for DatabaseFile {
|
||||
fn read_page(
|
||||
&self,
|
||||
page_idx: usize,
|
||||
#[cfg(feature = "encryption")] _key: Option<&turso_core::EncryptionKey>,
|
||||
c: turso_core::Completion,
|
||||
) -> turso_core::Result<turso_core::Completion> {
|
||||
let r = c.as_read();
|
||||
@@ -577,6 +578,7 @@ impl turso_core::DatabaseStorage for DatabaseFile {
|
||||
&self,
|
||||
page_idx: usize,
|
||||
buffer: Arc<turso_core::Buffer>,
|
||||
#[cfg(feature = "encryption")] _key: Option<&turso_core::EncryptionKey>,
|
||||
c: turso_core::Completion,
|
||||
) -> turso_core::Result<turso_core::Completion> {
|
||||
let size = buffer.len();
|
||||
@@ -589,6 +591,7 @@ impl turso_core::DatabaseStorage for DatabaseFile {
|
||||
page_idx: usize,
|
||||
page_size: usize,
|
||||
buffers: Vec<Arc<turso_core::Buffer>>,
|
||||
#[cfg(feature = "encryption")] _key: Option<&turso_core::EncryptionKey>,
|
||||
c: turso_core::Completion,
|
||||
) -> turso_core::Result<turso_core::Completion> {
|
||||
let pos = page_idx.saturating_sub(1) * page_size;
|
||||
|
||||
Reference in New Issue
Block a user