Fix truncate impl in JS bindings

This commit is contained in:
PThorpe92
2025-07-17 23:26:07 -04:00
committed by Jussi Saurio
parent 3be8bb374d
commit 272a63b562
3 changed files with 14 additions and 6 deletions

View File

@@ -726,6 +726,10 @@ impl turso_core::DatabaseStorage for DatabaseFile {
fn size(&self) -> turso_core::Result<u64> {
self.file.size()
}
fn truncate(&self, len: usize, c: turso_core::Completion) -> turso_core::Result<()> {
let _ = self.file.truncate(len, c)?;
Ok(())
}
}
#[inline]