pub struct SQL<'a, V>where
V: SQLParam,{
pub chunks: SmallVec<[SQLChunk<'a, V>; 8]>,
}Expand description
SQL fragment builder with flat chunk storage.
Uses SmallVec<[SQLChunk; 8]> for inline storage of typical SQL fragments
without heap allocation.
Fields§
§chunks: SmallVec<[SQLChunk<'a, V>; 8]>Implementations§
Source§impl<'a, V> SQL<'a, V>where
V: SQLParam,
impl<'a, V> SQL<'a, V>where
V: SQLParam,
Sourcepub fn with_capacity_chunks(capacity: usize) -> SQL<'a, V>
pub fn with_capacity_chunks(capacity: usize) -> SQL<'a, V>
Creates an empty SQL fragment with pre-allocated chunk capacity.
Sourcepub fn param(value: impl Into<Cow<'a, V>>) -> SQL<'a, V>
pub fn param(value: impl Into<Cow<'a, V>>) -> SQL<'a, V>
Creates SQL with a single parameter value
Sourcepub fn bytes(bytes: impl Into<Cow<'a, [u8]>>) -> SQL<'a, V>
pub fn bytes(bytes: impl Into<Cow<'a, [u8]>>) -> SQL<'a, V>
Creates SQL with a binary parameter value (BLOB/bytea)
Prefer this over SQL::param(Vec<u8>) to avoid list semantics.
Sourcepub fn func(name: &'static str, args: SQL<'a, V>) -> SQL<'a, V>
pub fn func(name: &'static str, args: SQL<'a, V>) -> SQL<'a, V>
Creates SQL for a function call: NAME(args) Subqueries are automatically wrapped in parentheses: NAME((SELECT …))
Sourcepub fn append(self, other: impl Into<SQL<'a, V>>) -> SQL<'a, V>
pub fn append(self, other: impl Into<SQL<'a, V>>) -> SQL<'a, V>
Append another SQL fragment (flat extend)
pub fn append_mut(&mut self, other: impl Into<SQL<'a, V>>)
pub fn push_mut(&mut self, chunk: impl Into<SQLChunk<'a, V>>)
Sourcepub fn with_capacity(self, additional: usize) -> SQL<'a, V>
pub fn with_capacity(self, additional: usize) -> SQL<'a, V>
Pre-allocates capacity for additional chunks
Sourcepub fn join<T>(sqls: T, separator: Token) -> SQL<'a, V>
pub fn join<T>(sqls: T, separator: Token) -> SQL<'a, V>
Joins multiple SQL fragments with a separator
Sourcepub fn parens_if_subquery(self) -> SQL<'a, V>
pub fn parens_if_subquery(self) -> SQL<'a, V>
Wrap this SQL fragment in parentheses only when it is a subquery.
Sourcepub fn is_subquery(&self) -> bool
pub fn is_subquery(&self) -> bool
Check if this SQL fragment is a subquery (starts with SELECT/WITH).
Sourcepub fn alias(self, name: impl Into<Cow<'a, str>>) -> SQL<'a, V>
pub fn alias(self, name: impl Into<Cow<'a, str>>) -> SQL<'a, V>
Creates an aliased version: self AS “name”
Sourcepub fn param_list<I>(values: I) -> SQL<'a, V>
pub fn param_list<I>(values: I) -> SQL<'a, V>
Creates a comma-separated list of parameters. Builds chunks directly without intermediate SQL allocations.
Sourcepub fn assignments<I, T>(pairs: I) -> SQL<'a, V>
pub fn assignments<I, T>(pairs: I) -> SQL<'a, V>
Creates a comma-separated list of column assignments: “col” = ? Builds chunks directly without intermediate SQL allocations.
Sourcepub fn assignments_sql<I>(pairs: I) -> SQL<'a, V>
pub fn assignments_sql<I>(pairs: I) -> SQL<'a, V>
Creates a comma-separated list of column assignments from pre-built SQL fragments: “col” =
Unlike assignments() which wraps each value in SQL::param(), this variant
accepts pre-built SQL fragments, preserving placeholders and raw expressions.
Builds chunks directly without intermediate SQL allocations.
Sourcepub fn map_params<U>(self, f: impl FnMut(V) -> U) -> SQL<'a, U>where
U: SQLParam,
pub fn map_params<U>(self, f: impl FnMut(V) -> U) -> SQL<'a, U>where
U: SQLParam,
Maps parameter values from type V to type U using the provided function.
Only Param chunks are affected; all other chunks pass through unchanged.
This is useful for converting between owned and borrowed value types
(e.g. OwnedPostgresValue → PostgresValue<'a>).
Sourcepub fn into_owned(self) -> OwnedSQL<V>
pub fn into_owned(self) -> OwnedSQL<V>
Converts to owned version (consuming self to avoid clone)
Sourcepub fn sql(&self) -> String
pub fn sql(&self) -> String
Returns the SQL string with dialect-appropriate placeholders.
Uses $1, $2, ... for PostgreSQL, :name or ? for SQLite, ? for MySQL.
Sourcepub fn build(&self) -> (String, SmallVec<[&V; 8]>)
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()).
Sourcepub fn build_with(&self, style: ParamStyle) -> (String, SmallVec<[&V; 8]>)
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.
Sourcepub fn write_to(&self, buf: &mut impl Write)
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.
Sourcepub fn write_to_with(&self, buf: &mut impl Write, style: ParamStyle)
pub fn write_to_with(&self, buf: &mut impl Write, style: ParamStyle)
Same as write_to but with a caller-chosen
placeholder style.
Sourcepub fn write_chunk_to(
&self,
buf: &mut impl Write,
chunk: &SQLChunk<'a, V>,
index: usize,
)
pub fn write_chunk_to( &self, buf: &mut impl Write, chunk: &SQLChunk<'a, V>, index: usize, )
Write a single chunk with pattern detection
Sourcepub fn write_qualified_columns(buf: &mut impl Write, table: &TableSqlRef)
pub fn write_qualified_columns(buf: &mut impl Write, table: &TableSqlRef)
Write fully qualified columns for a table
Sourcepub fn params(&self) -> impl Iterator<Item = &V> + use<'_, V>
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> Expr<'a, V> for SQL<'a, V>where
V: SQLParam + 'a,
impl<'a, V> Expr<'a, V> for SQL<'a, V>where
V: SQLParam + 'a,
Source§type SQLType = <<V as SQLParam>::DialectMarker as DialectTypes>::Any
type SQLType = <<V as SQLParam>::DialectMarker as DialectTypes>::Any
Source§fn to_expr_sql(&self) -> SQL<'a, V>
fn to_expr_sql(&self) -> SQL<'a, V>
Source§fn into_expr_sql(self) -> SQL<'a, V>where
Self: Sized,
fn into_expr_sql(self) -> SQL<'a, V>where
Self: Sized,
Source§impl<V> ExprValueType for SQL<'_, V>where
V: SQLParam,
Raw SQL fallback — value type is (), user must specify the concrete type.
impl<V> ExprValueType for SQL<'_, V>where
V: SQLParam,
Raw SQL fallback — value type is (), user must specify the concrete type.
Source§impl From<OwnedPostgresValue> for SQL<'_, OwnedPostgresValue>
impl From<OwnedPostgresValue> for SQL<'_, OwnedPostgresValue>
Source§fn from(value: OwnedPostgresValue) -> Self
fn from(value: OwnedPostgresValue) -> Self
Source§impl<'a> From<PostgresValue<'a>> for SQL<'a, PostgresValue<'a>>
impl<'a> From<PostgresValue<'a>> for SQL<'a, PostgresValue<'a>>
Source§fn from(value: PostgresValue<'a>) -> Self
fn from(value: PostgresValue<'a>) -> Self
Source§impl<'a, V, T> FromIterator<T> for SQL<'a, V>
impl<'a, V, T> FromIterator<T> for SQL<'a, V>
Source§impl<'a, V> IntoIterator for SQL<'a, V>where
V: SQLParam,
impl<'a, V> IntoIterator for SQL<'a, V>where
V: SQLParam,
Source§impl<V> IntoSelectTarget for SQL<'_, V>where
V: SQLParam,
select(sql!(...)) → SelectExpr — user must specify row type.
impl<V> IntoSelectTarget for SQL<'_, V>where
V: SQLParam,
select(sql!(...)) → SelectExpr — user must specify row type.
type Marker = SelectExpr
Auto Trait Implementations§
impl<'a, V> Freeze for SQL<'a, V>where
V: Freeze,
impl<'a, V> RefUnwindSafe for SQL<'a, V>where
V: RefUnwindSafe,
impl<'a, V> Send for SQL<'a, V>
impl<'a, V> Sync for SQL<'a, V>where
V: Sync,
impl<'a, V> Unpin for SQL<'a, V>where
V: Unpin,
impl<'a, V> UnsafeUnpin for SQL<'a, V>where
V: UnsafeUnpin,
impl<'a, V> UnwindSafe for SQL<'a, V>where
V: RefUnwindSafe + UnwindSafe,
Blanket Implementations§
Source§impl<'a, E> ArrayExprExt<'a> for Ewhere
E: Expr<'a, PostgresValue<'a>>,
impl<'a, E> ArrayExprExt<'a> for Ewhere
E: Expr<'a, PostgresValue<'a>>,
Source§fn array_contains<R>(
self,
other: R,
) -> SQLExpr<'a, PostgresValue<'a>, Boolean, NonNull, Scalar>where
R: ToSQL<'a, PostgresValue<'a>>,
fn array_contains<R>(
self,
other: R,
) -> SQLExpr<'a, PostgresValue<'a>, Boolean, NonNull, Scalar>where
R: ToSQL<'a, PostgresValue<'a>>,
Source§fn array_contained<R>(
self,
other: R,
) -> SQLExpr<'a, PostgresValue<'a>, Boolean, NonNull, Scalar>where
R: ToSQL<'a, PostgresValue<'a>>,
fn array_contained<R>(
self,
other: R,
) -> SQLExpr<'a, PostgresValue<'a>, Boolean, NonNull, Scalar>where
R: ToSQL<'a, PostgresValue<'a>>,
Source§fn array_overlaps<R>(
self,
other: R,
) -> SQLExpr<'a, PostgresValue<'a>, Boolean, NonNull, Scalar>where
R: ToSQL<'a, PostgresValue<'a>>,
fn array_overlaps<R>(
self,
other: R,
) -> SQLExpr<'a, PostgresValue<'a>, Boolean, NonNull, Scalar>where
R: ToSQL<'a, PostgresValue<'a>>,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<'a, V, L, R> ComparisonOperand<'a, V, L> for R
impl<'a, V, L, R> ComparisonOperand<'a, V, L> for R
Source§impl<'a, V, E> ExprExt<'a, V> for E
impl<'a, V, E> ExprExt<'a, V> for E
Source§fn eq<R>(
self,
other: R,
) -> SQLExpr<'a, V, <<V as SQLParam>::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>,
fn eq<R>(
self,
other: R,
) -> SQLExpr<'a, V, <<V as SQLParam>::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>,
=). Read moreSource§fn ne<R>(
self,
other: R,
) -> SQLExpr<'a, V, <<V as SQLParam>::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>,
fn ne<R>(
self,
other: R,
) -> SQLExpr<'a, V, <<V as SQLParam>::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>,
<>). Read moreSource§fn gt<R>(
self,
other: R,
) -> SQLExpr<'a, V, <<V as SQLParam>::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>,
fn gt<R>(
self,
other: R,
) -> SQLExpr<'a, V, <<V as SQLParam>::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>,
>). Read moreSource§fn ge<R>(
self,
other: R,
) -> SQLExpr<'a, V, <<V as SQLParam>::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>,
fn ge<R>(
self,
other: R,
) -> SQLExpr<'a, V, <<V as SQLParam>::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>,
>=). Read moreSource§fn lt<R>(
self,
other: R,
) -> SQLExpr<'a, V, <<V as SQLParam>::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>,
fn lt<R>(
self,
other: R,
) -> SQLExpr<'a, V, <<V as SQLParam>::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>,
<). Read moreSource§fn le<R>(
self,
other: R,
) -> SQLExpr<'a, V, <<V as SQLParam>::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>,
fn le<R>(
self,
other: R,
) -> SQLExpr<'a, V, <<V as SQLParam>::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>,
<=). Read moreSource§fn like<R>(
self,
pattern: R,
) -> SQLExpr<'a, V, <<V as SQLParam>::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>,
fn like<R>(
self,
pattern: R,
) -> SQLExpr<'a, V, <<V as SQLParam>::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>,
Source§fn not_like<R>(
self,
pattern: R,
) -> SQLExpr<'a, V, <<V as SQLParam>::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>,
fn not_like<R>(
self,
pattern: R,
) -> SQLExpr<'a, V, <<V as SQLParam>::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>,
Source§fn is_null(
self,
) -> SQLExpr<'a, V, <<V as SQLParam>::DialectMarker as DialectTypes>::Bool, NonNull, Self::Aggregate>
fn is_null( self, ) -> SQLExpr<'a, V, <<V as SQLParam>::DialectMarker as DialectTypes>::Bool, NonNull, Self::Aggregate>
Source§fn is_not_null(
self,
) -> SQLExpr<'a, V, <<V as SQLParam>::DialectMarker as DialectTypes>::Bool, NonNull, Self::Aggregate>
fn is_not_null( self, ) -> SQLExpr<'a, V, <<V as SQLParam>::DialectMarker as DialectTypes>::Bool, NonNull, Self::Aggregate>
Source§fn between<L, H>(
self,
low: L,
high: H,
) -> SQLExpr<'a, V, <<V as SQLParam>::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>,
fn between<L, H>(
self,
low: L,
high: H,
) -> SQLExpr<'a, V, <<V as SQLParam>::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>,
Source§fn not_between<L, H>(
self,
low: L,
high: H,
) -> SQLExpr<'a, V, <<V as SQLParam>::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>,
fn not_between<L, H>(
self,
low: L,
high: H,
) -> SQLExpr<'a, V, <<V as SQLParam>::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>,
Source§fn in_array<I, R>(
self,
values: I,
) -> SQLExpr<'a, V, <<V as SQLParam>::DialectMarker as DialectTypes>::Bool, NonNull, Self::Aggregate>where
I: IntoIterator<Item = R>,
R: Expr<'a, V>,
Self::SQLType: Compatible<<R as Expr<'a, V>>::SQLType>,
fn in_array<I, R>(
self,
values: I,
) -> SQLExpr<'a, V, <<V as SQLParam>::DialectMarker as DialectTypes>::Bool, NonNull, Self::Aggregate>where
I: IntoIterator<Item = R>,
R: Expr<'a, V>,
Self::SQLType: Compatible<<R as Expr<'a, V>>::SQLType>,
Source§fn not_in_array<I, R>(
self,
values: I,
) -> SQLExpr<'a, V, <<V as SQLParam>::DialectMarker as DialectTypes>::Bool, NonNull, Self::Aggregate>where
I: IntoIterator<Item = R>,
R: Expr<'a, V>,
Self::SQLType: Compatible<<R as Expr<'a, V>>::SQLType>,
fn not_in_array<I, R>(
self,
values: I,
) -> SQLExpr<'a, V, <<V as SQLParam>::DialectMarker as DialectTypes>::Bool, NonNull, Self::Aggregate>where
I: IntoIterator<Item = R>,
R: Expr<'a, V>,
Self::SQLType: Compatible<<R as Expr<'a, V>>::SQLType>,
Source§fn in_subquery<S>(
self,
subquery: S,
) -> SQLExpr<'a, V, <<V as SQLParam>::DialectMarker as DialectTypes>::Bool, NonNull, Self::Aggregate>
fn in_subquery<S>( self, subquery: S, ) -> SQLExpr<'a, V, <<V as SQLParam>::DialectMarker as DialectTypes>::Bool, NonNull, Self::Aggregate>
Source§fn not_in_subquery<S>(
self,
subquery: S,
) -> SQLExpr<'a, V, <<V as SQLParam>::DialectMarker as DialectTypes>::Bool, NonNull, Self::Aggregate>
fn not_in_subquery<S>( self, subquery: S, ) -> SQLExpr<'a, V, <<V as SQLParam>::DialectMarker as DialectTypes>::Bool, NonNull, Self::Aggregate>
Source§fn is_distinct_from<R>(
self,
other: R,
) -> SQLExpr<'a, V, <<V as SQLParam>::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>,
fn is_distinct_from<R>(
self,
other: R,
) -> SQLExpr<'a, V, <<V as SQLParam>::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>,
Source§fn is_not_distinct_from<R>(
self,
other: R,
) -> SQLExpr<'a, V, <<V as SQLParam>::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>,
fn is_not_distinct_from<R>(
self,
other: R,
) -> SQLExpr<'a, V, <<V as SQLParam>::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>,
Source§impl<'a, E> JsonExprExt<'a> for Ewhere
E: Expr<'a, PostgresValue<'a>>,
impl<'a, E> JsonExprExt<'a> for Ewhere
E: Expr<'a, PostgresValue<'a>>,
Source§fn json_get(
self,
key: &'a str,
) -> SQLExpr<'a, PostgresValue<'a>, Json, Null, Scalar>
fn json_get( self, key: &'a str, ) -> SQLExpr<'a, PostgresValue<'a>, Json, Null, Scalar>
-> operator), returns JSON.Source§fn json_get_idx(
self,
index: i32,
) -> SQLExpr<'a, PostgresValue<'a>, Json, Null, Scalar>
fn json_get_idx( self, index: i32, ) -> SQLExpr<'a, PostgresValue<'a>, Json, Null, Scalar>
-> operator), returns JSON.Source§fn json_get_text(
self,
key: &'a str,
) -> SQLExpr<'a, PostgresValue<'a>, Text, Null, Scalar>
fn json_get_text( self, key: &'a str, ) -> SQLExpr<'a, PostgresValue<'a>, Text, Null, Scalar>
->> operator).Source§fn json_get_text_idx(
self,
index: i32,
) -> SQLExpr<'a, PostgresValue<'a>, Text, Null, Scalar>
fn json_get_text_idx( self, index: i32, ) -> SQLExpr<'a, PostgresValue<'a>, Text, Null, Scalar>
->> operator).Source§fn json_get_path(
self,
path: &'a str,
) -> SQLExpr<'a, PostgresValue<'a>, Json, Null, Scalar>
fn json_get_path( self, path: &'a str, ) -> SQLExpr<'a, PostgresValue<'a>, Json, Null, Scalar>
#> operator), returns JSON.Source§fn json_get_path_text(
self,
path: &'a str,
) -> SQLExpr<'a, PostgresValue<'a>, Text, Null, Scalar>
fn json_get_path_text( self, path: &'a str, ) -> SQLExpr<'a, PostgresValue<'a>, Text, Null, Scalar>
#>> operator).Source§fn jsonb_contains<R>(
self,
other: R,
) -> SQLExpr<'a, PostgresValue<'a>, Boolean, NonNull, Scalar>where
R: ToSQL<'a, PostgresValue<'a>>,
fn jsonb_contains<R>(
self,
other: R,
) -> SQLExpr<'a, PostgresValue<'a>, Boolean, NonNull, Scalar>where
R: ToSQL<'a, PostgresValue<'a>>,
@> operator).Source§fn jsonb_contained<R>(
self,
other: R,
) -> SQLExpr<'a, PostgresValue<'a>, Boolean, NonNull, Scalar>where
R: ToSQL<'a, PostgresValue<'a>>,
fn jsonb_contained<R>(
self,
other: R,
) -> SQLExpr<'a, PostgresValue<'a>, Boolean, NonNull, Scalar>where
R: ToSQL<'a, PostgresValue<'a>>,
<@ operator).Source§fn jsonb_exists_key(
self,
key: &'a str,
) -> SQLExpr<'a, PostgresValue<'a>, Boolean, NonNull, Scalar>
fn jsonb_exists_key( self, key: &'a str, ) -> SQLExpr<'a, PostgresValue<'a>, Boolean, NonNull, Scalar>
? operator).impl<Mk> MarkerAggValidFor<()> for Mk
Source§impl<'a, E> RegexExprExt<'a> for Ewhere
E: Expr<'a, PostgresValue<'a>>,
impl<'a, E> RegexExprExt<'a> for Ewhere
E: Expr<'a, PostgresValue<'a>>,
Source§fn regex_match(
self,
pattern: &'a str,
) -> SQLExpr<'a, PostgresValue<'a>, Boolean, NonNull, Scalar>
fn regex_match( self, pattern: &'a str, ) -> SQLExpr<'a, PostgresValue<'a>, Boolean, NonNull, Scalar>
~ operator).Source§fn regex_match_ci(
self,
pattern: &'a str,
) -> SQLExpr<'a, PostgresValue<'a>, Boolean, NonNull, Scalar>
fn regex_match_ci( self, pattern: &'a str, ) -> SQLExpr<'a, PostgresValue<'a>, Boolean, NonNull, Scalar>
~* operator).Source§fn regex_not_match(
self,
pattern: &'a str,
) -> SQLExpr<'a, PostgresValue<'a>, Boolean, NonNull, Scalar>
fn regex_not_match( self, pattern: &'a str, ) -> SQLExpr<'a, PostgresValue<'a>, Boolean, NonNull, Scalar>
!~ operator).Source§fn regex_not_match_ci(
self,
pattern: &'a str,
) -> SQLExpr<'a, PostgresValue<'a>, Boolean, NonNull, Scalar>
fn regex_not_match_ci( self, pattern: &'a str, ) -> SQLExpr<'a, PostgresValue<'a>, Boolean, NonNull, Scalar>
!~* operator).impl<Scope> ScopeSatisfies<Nil, ()> for Scope
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more