Skip to main content

GraphqlOperation

Trait GraphqlOperation 

Source
pub trait GraphqlOperation<T>: Expressive<T> {
    // Provided methods
    fn eq(&self, value: impl Into<AnyGraphqlType>) -> GraphqlCondition
       where Self: Sized { ... }
    fn ne(&self, value: impl Into<AnyGraphqlType>) -> GraphqlCondition
       where Self: Sized { ... }
    fn gt(&self, value: impl Into<AnyGraphqlType>) -> GraphqlCondition
       where Self: Sized { ... }
    fn gte(&self, value: impl Into<AnyGraphqlType>) -> GraphqlCondition
       where Self: Sized { ... }
    fn lt(&self, value: impl Into<AnyGraphqlType>) -> GraphqlCondition
       where Self: Sized { ... }
    fn lte(&self, value: impl Into<AnyGraphqlType>) -> GraphqlCondition
       where Self: Sized { ... }
    fn in_<I, V>(&self, values: I) -> GraphqlCondition
       where Self: Sized,
             I: IntoIterator<Item = V>,
             V: Into<AnyGraphqlType> { ... }
    fn not_in<I, V>(&self, values: I) -> GraphqlCondition
       where Self: Sized,
             I: IntoIterator<Item = V>,
             V: Into<AnyGraphqlType> { ... }
    fn like(&self, pattern: impl Into<String>) -> GraphqlCondition
       where Self: Sized { ... }
    fn ilike(&self, pattern: impl Into<String>) -> GraphqlCondition
       where Self: Sized { ... }
    fn is_null(&self) -> GraphqlCondition
       where Self: Sized { ... }
    fn is_not_null(&self) -> GraphqlCondition
       where Self: Sized { ... }
}
Expand description

GraphQL operators that produce a GraphqlCondition.

Blanket-impl’d for any Expressive<T>. Import this trait alongside your column types when writing GraphQL filters; don’t mix it with vantage_table::operation::Operation in the same scope (which would shadow these methods with raw-expression versions).

Provided Methods§

Source

fn eq(&self, value: impl Into<AnyGraphqlType>) -> GraphqlCondition
where Self: Sized,

field = value

Source

fn ne(&self, value: impl Into<AnyGraphqlType>) -> GraphqlCondition
where Self: Sized,

field != value

Source

fn gt(&self, value: impl Into<AnyGraphqlType>) -> GraphqlCondition
where Self: Sized,

field > value

Source

fn gte(&self, value: impl Into<AnyGraphqlType>) -> GraphqlCondition
where Self: Sized,

field >= value

Source

fn lt(&self, value: impl Into<AnyGraphqlType>) -> GraphqlCondition
where Self: Sized,

field < value

Source

fn lte(&self, value: impl Into<AnyGraphqlType>) -> GraphqlCondition
where Self: Sized,

field <= value

Source

fn in_<I, V>(&self, values: I) -> GraphqlCondition
where Self: Sized, I: IntoIterator<Item = V>, V: Into<AnyGraphqlType>,

field IN [values...]

Source

fn not_in<I, V>(&self, values: I) -> GraphqlCondition
where Self: Sized, I: IntoIterator<Item = V>, V: Into<AnyGraphqlType>,

field NOT IN [values...]

Source

fn like(&self, pattern: impl Into<String>) -> GraphqlCondition
where Self: Sized,

field LIKE pattern — case-sensitive substring match.

Source

fn ilike(&self, pattern: impl Into<String>) -> GraphqlCondition
where Self: Sized,

field ILIKE pattern — case-insensitive substring match.

Source

fn is_null(&self) -> GraphqlCondition
where Self: Sized,

field IS NULL

Source

fn is_not_null(&self) -> GraphqlCondition
where Self: Sized,

field IS NOT NULL

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T, S: Expressive<T>> GraphqlOperation<T> for S

Blanket: any Expressive<T> gets GraphqlOperation<T> for free.