[][src]Struct aragog::query::QueryItemBuilder

pub struct QueryItemBuilder { /* fields omitted */ }

Builder for QueryItem

Implementations

impl QueryItemBuilder[src]

pub fn equals_str(self, value: &str) -> QueryItem[src]

Finalizes the current query item builder with a string equality comparison. The field to be matched should be a string.

Example


println!("we are in the test");
let query_item = QueryItem::field("username").equals_str("felix");
let query = Query::new(query_item);

pub fn different_than_str(self, value: &str) -> QueryItem[src]

Finalizes the current query item builder with a string inequality comparison. The field to be matched should be a string.

Example


let query_item = QueryItem::field("username").different_than_str("felix");
let query = Query::new(query_item);

pub fn matches(self, regular_expression: &str) -> QueryItem[src]

Finalizes the current query item builder with a regular expression matching. The field to be matched should be a string.

Example


let query_item = QueryItem::field("username").matches(r#"^[0.9](0.6)$"#);
let query = Query::new(query_item);

pub fn does_not_match(self, regular_expression: &str) -> QueryItem[src]

Finalizes the current query item builder with an inverse regular expression matching. The field to be matched should be a string.

Example


let query_item = QueryItem::field("username").does_not_match(r#"^[0.9](0.6)$"#);
let query = Query::new(query_item);

pub fn like(self, pattern: &str) -> QueryItem[src]

Finalizes the current query item builder with string comparison. The field to be matched should be a string.

Example


let query_item = QueryItem::field("username").like("%felix%");
let query = Query::new(query_item);

pub fn not_like(self, pattern: &str) -> QueryItem[src]

Finalizes the current query item builder with string comparison. The field to be matched should be a string.

Example


let query_item = QueryItem::field("username").not_like("%felix%");
let query = Query::new(query_item);

pub fn equals<T>(self, value: T) -> QueryItem where
    T: Num + Display
[src]

Finalizes the current query item builder with numeric equality comparison. The field to be matched should be a numeric type.

Example


let query_item = QueryItem::field("age").equals(18);
let query = Query::new(query_item);

pub fn different_than<T>(self, value: T) -> QueryItem where
    T: Num + Display
[src]

Finalizes the current query item builder with numeric inquality comparison. The field to be matched should be a numeric type.

Example


let query_item = QueryItem::field("age").different_than(18);
let query = Query::new(query_item);

pub fn greater_than<T>(self, value: T) -> QueryItem where
    T: Num + Display
[src]

Finalizes the current query item builder with numeric comparison. The field to be matched should be a numeric type.

Example


let query_item = QueryItem::field("age").greater_than(18);
let query = Query::new(query_item);

pub fn greater_or_equal<T>(self, value: T) -> QueryItem where
    T: Num + Display
[src]

Finalizes the current query item builder with numeric comparison. The field to be matched should be a numeric type.

Example


let query_item = QueryItem::field("age").greater_or_equal(18);
let query = Query::new(query_item);

pub fn lesser_than<T>(self, value: T) -> QueryItem where
    T: Num + Display
[src]

Finalizes the current query item builder with numeric comparison. The field to be matched should be a numeric type.

Example


let query_item = QueryItem::field("age").lesser_than(18);
let query = Query::new(query_item);

pub fn lesser_or_equal<T>(self, value: T) -> QueryItem where
    T: Num + Display
[src]

Finalizes the current query item builder with numeric comparison. The field to be matched should be a numeric type.

Example


let query_item = QueryItem::field("age").lesser_or_equal(18);
let query = Query::new(query_item);

pub fn in_array<T>(self, array: &[T]) -> QueryItem where
    T: Num + Display
[src]

Finalizes the current query item builder with an inclusion in a numeric array comparison. The field to be matched should be a numeric type.

Example


let query_item = QueryItem::field("age").in_array(&[1, 11, 16, 18]);
let query = Query::new(query_item);

pub fn not_in_array<T>(self, array: &[T]) -> QueryItem where
    T: Num + Display
[src]

Finalizes the current query item builder with an inclusion in a numeric array comparison. The field to be matched should be a numeric type.

Example


let query_item = QueryItem::field("age").not_in_array(&[1, 11, 16, 18]);
let query = Query::new(query_item);

pub fn in_str_array(self, array: &[&str]) -> QueryItem[src]

Finalizes the current query item builder with an inclusion in a string array comparison. The field to be matched should be a string type.

Example


let query_item = QueryItem::field("username").in_str_array(&["felix", "123felix"]);
let query = Query::new(query_item);

pub fn not_in_str_array(self, array: &[&str]) -> QueryItem[src]

Finalizes the current query item builder with an inclusion in a string array comparison. The field to be matched should be a string type.

Example


let query_item = QueryItem::field("username").not_in_str_array(&["felix", "123felix"]);
let query = Query::new(query_item);

pub fn is_null(self) -> QueryItem[src]

Finalizes the current query item builder with a null comparison.

Example


let query_item = QueryItem::field("username").is_null();
let query = Query::new(query_item);

pub fn not_null(self) -> QueryItem[src]

Finalizes the current query item builder with a not null comparison.

Example


let query_item = QueryItem::field("username").not_null();
let query = Query::new(query_item);

pub fn is_true(self) -> QueryItem[src]

Finalizes the current query item builder with a boolean comparison. The field to be matched should be a boolean type.

Example


let query_item = QueryItem::field("is_authorized").is_true();
let query = Query::new(query_item);

pub fn is_false(self) -> QueryItem[src]

Finalizes the current query item builder with a boolean comparison. The field to be matched should be a boolean type.

Example


let query_item = QueryItem::field("is_authorized").is_false();
let query = Query::new(query_item);

Trait Implementations

impl Clone for QueryItemBuilder[src]

impl Debug for QueryItemBuilder[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,