Database schema optimization - part 1

This commit is contained in:
mdecimus
2025-10-30 19:57:09 +01:00
parent 4919cf55fc
commit 3e1d2d54e4
207 changed files with 3856 additions and 5885 deletions

View File

@@ -6,7 +6,6 @@ resolver = "2"
[dependencies]
types = { path = "../types" }
store = { path = "../store" }
mail-parser = { version = "0.11", features = ["full_encoding", "rkyv"] }
ahash = { version = "0.8" }
chrono = { version = "0.4"}

View File

@@ -4,8 +4,6 @@
* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-SEL
*/
use store::fts::{FilterItem, FilterType};
use super::{Flag, Sequence, quoted_string, serialize_sequence};
#[derive(Debug, Clone, PartialEq, Eq)]
@@ -114,38 +112,6 @@ pub enum Filter {
ThreadId(String),
}
impl FilterItem for Filter {
fn filter_type(&self) -> FilterType {
match self {
Filter::From(_)
| Filter::To(_)
| Filter::Cc(_)
| Filter::Bcc(_)
| Filter::Subject(_)
| Filter::Body(_)
| Filter::Text(_)
| Filter::Header(_, _) => FilterType::Fts,
Filter::And => FilterType::And,
Filter::Or => FilterType::Or,
Filter::Not => FilterType::Not,
Filter::End => FilterType::End,
_ => FilterType::Store,
}
}
}
impl From<FilterType> for Filter {
fn from(value: FilterType) -> Self {
match value {
FilterType::And => Filter::And,
FilterType::Or => Filter::Or,
FilterType::Not => Filter::Not,
FilterType::End => Filter::End,
_ => unreachable!(),
}
}
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum ModSeqEntry {
Shared(Flag),