aboutsummaryrefslogtreecommitdiff
path: root/database/src/query.rs
diff options
context:
space:
mode:
Diffstat (limited to 'database/src/query.rs')
-rw-r--r--database/src/query.rs51
1 files changed, 0 insertions, 51 deletions
diff --git a/database/src/query.rs b/database/src/query.rs
deleted file mode 100644
index 002a872..0000000
--- a/database/src/query.rs
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- 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 jellyobject::Path;
-
-#[derive(Default)]
-pub struct Query {
- pub filter: Filter,
- pub sort: Sort,
-}
-
-#[derive(Default)]
-pub enum Sort {
- #[default]
- None,
- Value(ValueSort),
- TextSearch(Path, String),
-}
-
-pub struct ValueSort {
- pub order: SortOrder,
- pub path: Path,
- pub multi: MultiBehaviour,
- pub offset: Option<Vec<u8>>,
-}
-
-#[derive(Debug, Clone, Copy, Hash, PartialEq, Eq)]
-pub enum MultiBehaviour {
- First,
- ForEach,
- Max,
- Min,
- Count,
-}
-pub enum SortOrder {
- Ascending,
- Descending,
-}
-
-#[derive(Debug, Clone, Default)]
-pub enum Filter {
- #[default]
- True,
- All(Vec<Filter>),
- Any(Vec<Filter>),
- Match(Path, Vec<u8>),
- Has(Path),
-}