/* This file is part of jellything (https://codeberg.org/metamuffin/jellything) which is licensed under the GNU Affero General Public License (version 3); see /COPYING. Copyright (C) 2026 metamuffin */ use crate::{backends::WriteTransaction, table::RowNum}; use anyhow::Result; use jellyobject::Object; pub mod none; pub mod value; pub trait Index: Send + Sync + 'static { fn add(&self, db: &mut dyn WriteTransaction, row: RowNum, val: Object) -> Result<()>; fn remove(&self, db: &mut dyn WriteTransaction, row: RowNum, val: Object) -> Result<()>; /// Might return true if objects are identical for this index; false if not or uncertain fn compare(&self, before: Object, after: Object) -> bool { let _ = (before, after); false } }