blob: ab37589f47a8a4e3b33dc0092ab17c77b0dd333f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
/*
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 <metamuffin.org>
*/
use crate::{backends::WriteTransaction, table::RowNum};
use anyhow::Result;
pub mod order;
pub mod key;
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 {
let _ = (before, after);
true
}
}
|