Enum indy_wql::AbstractQuery[][src]

pub enum AbstractQuery<K, V> {
    And(Vec<Self>),
    Or(Vec<Self>),
    Not(Box<Self>),
    Eq(K, V),
    Neq(K, V),
    Gt(K, V),
    Gte(K, V),
    Lt(K, V),
    Lte(K, V),
    Like(K, V),
    In(K, Vec<V>),
    Exist(Vec<K>),
}

An abstract query representation over a key and value type

Variants

And(Vec<Self>)

Logical AND of multiple clauses

Or(Vec<Self>)

Logical OR of multiple clauses

Not(Box<Self>)

Negation of a clause

Eq(K, V)

Equality comparison for a field value

Neq(K, V)

Inequality comparison for a field value

Gt(K, V)

Greater-than comparison for a field value

Gte(K, V)

Greater-than-or-equal comparison for a field value

Lt(K, V)

Less-than comparison for a field value

Lte(K, V)

Less-than-or-equal comparison for a field value

Like(K, V)

SQL ‘LIKE’-compatible string comparison for a field value

In(K, Vec<V>)

Match one of multiple field values in a set

Exist(Vec<K>)

Match any non-null field value of the given field names

Implementations

impl<K, V> AbstractQuery<K, V>[src]

pub fn optimise(self) -> Option<Self>[src]

Perform basic query clause optimization

pub fn map_names<RK, E>(
    self,
    f: impl FnMut(K) -> Result<RK, E>
) -> Result<AbstractQuery<RK, V>, E>
[src]

Perform a transformation on all field names in query clauses

pub fn map_values<RV, E>(
    self,
    f: impl FnMut(&K, V) -> Result<RV, E>
) -> Result<AbstractQuery<K, RV>, E>
[src]

Perform a transformation on all field values in query clauses

pub fn map<RK, RV, KF, VF, E>(
    self,
    kf: &mut KF,
    vf: &mut VF
) -> Result<AbstractQuery<RK, RV>, E> where
    KF: FnMut(K) -> Result<RK, E>,
    VF: FnMut(&K, V) -> Result<RV, E>, 
[src]

Transform all query clauses using field name and value conversions

Trait Implementations

impl<K: Clone, V: Clone> Clone for AbstractQuery<K, V>[src]

impl<K: Debug, V: Debug> Debug for AbstractQuery<K, V>[src]

impl<K, V> Default for AbstractQuery<K, V>[src]

impl<K: Eq, V: Eq> Eq for AbstractQuery<K, V>[src]

impl<K: Hash, V: Hash> Hash for AbstractQuery<K, V>[src]

impl<K: Ord, V: Ord> Ord for AbstractQuery<K, V>[src]

impl<K: PartialEq, V: PartialEq> PartialEq<AbstractQuery<K, V>> for AbstractQuery<K, V>[src]

impl<K: PartialOrd, V: PartialOrd> PartialOrd<AbstractQuery<K, V>> for AbstractQuery<K, V>[src]

impl<K, V> Serialize for AbstractQuery<K, V> where
    &'a K: Into<String>,
    V: Serialize
[src]

impl<K, V> StructuralEq for AbstractQuery<K, V>[src]

impl<K, V> StructuralPartialEq for AbstractQuery<K, V>[src]

Auto Trait Implementations

impl<K, V> RefUnwindSafe for AbstractQuery<K, V> where
    K: RefUnwindSafe,
    V: RefUnwindSafe

impl<K, V> Send for AbstractQuery<K, V> where
    K: Send,
    V: Send

impl<K, V> Sync for AbstractQuery<K, V> where
    K: Sync,
    V: Sync

impl<K, V> Unpin for AbstractQuery<K, V> where
    K: Unpin,
    V: Unpin

impl<K, V> UnwindSafe for AbstractQuery<K, V> where
    K: UnwindSafe,
    V: UnwindSafe

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[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.