Database schema optimization - part 1
This commit is contained in:
@@ -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"}
|
||||
|
||||
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user