feat(nodejs): add delete unverified (#1530)

PR fixes part of #1527
This commit is contained in:
Gagan Bhullar
2024-08-14 09:53:53 -06:00
committed by GitHub
parent 501817cfac
commit d2caa5e202
3 changed files with 26 additions and 3 deletions

View File

@@ -265,7 +265,11 @@ impl Table {
}
#[napi(catch_unwind)]
pub async fn optimize(&self, older_than_ms: Option<i64>) -> napi::Result<OptimizeStats> {
pub async fn optimize(
&self,
older_than_ms: Option<i64>,
delete_unverified: Option<bool>,
) -> napi::Result<OptimizeStats> {
let inner = self.inner_ref()?;
let older_than = if let Some(ms) = older_than_ms {
@@ -292,7 +296,7 @@ impl Table {
let prune_stats = inner
.optimize(OptimizeAction::Prune {
older_than,
delete_unverified: None,
delete_unverified,
error_if_tagged_old_versions: None,
})
.await