aboutsummaryrefslogtreecommitdiff
path: root/database/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'database/src/lib.rs')
-rw-r--r--database/src/lib.rs16
1 files changed, 15 insertions, 1 deletions
diff --git a/database/src/lib.rs b/database/src/lib.rs
index 40bda72..32d160b 100644
--- a/database/src/lib.rs
+++ b/database/src/lib.rs
@@ -5,7 +5,21 @@
*/
pub mod backends;
pub mod indices;
-pub mod table;
pub mod prefix_iterator;
+pub mod table;
pub type Pad32 = u32;
+
+use jellycommon::jellyobject::{Object, Tag, TypedTag};
+
+enum Query<'a> {
+ MatchStr(Match<'a, &'a str>),
+ MatchF64(Match<'a, f64>),
+ MatchU64(Match<'a, u64>),
+ MatchTag(Match<'a, Tag>),
+ Has(Path<'a>),
+}
+
+pub struct Match<'a, T>(pub TypedPath<'a, T>, pub T);
+pub struct TypedPath<'a, T>(pub &'a [TypedTag<Object<'static>>], pub TypedTag<T>);
+pub struct Path<'a>(pub &'a [TypedTag<Object<'static>>], pub Tag);