query
ModuleQueries over audit logs: utopia_query::Query, with audit's lenient
factories and the legacy TYPE_* method names.
Rust
use utopia_audit::query::{self, Query};
let q = query::equal("userId", "u1");
assert_eq!(q.method().as_str(), query::TYPE_EQUAL);
assert_eq!(q.to_string()?, r#"{"method":"equal","attribute":"userId","values":["u1"]}"#);
let page = Query::limit(10);
assert_eq!(page.method().as_str(), query::TYPE_LIMIT);Contents
Functions
between`attribute` between `start` and `end`, inclusive.equal`attribute` equal to `value`, or to any of its values when it is an array.greater_than`attribute` greater than `value`.less_than`attribute` less than `value`.newA query of `method` on `attribute` with `values`.Constants
TYPE_BETWEENUndocumented.TYPE_CONTAINSUndocumented.TYPE_CURSOR_AFTERUndocumented.TYPE_CURSOR_BEFOREUndocumented.TYPE_ENDS_WITHUndocumented.TYPE_EQUALUndocumented.TYPE_GREATERUndocumented.TYPE_GREATER_EQUALUndocumented.TYPE_IS_NOT_NULLUndocumented.TYPE_IS_NULLUndocumented.TYPE_LESSERUndocumented.TYPE_LESSER_EQUALUndocumented.TYPE_LIMITUndocumented.TYPE_NOT_BETWEENUndocumented.TYPE_NOT_CONTAINSUndocumented.TYPE_NOT_ENDS_WITHUndocumented.TYPE_NOT_EQUALUndocumented.TYPE_NOT_STARTS_WITHUndocumented.TYPE_OFFSETUndocumented.TYPE_ORDER_ASCUndocumented.TYPE_ORDER_DESCUndocumented.TYPE_ORDER_RANDOMUndocumented.TYPE_REGEXUndocumented.TYPE_SELECTUndocumented.TYPE_STARTS_WITHUndocumented.use utopia_audit::query::between;Rust
pub fn between(attribute: impl Into<String>, start: impl Into<Value>, end: impl Into<Value>) -> Queryattribute between start and end, inclusive.
use utopia_audit::query::equal;Rust
pub fn equal(attribute: impl Into<String>, value: impl Into<Value>) -> Queryattribute equal to value, or to any of its values when it is an array.
use utopia_audit::query::greater_than;Rust
pub fn greater_than(attribute: impl Into<String>, value: impl Into<Value>) -> Queryattribute greater than value.
use utopia_audit::query::less_than;Rust
pub fn less_than(attribute: impl Into<String>, value: impl Into<Value>) -> Queryattribute less than value.
use utopia_audit::query::new;Rust
pub fn new(method: Method, attribute: impl Into<String>, values: Array) -> QueryA query of method on attribute with values.
Rust
pub const TYPE_BETWEEN: &str = "between"Undocumented.
Rust
pub const TYPE_CONTAINS: &str = "contains"Undocumented.
Rust
pub const TYPE_CURSOR_AFTER: &str = "cursorAfter"Undocumented.
Rust
pub const TYPE_CURSOR_BEFORE: &str = "cursorBefore"Undocumented.
Rust
pub const TYPE_ENDS_WITH: &str = "endsWith"Undocumented.
Rust
pub const TYPE_EQUAL: &str = "equal"Undocumented.
Rust
pub const TYPE_GREATER: &str = "greaterThan"Undocumented.
Rust
pub const TYPE_GREATER_EQUAL: &str = "greaterThanEqual"Undocumented.
Rust
pub const TYPE_IS_NOT_NULL: &str = "isNotNull"Undocumented.
Rust
pub const TYPE_IS_NULL: &str = "isNull"Undocumented.
Rust
pub const TYPE_LESSER: &str = "lessThan"Undocumented.
Rust
pub const TYPE_LESSER_EQUAL: &str = "lessThanEqual"Undocumented.
Rust
pub const TYPE_LIMIT: &str = "limit"Undocumented.
Rust
pub const TYPE_NOT_BETWEEN: &str = "notBetween"Undocumented.
Rust
pub const TYPE_NOT_CONTAINS: &str = "notContains"Undocumented.
Rust
pub const TYPE_NOT_ENDS_WITH: &str = "notEndsWith"Undocumented.
Rust
pub const TYPE_NOT_EQUAL: &str = "notEqual"Undocumented.
Rust
pub const TYPE_NOT_STARTS_WITH: &str = "notStartsWith"Undocumented.
Rust
pub const TYPE_OFFSET: &str = "offset"Undocumented.
Rust
pub const TYPE_ORDER_ASC: &str = "orderAsc"Undocumented.
Rust
pub const TYPE_ORDER_DESC: &str = "orderDesc"Undocumented.
Rust
pub const TYPE_ORDER_RANDOM: &str = "orderRandom"Undocumented.
Rust
pub const TYPE_REGEX: &str = "regex"Undocumented.
Rust
pub const TYPE_SELECT: &str = "select"Undocumented.
Rust
pub const TYPE_STARTS_WITH: &str = "startsWith"Undocumented.