aboutsummaryrefslogtreecommitdiff
path: root/database/src/indices/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'database/src/indices/mod.rs')
-rw-r--r--database/src/indices/mod.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/database/src/indices/mod.rs b/database/src/indices/mod.rs
index 5856254..523235e 100644
--- a/database/src/indices/mod.rs
+++ b/database/src/indices/mod.rs
@@ -4,14 +4,14 @@
Copyright (C) 2025 metamuffin <metamuffin.org>
*/
-use crate::{backends::KV, table::RowNum};
+use crate::{backends::WriteTransaction, table::RowNum};
use anyhow::Result;
pub mod order;
pub trait Index<T> {
- fn add(&self, db: &dyn KV, row: RowNum, val: &T) -> Result<()>;
- fn remove(&self, db: &dyn KV, row: RowNum, val: &T) -> Result<()>;
+ fn add(&self, db: &mut dyn WriteTransaction, row: RowNum, val: &T) -> Result<()>;
+ fn remove(&self, db: &mut dyn WriteTransaction, row: RowNum, val: &T) -> Result<()>;
fn compare(&self, before: &T, after: &T) -> bool {
let _ = (before, after);
true