pub enum Clause {
Compare {
field: String,
op: CompareOp,
value: QueryValue,
},
Contains {
field: String,
value: String,
},
LastDuration(Duration),
SinceDatetime(String),
}Expand description
A single clause — the atomic unit a query is built from.
Variants§
Compare
field OP value — e.g. level = error, req_id > 100.
Contains
field CONTAINS string — substring match on a string column.
LastDuration(Duration)
last <N><unit> — relative time range ending at query time.
SinceDatetime(String)
since <datetime> — absolute time range starting at the given moment.
The string is opaque at the parse layer; the executor uses chrono to
resolve it (which allows us to accept multiple formats without
teaching the grammar about any particular one).
Trait Implementations§
impl StructuralPartialEq for Clause
Auto Trait Implementations§
impl Freeze for Clause
impl RefUnwindSafe for Clause
impl Send for Clause
impl Sync for Clause
impl Unpin for Clause
impl UnsafeUnpin for Clause
impl UnwindSafe for Clause
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more