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.rs11
1 files changed, 6 insertions, 5 deletions
diff --git a/database/src/indices/mod.rs b/database/src/indices/mod.rs
index ab37589..ad3d00f 100644
--- a/database/src/indices/mod.rs
+++ b/database/src/indices/mod.rs
@@ -6,14 +6,15 @@
use crate::{backends::WriteTransaction, table::RowNum};
use anyhow::Result;
+use jellycommon::jellyobject::Object;
-pub mod order;
pub mod key;
+pub mod order;
-pub trait Index<T> {
- 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 {
+pub trait Index {
+ fn add(&self, db: &mut dyn WriteTransaction, row: RowNum, val: Object) -> Result<()>;
+ fn remove(&self, db: &mut dyn WriteTransaction, row: RowNum, val: Object) -> Result<()>;
+ fn compare(&self, before: Object, after: Object) -> bool {
let _ = (before, after);
true
}