Skip to main content

SQLExpr

Struct SQLExpr 

Source
pub struct SQLExpr<'a, V: SQLParam, T: DataType, N: Nullability = NonNull, A: AggregateKind = Scalar> { /* private fields */ }
Expand description

A SQL expression that carries type information.

This wrapper preserves the SQL type through operations, enabling compile-time type checking of SQL expressions.

§Type Parameters

  • 'a: Lifetime of borrowed data
  • V: The dialect’s value type (SQLiteValue, PostgresValue)
  • T: The SQL data type marker (Int, Text, etc.)
  • N: The nullability marker (NonNull or Null)
  • A: The aggregation marker (Scalar or Agg)

§Example

use drizzle_core::expr::{SQLExpr, NonNull, Scalar};
use drizzle_core::types::Int;

let expr: SQLExpr<'_, SQLiteValue, Int, NonNull, Scalar> = ...;

Implementations§

Source§

impl<'a, V: SQLParam, T: DataType, N: Nullability, A: AggregateKind> SQLExpr<'a, V, T, N, A>

Source

pub const fn new(sql: SQL<'a, V>) -> Self

Create a new typed expression from raw SQL.

Source

pub fn into_sql(self) -> SQL<'a, V>

Consume the wrapper and return the inner SQL.

Source§

impl<'a, V, T, N> SQLExpr<'a, V, T, N, Agg>
where V: SQLParam + 'a, T: DataType, N: Nullability,

Source

pub fn over(self, spec: WindowSpec<'a, V>) -> SQLExpr<'a, V, T, N, Scalar>

Apply a window specification to this aggregate expression.

Converts the expression from Agg to Scalar, generating <expr> OVER (...).

§Example
sum(orders.amount).over(
    window()
        .partition_by([orders.customer_id])
        .order_by([asc(orders.date)])
)
Source

pub fn filter<C>(self, condition: C) -> Self
where C: Expr<'a, V>, C::SQLType: BooleanLike,

Apply a FILTER clause to this aggregate (PostgreSQL extension).

Generates <agg> FILTER (WHERE <condition>).

Methods from Deref<Target = SQL<'a, V>>§

Source

pub fn is_subquery(&self) -> bool

Check if this SQL fragment is a subquery (starts with SELECT/WITH).

Source

pub fn sql(&self) -> String

Returns the SQL string with dialect-appropriate placeholders. Uses $1, $2, ... for PostgreSQL, :name or ? for SQLite, ? for MySQL.

Source

pub fn build(&self) -> (String, SmallVec<[&V; 8]>)

Generates the SQL string and collects parameter references in a single pass.

This is the preferred method for driver execution paths since it avoids iterating the chunk list twice (once for sql(), once for params()).

Source

pub fn build_with(&self, style: ParamStyle) -> (String, SmallVec<[&V; 8]>)

Same as build but lets the caller override the placeholder style. Drivers that speak the dialect but bind parameters differently (e.g. AWS Data API on Postgres) use this to emit :1, :2, ... instead of $1, $2, ... without any post-hoc rewriting.

Source

pub fn write_to(&self, buf: &mut impl Write)

Write SQL to a buffer with dialect-appropriate placeholders. Uses $1, $2, ... for PostgreSQL, ? or :name for SQLite, ? for MySQL.

Source

pub fn write_to_with(&self, buf: &mut impl Write, style: ParamStyle)

Same as write_to but with a caller-chosen placeholder style.

Source

pub fn write_chunk_to( &self, buf: &mut impl Write, chunk: &SQLChunk<'a, V>, index: usize, )

Write a single chunk with pattern detection

Source

pub fn params(&self) -> impl Iterator<Item = &V> + use<'_, V>

Returns an iterator over references to parameter values (avoids allocating a Vec - callers can collect if needed)

Trait Implementations§

Source§

impl<'a, V, T, N, A, Rhs> Add<Rhs> for SQLExpr<'a, V, T, N, A>
where V: SQLParam + 'a, T: ArithmeticOutput<Rhs::SQLType>, N: Nullability + NullOr<Rhs::Nullable>, A: AggOr<Rhs::Aggregate>, Rhs: Expr<'a, V>, Rhs::SQLType: Numeric, Rhs::Nullable: Nullability,

Source§

type Output = SQLExpr<'a, V, <T as ArithmeticOutput<<Rhs as Expr<'a, V>>::SQLType>>::Output, <N as NullOr<<Rhs as Expr<'a, V>>::Nullable>>::Output, <A as AggOr<<Rhs as Expr<'a, V>>::Aggregate>>::Output>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Rhs) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a, V, T, N, A> AsRef<SQL<'a, V>> for SQLExpr<'a, V, T, N, A>

Provides reference conversion to inner SQL.

§Example

fn takes_sql_ref<'a, V>(sql: &SQL<'a, V>) { ... }
let expr = eq(users.id, 42);
takes_sql_ref(expr.as_ref());
Source§

fn as_ref(&self) -> &SQL<'a, V>

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<'a, V, T, N, A, Rhs> BitAnd<Rhs> for SQLExpr<'a, V, T, N, A>
where V: SQLParam + 'a, T: BooleanLike, N: Nullability + NullOr<Rhs::Nullable>, A: AggOr<Rhs::Aggregate>, Rhs: Expr<'a, V>, Rhs::SQLType: BooleanLike, Rhs::Nullable: Nullability,

Implements expr1 & expr2 for boolean expressions (SQL AND).

§Example

let condition = eq(users.active, true) & gt(users.age, 18);
// ("users"."active" = TRUE AND "users"."age" > 18)
Source§

type Output = SQLExpr<'a, V, <<V as SQLParam>::DialectMarker as DialectTypes>::Bool, <N as NullOr<<Rhs as Expr<'a, V>>::Nullable>>::Output, <A as AggOr<<Rhs as Expr<'a, V>>::Aggregate>>::Output>

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: Rhs) -> Self::Output

Performs the & operation. Read more
Source§

impl<'a, V, T, N, A, Rhs> BitOr<Rhs> for SQLExpr<'a, V, T, N, A>
where V: SQLParam + 'a, T: BooleanLike, N: Nullability + NullOr<Rhs::Nullable>, A: AggOr<Rhs::Aggregate>, Rhs: Expr<'a, V>, Rhs::SQLType: BooleanLike, Rhs::Nullable: Nullability,

Implements expr1 | expr2 for boolean expressions (SQL OR).

§Example

let condition = eq(users.role, "admin") | eq(users.role, "moderator");
// ("users"."role" = 'admin' OR "users"."role" = 'moderator')
Source§

type Output = SQLExpr<'a, V, <<V as SQLParam>::DialectMarker as DialectTypes>::Bool, <N as NullOr<<Rhs as Expr<'a, V>>::Nullable>>::Output, <A as AggOr<<Rhs as Expr<'a, V>>::Aggregate>>::Output>

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: Rhs) -> Self::Output

Performs the | operation. Read more
Source§

impl<'a, V: Clone + SQLParam, T: Clone + DataType, N: Clone + Nullability, A: Clone + AggregateKind> Clone for SQLExpr<'a, V, T, N, A>

Source§

fn clone(&self) -> SQLExpr<'a, V, T, N, A>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a, V: Debug + SQLParam, T: Debug + DataType, N: Debug + Nullability, A: Debug + AggregateKind> Debug for SQLExpr<'a, V, T, N, A>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a, V, T, N, A> Deref for SQLExpr<'a, V, T, N, A>

Provides transparent access to inner SQL methods via Deref coercion.

§Example

let expr = eq(users.id, 42);
// Access SQL methods directly:
let sql_str = expr.to_string();
Source§

type Target = SQL<'a, V>

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl<V, T, N, A> Display for SQLExpr<'_, V, T, N, A>

Display the SQL expression as a string.

Delegates to the inner SQL type’s Display implementation.

§Example

let expr = eq(users.id, 42);
println!("{}", expr);  // "users"."id" = 42
Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a, V, T, N, A, Rhs> Div<Rhs> for SQLExpr<'a, V, T, N, A>
where V: SQLParam + 'a, T: ArithmeticOutput<Rhs::SQLType>, N: Nullability + NullOr<Rhs::Nullable>, A: AggOr<Rhs::Aggregate>, Rhs: Expr<'a, V>, Rhs::SQLType: Numeric, Rhs::Nullable: Nullability,

Source§

type Output = SQLExpr<'a, V, <T as ArithmeticOutput<<Rhs as Expr<'a, V>>::SQLType>>::Output, <N as NullOr<<Rhs as Expr<'a, V>>::Nullable>>::Output, <A as AggOr<<Rhs as Expr<'a, V>>::Aggregate>>::Output>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Rhs) -> Self::Output

Performs the / operation. Read more
Source§

impl<'a, V: SQLParam, T: DataType, N: Nullability, A: AggregateKind> Expr<'a, V> for SQLExpr<'a, V, T, N, A>

Source§

type SQLType = T

The SQL data type this expression evaluates to.
Source§

type Nullable = N

Whether this expression can be NULL.
Source§

type Aggregate = A

Whether this is an aggregate (COUNT, SUM) or scalar expression.
Source§

fn to_expr_sql(&self) -> SQL<'a, V>

Render this value as a scalar expression by reference. Read more
Source§

fn into_expr_sql(self) -> SQL<'a, V>
where Self: Sized,

Render this value as a scalar expression, consuming it when useful.
Source§

impl<V: SQLParam, T, N, A> ExprValueType for SQLExpr<'_, V, T, N, A>

Source§

impl<'a, V: SQLParam, T: DataType, N: Nullability, A: AggregateKind> From<SQLExpr<'a, V, T, N, A>> for SQL<'a, V>

Source§

fn from(expr: SQLExpr<'a, V, T, N, A>) -> Self

Converts to this type from the input type.
Source§

impl<V: SQLParam, T, N, A> GroupByIdentity for SQLExpr<'_, V, T, N, A>

Source§

type Identity = SQLExpr<'_, V, T, N, A>

Source§

impl<V, T, N, A> HasAggStatus for SQLExpr<'_, V, T, N, A>

Source§

impl<V: SQLParam, T, N, A> IntoSelectTarget for SQLExpr<'_, V, T, N, A>

select(typed_expr)SelectCols<(Expr,)> — single typed expression.

Source§

type Marker = SelectCols<(SQLExpr<'_, V, T, N, A>,)>

Source§

impl<'a, V, T, N, A, Rhs> Mul<Rhs> for SQLExpr<'a, V, T, N, A>
where V: SQLParam + 'a, T: ArithmeticOutput<Rhs::SQLType>, N: Nullability + NullOr<Rhs::Nullable>, A: AggOr<Rhs::Aggregate>, Rhs: Expr<'a, V>, Rhs::SQLType: Numeric, Rhs::Nullable: Nullability,

Source§

type Output = SQLExpr<'a, V, <T as ArithmeticOutput<<Rhs as Expr<'a, V>>::SQLType>>::Output, <N as NullOr<<Rhs as Expr<'a, V>>::Nullable>>::Output, <A as AggOr<<Rhs as Expr<'a, V>>::Aggregate>>::Output>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Rhs) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, V, T, N, A> Neg for SQLExpr<'a, V, T, N, A>
where V: SQLParam + 'a, T: Numeric, N: Nullability, A: AggregateKind,

Source§

type Output = SQLExpr<'a, V, T, N, A>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl<'a, V, T, N, A> Not for SQLExpr<'a, V, T, N, A>
where V: SQLParam + 'a, T: BooleanLike, N: Nullability, A: AggregateKind,

Implements !expr for boolean expressions (SQL NOT).

§Example

let condition = eq(users.active, true);
let negated = !condition;  // NOT "users"."active" = TRUE
Source§

type Output = SQLExpr<'a, V, <<V as SQLParam>::DialectMarker as DialectTypes>::Bool, N, A>

The resulting type after applying the ! operator.
Source§

fn not(self) -> Self::Output

Performs the unary ! operation. Read more
Source§

impl<'a, V, T, N, A, Rhs> Rem<Rhs> for SQLExpr<'a, V, T, N, A>
where V: SQLParam + 'a, T: ArithmeticOutput<Rhs::SQLType>, N: Nullability + NullOr<Rhs::Nullable>, A: AggOr<Rhs::Aggregate>, Rhs: Expr<'a, V>, Rhs::SQLType: Numeric, Rhs::Nullable: Nullability,

Source§

type Output = SQLExpr<'a, V, <T as ArithmeticOutput<<Rhs as Expr<'a, V>>::SQLType>>::Output, <N as NullOr<<Rhs as Expr<'a, V>>::Nullable>>::Output, <A as AggOr<<Rhs as Expr<'a, V>>::Aggregate>>::Output>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: Rhs) -> Self::Output

Performs the % operation. Read more
Source§

impl<'a, V, T, N, A, Rhs> Sub<Rhs> for SQLExpr<'a, V, T, N, A>
where V: SQLParam + 'a, T: ArithmeticOutput<Rhs::SQLType>, N: Nullability + NullOr<Rhs::Nullable>, A: AggOr<Rhs::Aggregate>, Rhs: Expr<'a, V>, Rhs::SQLType: Numeric, Rhs::Nullable: Nullability,

Source§

type Output = SQLExpr<'a, V, <T as ArithmeticOutput<<Rhs as Expr<'a, V>>::SQLType>>::Output, <N as NullOr<<Rhs as Expr<'a, V>>::Nullable>>::Output, <A as AggOr<<Rhs as Expr<'a, V>>::Aggregate>>::Output>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Rhs) -> Self::Output

Performs the - operation. Read more
Source§

impl<'a, V: SQLParam, T: DataType, N: Nullability, A: AggregateKind> ToSQL<'a, V> for SQLExpr<'a, V, T, N, A>

Source§

fn to_sql(&self) -> SQL<'a, V>

Source§

fn into_sql(self) -> SQL<'a, V>

Consume self and return SQL without cloning. Default delegates to to_sql() (which clones). Types that own their SQL (like SQL and SQLExpr) override this to avoid the clone.

Auto Trait Implementations§

§

impl<'a, V, T, N, A> Freeze for SQLExpr<'a, V, T, N, A>
where V: Freeze,

§

impl<'a, V, T, N, A> RefUnwindSafe for SQLExpr<'a, V, T, N, A>

§

impl<'a, V, T, N, A> Send for SQLExpr<'a, V, T, N, A>
where T: Send, N: Send, A: Send, V: Send + Sync,

§

impl<'a, V, T, N, A> Sync for SQLExpr<'a, V, T, N, A>
where T: Sync, N: Sync, A: Sync, V: Sync,

§

impl<'a, V, T, N, A> Unpin for SQLExpr<'a, V, T, N, A>
where T: Unpin, N: Unpin, A: Unpin, V: Unpin,

§

impl<'a, V, T, N, A> UnsafeUnpin for SQLExpr<'a, V, T, N, A>
where V: UnsafeUnpin,

§

impl<'a, V, T, N, A> UnwindSafe for SQLExpr<'a, V, T, N, A>

Blanket Implementations§

Source§

impl<T> AliasExt for T

Source§

fn alias(self, name: &'static str) -> AliasedExpr<Self>

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<'a, V, L, R> ComparisonOperand<'a, V, L> for R
where V: SQLParam + 'a, L: Expr<'a, V>, R: Expr<'a, V>, <L as Expr<'a, V>>::SQLType: Compatible<<R as Expr<'a, V>>::SQLType>,

Source§

type SQLType = <R as Expr<'a, V>>::SQLType

Source§

type Aggregate = <R as Expr<'a, V>>::Aggregate

Source§

fn into_comparison_sql(self) -> SQL<'a, V>

Source§

impl<'a, V, E> ExprExt<'a, V> for E
where V: SQLParam, E: Expr<'a, V>,

Source§

fn eq<R>( self, other: R, ) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, <Self::Aggregate as AggOr<<R as ComparisonOperand<'a, V, Self>>::Aggregate>>::Output>
where R: ComparisonOperand<'a, V, Self>, Self::SQLType: Compatible<<R as ComparisonOperand<'a, V, Self>>::SQLType>, Self::Aggregate: AggOr<<R as ComparisonOperand<'a, V, Self>>::Aggregate>,

Equality comparison (=). Read more
Source§

fn ne<R>( self, other: R, ) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, <Self::Aggregate as AggOr<<R as ComparisonOperand<'a, V, Self>>::Aggregate>>::Output>
where R: ComparisonOperand<'a, V, Self>, Self::SQLType: Compatible<<R as ComparisonOperand<'a, V, Self>>::SQLType>, Self::Aggregate: AggOr<<R as ComparisonOperand<'a, V, Self>>::Aggregate>,

Inequality comparison (<>). Read more
Source§

fn gt<R>( self, other: R, ) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, <Self::Aggregate as AggOr<<R as ComparisonOperand<'a, V, Self>>::Aggregate>>::Output>
where R: ComparisonOperand<'a, V, Self>, Self::SQLType: Compatible<<R as ComparisonOperand<'a, V, Self>>::SQLType>, Self::Aggregate: AggOr<<R as ComparisonOperand<'a, V, Self>>::Aggregate>,

Greater-than comparison (>). Read more
Source§

fn ge<R>( self, other: R, ) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, <Self::Aggregate as AggOr<<R as ComparisonOperand<'a, V, Self>>::Aggregate>>::Output>
where R: ComparisonOperand<'a, V, Self>, Self::SQLType: Compatible<<R as ComparisonOperand<'a, V, Self>>::SQLType>, Self::Aggregate: AggOr<<R as ComparisonOperand<'a, V, Self>>::Aggregate>,

Greater-than-or-equal comparison (>=). Read more
Source§

fn lt<R>( self, other: R, ) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, <Self::Aggregate as AggOr<<R as ComparisonOperand<'a, V, Self>>::Aggregate>>::Output>
where R: ComparisonOperand<'a, V, Self>, Self::SQLType: Compatible<<R as ComparisonOperand<'a, V, Self>>::SQLType>, Self::Aggregate: AggOr<<R as ComparisonOperand<'a, V, Self>>::Aggregate>,

Less-than comparison (<). Read more
Source§

fn le<R>( self, other: R, ) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, <Self::Aggregate as AggOr<<R as ComparisonOperand<'a, V, Self>>::Aggregate>>::Output>
where R: ComparisonOperand<'a, V, Self>, Self::SQLType: Compatible<<R as ComparisonOperand<'a, V, Self>>::SQLType>, Self::Aggregate: AggOr<<R as ComparisonOperand<'a, V, Self>>::Aggregate>,

Less-than-or-equal comparison (<=). Read more
Source§

fn like<R>( self, pattern: R, ) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, <Self::Aggregate as AggOr<<R as ComparisonOperand<'a, V, Self>>::Aggregate>>::Output>
where R: ComparisonOperand<'a, V, Self>, Self::SQLType: Compatible<<R as ComparisonOperand<'a, V, Self>>::SQLType> + Textual, <R as ComparisonOperand<'a, V, Self>>::SQLType: Textual, Self::Aggregate: AggOr<<R as ComparisonOperand<'a, V, Self>>::Aggregate>,

LIKE pattern matching. Read more
Source§

fn not_like<R>( self, pattern: R, ) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, <Self::Aggregate as AggOr<<R as ComparisonOperand<'a, V, Self>>::Aggregate>>::Output>
where R: ComparisonOperand<'a, V, Self>, Self::SQLType: Compatible<<R as ComparisonOperand<'a, V, Self>>::SQLType> + Textual, <R as ComparisonOperand<'a, V, Self>>::SQLType: Textual, Self::Aggregate: AggOr<<R as ComparisonOperand<'a, V, Self>>::Aggregate>,

NOT LIKE pattern matching. Read more
Source§

fn is_null( self, ) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, Self::Aggregate>

IS NULL check. Read more
Source§

fn is_not_null( self, ) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, Self::Aggregate>

IS NOT NULL check. Read more
Source§

fn between<L, H>( self, low: L, high: H, ) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, <<Self::Aggregate as AggOr<<L as ComparisonOperand<'a, V, Self>>::Aggregate>>::Output as AggOr<<H as ComparisonOperand<'a, V, Self>>::Aggregate>>::Output>
where L: ComparisonOperand<'a, V, Self>, H: ComparisonOperand<'a, V, Self>, Self::SQLType: Compatible<<L as ComparisonOperand<'a, V, Self>>::SQLType> + Compatible<<H as ComparisonOperand<'a, V, Self>>::SQLType>, Self::Aggregate: AggOr<<L as ComparisonOperand<'a, V, Self>>::Aggregate>, <Self::Aggregate as AggOr<<L as ComparisonOperand<'a, V, Self>>::Aggregate>>::Output: AggOr<<H as ComparisonOperand<'a, V, Self>>::Aggregate>,

BETWEEN comparison. Read more
Source§

fn not_between<L, H>( self, low: L, high: H, ) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, <<Self::Aggregate as AggOr<<L as ComparisonOperand<'a, V, Self>>::Aggregate>>::Output as AggOr<<H as ComparisonOperand<'a, V, Self>>::Aggregate>>::Output>
where L: ComparisonOperand<'a, V, Self>, H: ComparisonOperand<'a, V, Self>, Self::SQLType: Compatible<<L as ComparisonOperand<'a, V, Self>>::SQLType> + Compatible<<H as ComparisonOperand<'a, V, Self>>::SQLType>, Self::Aggregate: AggOr<<L as ComparisonOperand<'a, V, Self>>::Aggregate>, <Self::Aggregate as AggOr<<L as ComparisonOperand<'a, V, Self>>::Aggregate>>::Output: AggOr<<H as ComparisonOperand<'a, V, Self>>::Aggregate>,

NOT BETWEEN comparison. Read more
Source§

fn in_array<I, R>( self, values: I, ) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, Self::Aggregate>
where I: IntoIterator<Item = R>, R: Expr<'a, V>, Self::SQLType: Compatible<R::SQLType>,

IN array check. Read more
Source§

fn not_in_array<I, R>( self, values: I, ) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, Self::Aggregate>
where I: IntoIterator<Item = R>, R: Expr<'a, V>, Self::SQLType: Compatible<R::SQLType>,

NOT IN array check. Read more
Source§

fn in_subquery<S>( self, subquery: S, ) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, Self::Aggregate>
where S: Expr<'a, V>, Self::SQLType: Compatible<S::SQLType>,

IN subquery check.
Source§

fn not_in_subquery<S>( self, subquery: S, ) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, Self::Aggregate>
where S: Expr<'a, V>, Self::SQLType: Compatible<S::SQLType>,

NOT IN subquery check.
Source§

fn is_distinct_from<R>( self, other: R, ) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, <Self::Aggregate as AggOr<<R as ComparisonOperand<'a, V, Self>>::Aggregate>>::Output>
where R: ComparisonOperand<'a, V, Self>, Self::SQLType: Compatible<<R as ComparisonOperand<'a, V, Self>>::SQLType>, Self::Aggregate: AggOr<<R as ComparisonOperand<'a, V, Self>>::Aggregate>,

IS DISTINCT FROM - NULL-safe inequality comparison. Read more
Source§

fn is_not_distinct_from<R>( self, other: R, ) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, <Self::Aggregate as AggOr<<R as ComparisonOperand<'a, V, Self>>::Aggregate>>::Output>
where R: ComparisonOperand<'a, V, Self>, Self::SQLType: Compatible<<R as ComparisonOperand<'a, V, Self>>::SQLType>, Self::Aggregate: AggOr<<R as ComparisonOperand<'a, V, Self>>::Aggregate>,

IS NOT DISTINCT FROM - NULL-safe equality comparison. Read more
Source§

fn is_true( self, ) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, Self::Aggregate>

IS TRUE - boolean test that handles NULL. Read more
Source§

fn is_false( self, ) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, Self::Aggregate>

IS FALSE - boolean test that handles NULL. 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<Mk> MarkerAggValidFor<()> for Mk

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<Scope> ScopeSatisfies<Nil, ()> for Scope

Source§

impl<E, Grouped> SingleColGroupCheck<Grouped, AggSkip> for E
where E: HasAggStatus<Status = AllAgg>,

Source§

impl<E, Grouped, W> SingleColGroupCheck<Grouped, ScalarCheck<W>> for E
where E: HasAggStatus<Status = AllScalar> + GroupByIdentity, Grouped: ScopeContains<<E as GroupByIdentity>::Identity, W>,

Source§

impl<T> ToCompactString for T
where T: Display,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
Source§

impl<T> TypeEq<T> for T