aboutsummaryrefslogtreecommitdiff
path: root/database/src/indices/order.rs
diff options
context:
space:
mode:
Diffstat (limited to 'database/src/indices/order.rs')
-rw-r--r--database/src/indices/order.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/database/src/indices/order.rs b/database/src/indices/order.rs
index 04fb975..5b7924b 100644
--- a/database/src/indices/order.rs
+++ b/database/src/indices/order.rs
@@ -4,7 +4,7 @@
Copyright (C) 2025 metamuffin <metamuffin.org>
*/
-use crate::{backends::KV, indices::Index, table::Table};
+use crate::{backends::WriteTransaction, indices::Index, table::Table};
use anyhow::Result;
pub struct OrderIndex<T> {
@@ -25,11 +25,11 @@ impl<T: 'static> OrderIndex<T> {
}
}
impl<T: 'static> Index<T> for OrderIndex<T> {
- fn add(&self, db: &dyn KV, id: u64, val: &T) -> Result<()> {
+ fn add(&self, db: &mut dyn WriteTransaction, id: u64, val: &T) -> Result<()> {
db.set(&self.key(id, val), &[])?;
Ok(())
}
- fn remove(&self, db: &dyn KV, id: u64, val: &T) -> Result<()> {
+ fn remove(&self, db: &mut dyn WriteTransaction, id: u64, val: &T) -> Result<()> {
db.del(&self.key(id, val))?;
Ok(())
}