Skip to main content

RowExpression

Struct RowExpression 

Source
pub struct RowExpression<'a, 'q, R> { /* private fields */ }
Expand description

The row a where_expr condition is about: JSON paths into its columns, exists over its relationships, and the connectives. Compare columns with their constants’ methods, such as Issue::TITLE.like("%bug%").

Implementations§

Source§

impl<R> RowExpression<'_, '_, R>

Source

pub fn json<V>( &self, column: Column<R, V>, path: Vec<JsonPathSegment>, ) -> JsonPath<'_, '_>

A value inside a json column: e.json(Issue::METADATA, vec!["tags".into(), 0.into()]).eq("bug".into()).

Source

pub fn exists<D: ZeroRow>( &self, relationship: Relationship<R, D>, options: ExistsOptions, sub: impl FnOnce(Query<D>) -> Query<D>, ) -> Condition

Whether a related row in relationship matches sub.

Source

pub fn and(&self, conditions: Vec<Condition>) -> Condition

All of conditions; true when there are none.

Source

pub fn or(&self, conditions: Vec<Condition>) -> Condition

Any of conditions; false when there are none.

Source

pub fn not(&self, condition: Condition) -> Condition

Rows that condition doesn’t match.

Auto Trait Implementations§

§

impl<'a, 'q, R> !RefUnwindSafe for RowExpression<'a, 'q, R>

§

impl<'a, 'q, R> !Send for RowExpression<'a, 'q, R>

§

impl<'a, 'q, R> !Sync for RowExpression<'a, 'q, R>

§

impl<'a, 'q, R> !UnwindSafe for RowExpression<'a, 'q, R>

§

impl<'a, 'q, R> Forget for RowExpression<'a, 'q, R>

§

impl<'a, 'q, R> Freeze for RowExpression<'a, 'q, R>
where PhantomData<fn() -> R>: Freeze,

§

impl<'a, 'q, R> Move for RowExpression<'a, 'q, R>

§

impl<'a, 'q, R> Unpin for RowExpression<'a, 'q, R>
where PhantomData<fn() -> R>: Unpin,

§

impl<'a, 'q, R> UnsafeUnpin for RowExpression<'a, 'q, R>
where PhantomData<fn() -> R>: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.