pub struct SqlLiteral<ST, T = Empty> { /* private fields */ }Expand description
Returned by the sql() function.
Implementations§
Source§impl<ST, T> SqlLiteral<ST, T>where
ST: TypedExpressionType,
impl<ST, T> SqlLiteral<ST, T>where
ST: TypedExpressionType,
Sourcepub fn bind<BindST, U>(
self,
bind_value: U,
) -> UncheckedBind<Self, U::Expression>
pub fn bind<BindST, U>( self, bind_value: U, ) -> UncheckedBind<Self, U::Expression>
Bind a value for use with this SQL query.
§Safety
This function should be used with care, as Diesel cannot validate that the value is of the right type nor can it validate that you have passed the correct number of parameters.
§Examples
let seans_id = users
.select(id)
.filter(sql::<Bool>("name = ").bind::<Text, _>("Sean"))
.get_result(connection);
assert_eq!(Ok(1), seans_id);
let tess_id = sql::<Integer>("SELECT id FROM users WHERE name = ")
.bind::<Text, _>("Tess")
.get_result(connection);
assert_eq!(Ok(2), tess_id);§Multiple Bind Params
let query = users
.select(name)
.filter(
sql::<Bool>("id > ")
.bind::<Integer, _>(1)
.sql(" AND name <> ")
.bind::<Text, _>("Ryan"),
)
.get_results(connection);
let expected = vec!["Tess".to_string()];
assert_eq!(Ok(expected), query);Sourcepub fn sql(self, sql: &str) -> SqlLiteral<ST, Self>
pub fn sql(self, sql: &str) -> SqlLiteral<ST, Self>
Append raw SQL to this literal.
The SQL built so far renders first, then the given SQL text. This
allows interleaving raw SQL fragments with bind calls when the
expression DSL cannot express the fragment.
§Safety
Diesel passes the given string to the database as written. It must
therefore never contain values that come from outside your own code,
because anything interpolated into the SQL text can carry an SQL
injection. Pass such values with bind instead.
§Examples
let query = users
.select(name)
.filter(sql::<Bool>("id > 1").sql(" AND name <> 'Ryan'"))
.get_results(connection);
let expected = vec!["Tess".to_string()];
assert_eq!(Ok(expected), query);Trait Implementations§
Source§impl<ST, T, __Rhs> Add<__Rhs> for SqlLiteral<ST, T>where
Self: Expression,
<Self as Expression>::SqlType: Add,
<<Self as Expression>::SqlType as Add>::Rhs: SqlType + SingleValue,
__Rhs: AsExpression<<<Self as Expression>::SqlType as Add>::Rhs>,
impl<ST, T, __Rhs> Add<__Rhs> for SqlLiteral<ST, T>where
Self: Expression,
<Self as Expression>::SqlType: Add,
<<Self as Expression>::SqlType as Add>::Rhs: SqlType + SingleValue,
__Rhs: AsExpression<<<Self as Expression>::SqlType as Add>::Rhs>,
Source§type Output = Add<SqlLiteral<ST, T>, <__Rhs as AsExpression<<<SqlLiteral<ST, T> as Expression>::SqlType as Add>::Rhs>>::Expression>
type Output = Add<SqlLiteral<ST, T>, <__Rhs as AsExpression<<<SqlLiteral<ST, T> as Expression>::SqlType as Add>::Rhs>>::Expression>
+ operator.impl<QS, ST, T> AppearsOnTable<QS> for SqlLiteral<ST, T>where
Self: Expression,
Source§impl<ST: Clone, T: Clone> Clone for SqlLiteral<ST, T>
impl<ST: Clone, T: Clone> Clone for SqlLiteral<ST, T>
Source§fn clone(&self) -> SqlLiteral<ST, T>
fn clone(&self) -> SqlLiteral<ST, T>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<ST, T, __Rhs> Div<__Rhs> for SqlLiteral<ST, T>where
Self: Expression,
<Self as Expression>::SqlType: Div,
<<Self as Expression>::SqlType as Div>::Rhs: SqlType + SingleValue,
__Rhs: AsExpression<<<Self as Expression>::SqlType as Div>::Rhs>,
impl<ST, T, __Rhs> Div<__Rhs> for SqlLiteral<ST, T>where
Self: Expression,
<Self as Expression>::SqlType: Div,
<<Self as Expression>::SqlType as Div>::Rhs: SqlType + SingleValue,
__Rhs: AsExpression<<<Self as Expression>::SqlType as Div>::Rhs>,
Source§type Output = Div<SqlLiteral<ST, T>, <__Rhs as AsExpression<<<SqlLiteral<ST, T> as Expression>::SqlType as Div>::Rhs>>::Expression>
type Output = Div<SqlLiteral<ST, T>, <__Rhs as AsExpression<<<SqlLiteral<ST, T> as Expression>::SqlType as Div>::Rhs>>::Expression>
/ operator.Source§impl<ST, T> Expression for SqlLiteral<ST, T>where
ST: TypedExpressionType,
impl<ST, T> Expression for SqlLiteral<ST, T>where
ST: TypedExpressionType,
Source§impl<ST, T, __Rhs> Mul<__Rhs> for SqlLiteral<ST, T>where
Self: Expression,
<Self as Expression>::SqlType: Mul,
<<Self as Expression>::SqlType as Mul>::Rhs: SqlType + SingleValue,
__Rhs: AsExpression<<<Self as Expression>::SqlType as Mul>::Rhs>,
impl<ST, T, __Rhs> Mul<__Rhs> for SqlLiteral<ST, T>where
Self: Expression,
<Self as Expression>::SqlType: Mul,
<<Self as Expression>::SqlType as Mul>::Rhs: SqlType + SingleValue,
__Rhs: AsExpression<<<Self as Expression>::SqlType as Mul>::Rhs>,
Source§type Output = Mul<SqlLiteral<ST, T>, <__Rhs as AsExpression<<<SqlLiteral<ST, T> as Expression>::SqlType as Mul>::Rhs>>::Expression>
type Output = Mul<SqlLiteral<ST, T>, <__Rhs as AsExpression<<<SqlLiteral<ST, T> as Expression>::SqlType as Mul>::Rhs>>::Expression>
* operator.Source§impl<ST, T> Query for SqlLiteral<ST, T>where
Self: Expression,
impl<ST, T> Query for SqlLiteral<ST, T>where
Self: Expression,
Source§impl<ST, T, DB> QueryFragment<DB> for SqlLiteral<ST, T>where
DB: Backend,
T: QueryFragment<DB>,
impl<ST, T, DB> QueryFragment<DB> for SqlLiteral<ST, T>where
DB: Backend,
T: QueryFragment<DB>,
Source§fn walk_ast<'b>(&'b self, out: AstPass<'_, 'b, DB>) -> QueryResult<()>
fn walk_ast<'b>(&'b self, out: AstPass<'_, 'b, DB>) -> QueryResult<()>
QueryFragment for all passes. Read moreSource§fn to_sql(&self, out: &mut DB::QueryBuilder, backend: &DB) -> QueryResult<()>
fn to_sql(&self, out: &mut DB::QueryBuilder, backend: &DB) -> QueryResult<()>
QueryFragment to its SQL representation. Read moreSource§fn collect_binds<'b>(
&'b self,
out: &mut DB::BindCollector<'b>,
metadata_lookup: &mut DB::MetadataLookup,
backend: &'b DB,
) -> QueryResult<()>
fn collect_binds<'b>( &'b self, out: &mut DB::BindCollector<'b>, metadata_lookup: &mut DB::MetadataLookup, backend: &'b DB, ) -> QueryResult<()>
Source§fn is_safe_to_cache_prepared(&self, backend: &DB) -> QueryResult<bool>
fn is_safe_to_cache_prepared(&self, backend: &DB) -> QueryResult<bool>
Source§impl<ST, T> QueryId for SqlLiteral<ST, T>
impl<ST, T> QueryId for SqlLiteral<ST, T>
Source§const HAS_STATIC_QUERY_ID: bool = false
const HAS_STATIC_QUERY_ID: bool = false
Self be uniquely identified by its type? Read moreimpl<ST, T> RunQueryDslSupport for SqlLiteral<ST, T>
impl<QS, ST, T> SelectableExpression<QS> for SqlLiteral<ST, T>where
Self: Expression,
Source§impl<ST, T, __Rhs> Sub<__Rhs> for SqlLiteral<ST, T>where
Self: Expression,
<Self as Expression>::SqlType: Sub,
<<Self as Expression>::SqlType as Sub>::Rhs: SqlType + SingleValue,
__Rhs: AsExpression<<<Self as Expression>::SqlType as Sub>::Rhs>,
impl<ST, T, __Rhs> Sub<__Rhs> for SqlLiteral<ST, T>where
Self: Expression,
<Self as Expression>::SqlType: Sub,
<<Self as Expression>::SqlType as Sub>::Rhs: SqlType + SingleValue,
__Rhs: AsExpression<<<Self as Expression>::SqlType as Sub>::Rhs>,
Source§type Output = Sub<SqlLiteral<ST, T>, <__Rhs as AsExpression<<<SqlLiteral<ST, T> as Expression>::SqlType as Sub>::Rhs>>::Expression>
type Output = Sub<SqlLiteral<ST, T>, <__Rhs as AsExpression<<<SqlLiteral<ST, T> as Expression>::SqlType as Sub>::Rhs>>::Expression>
- operator.Source§impl<ST, T, GB> ValidGrouping<GB> for SqlLiteral<ST, T>
impl<ST, T, GB> ValidGrouping<GB> for SqlLiteral<ST, T>
Source§type IsAggregate = Never
type IsAggregate = Never
Auto Trait Implementations§
impl<ST, T> Freeze for SqlLiteral<ST, T>
impl<ST, T> RefUnwindSafe for SqlLiteral<ST, T>
impl<ST, T> Send for SqlLiteral<ST, T>
impl<ST, T> Sync for SqlLiteral<ST, T>
impl<ST, T> Unpin for SqlLiteral<ST, T>
impl<ST, T> UnsafeUnpin for SqlLiteral<ST, T>
impl<ST, T> UnwindSafe for SqlLiteral<ST, T>
Blanket Implementations§
Source§impl<T> AggregateExpressionMethods for T
impl<T> AggregateExpressionMethods for T
Source§fn aggregate_distinct(self) -> AggregateDistinct<Self>where
Self: DistinctDsl,
fn aggregate_distinct(self) -> AggregateDistinct<Self>where
Self: DistinctDsl,
DISTINCT modifier for aggregate functions Read moreSource§fn aggregate_all(self) -> AggregateAll<Self>where
Self: AllDsl,
fn aggregate_all(self) -> AggregateAll<Self>where
Self: AllDsl,
ALL modifier for aggregate functions Read moreSource§fn aggregate_filter<P>(self, f: P) -> AggregateFilter<Self, P>
fn aggregate_filter<P>(self, f: P) -> AggregateFilter<Self, P>
Source§fn aggregate_order<O>(self, o: O) -> AggregateOrder<Self, O>where
Self: OrderAggregateDsl<O>,
fn aggregate_order<O>(self, o: O) -> AggregateOrder<Self, O>where
Self: OrderAggregateDsl<O>,
Source§impl<T> AnyJsonExpressionMethods for T
impl<T> AnyJsonExpressionMethods for T
Source§fn retrieve_as_text<T>(self, other: T) -> RetrieveAsText<Self, T>
fn retrieve_as_text<T>(self, other: T) -> RetrieveAsText<Self, T>
__sqlite-shared or postgres_backend only.->> expression JSON. Read moreSource§impl<T, ST> AsExpression<ST> for T
impl<T, ST> AsExpression<ST> for T
Source§type Expression = T
type Expression = T
Source§fn as_expression(self) -> T
fn as_expression(self) -> T
Source§impl<T, ST> AsExpressionList<ST> for T
impl<T, ST> AsExpressionList<ST> for T
Source§type Expression = <T as IntoArrayExpression<ST>>::ArrayExpression
type Expression = <T as IntoArrayExpression<ST>>::ArrayExpression
Use IntoArrayExpression instead
with-deprecated and non-crate feature without-deprecated only.Source§fn as_expression_list(self) -> <T as AsExpressionList<ST>>::Expression
fn as_expression_list(self) -> <T as AsExpressionList<ST>>::Expression
Use IntoArrayExpression instead
with-deprecated and non-crate feature without-deprecated only.Source§impl<T> BoolExpressionMethods for T
impl<T> BoolExpressionMethods for T
Source§fn and<T, ST>(self, other: T) -> And<Self, T, ST>where
Self::SqlType: SqlType,
ST: SqlType + TypedExpressionType + BoolOrNullableBool,
T: AsExpression<ST>,
And<Self, T::Expression>: Expression,
fn and<T, ST>(self, other: T) -> And<Self, T, ST>where
Self::SqlType: SqlType,
ST: SqlType + TypedExpressionType + BoolOrNullableBool,
T: AsExpression<ST>,
And<Self, T::Expression>: Expression,
AND expression Read moreSource§fn or<T, ST>(self, other: T) -> Or<Self, T, ST>where
Self::SqlType: SqlType,
ST: SqlType + TypedExpressionType + BoolOrNullableBool,
T: AsExpression<ST>,
Or<Self, T::Expression>: Expression,
fn or<T, ST>(self, other: T) -> Or<Self, T, ST>where
Self::SqlType: SqlType,
ST: SqlType + TypedExpressionType + BoolOrNullableBool,
T: AsExpression<ST>,
Or<Self, T::Expression>: Expression,
OR expression Read moreSource§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
impl<QS, T, DB, GB, IsAggregate> BoxableExpression<QS, DB, GB, IsAggregate> for Twhere
DB: Backend,
T: Expression + SelectableExpression<QS> + ValidGrouping<GB> + QueryFragment<DB> + Send,
<T as ValidGrouping<GB>>::IsAggregate: MixedAggregates<IsAggregate, Output = IsAggregate>,
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<Conn, DB, T> ExecuteDsl<Conn, DB> for T
impl<Conn, DB, T> ExecuteDsl<Conn, DB> for T
Source§impl<T> ExpressionMethods for T
impl<T> ExpressionMethods for T
Source§fn is_not_null(self) -> IsNotNull<Self>
fn is_not_null(self) -> IsNotNull<Self>
IS NOT NULL expression. Read moreSource§fn between<T, U>(self, lower: T, upper: U) -> Between<Self, T, U>
fn between<T, U>(self, lower: T, upper: U) -> Between<Self, T, U>
BETWEEN expression using the given lower and upper
bounds. Read moreSource§fn not_between<T, U>(self, lower: T, upper: U) -> NotBetween<Self, T, U>
fn not_between<T, U>(self, lower: T, upper: U) -> NotBetween<Self, T, U>
NOT BETWEEN expression using the given lower and upper
bounds. Read moreSource§fn fallible_cast<ST>(self) -> Cast<Self, ST>
fn fallible_cast<ST>(self) -> Cast<Self, ST>
Source§impl<ST, T> IntoArrayExpression<ST> for T
impl<ST, T> IntoArrayExpression<ST> for T
Source§type ArrayExpression = <T as AsExpression<Array<ST>>>::Expression
type ArrayExpression = <T as AsExpression<Array<ST>>>::Expression
postgres_backend only.Source§fn into_array_expression(
self,
) -> <T as IntoArrayExpression<ST>>::ArrayExpression
fn into_array_expression( self, ) -> <T as IntoArrayExpression<ST>>::ArrayExpression
postgres_backend only.ARRAY (values) clause for the given typeSource§impl<T> IntoSql for T
impl<T> IntoSql for T
Source§impl<T> JsonIndex for T
impl<T> JsonIndex for T
type Expression = T
fn into_json_index_expression(self) -> <T as JsonIndex>::Expression
Source§impl<'query, Conn, T, U, DB, B> LoadQuery<'query, Conn, U, B> for Twhere
Conn: Connection<Backend = DB> + LoadConnection<B>,
T: AsQuery + RunQueryDsl<Conn>,
<T as AsQuery>::Query: QueryFragment<DB> + QueryId + 'query,
<T as AsQuery>::SqlType: CompatibleType<U, DB>,
DB: Backend + QueryMetadata<<T as AsQuery>::SqlType> + 'static,
U: FromSqlRow<<<T as AsQuery>::SqlType as CompatibleType<U, DB>>::SqlType, DB> + 'static,
<<T as AsQuery>::SqlType as CompatibleType<U, DB>>::SqlType: 'static,
impl<'query, Conn, T, U, DB, B> LoadQuery<'query, Conn, U, B> for Twhere
Conn: Connection<Backend = DB> + LoadConnection<B>,
T: AsQuery + RunQueryDsl<Conn>,
<T as AsQuery>::Query: QueryFragment<DB> + QueryId + 'query,
<T as AsQuery>::SqlType: CompatibleType<U, DB>,
DB: Backend + QueryMetadata<<T as AsQuery>::SqlType> + 'static,
U: FromSqlRow<<<T as AsQuery>::SqlType as CompatibleType<U, DB>>::SqlType, DB> + 'static,
<<T as AsQuery>::SqlType as CompatibleType<U, DB>>::SqlType: 'static,
Source§type RowIter<'conn> = LoadIter<U, <Conn as LoadConnection<B>>::Cursor<'conn, 'query>, <<T as AsQuery>::SqlType as CompatibleType<U, DB>>::SqlType, DB>
where
Conn: 'conn
type RowIter<'conn> = LoadIter<U, <Conn as LoadConnection<B>>::Cursor<'conn, 'query>, <<T as AsQuery>::SqlType as CompatibleType<U, DB>>::SqlType, DB> where Conn: 'conn
LoadQuery::internal_loadimpl<T> NonAggregate for Twhere
T: ValidGrouping<()>,
<T as ValidGrouping<()>>::IsAggregate: MixedAggregates<No, Output = No>,
Source§impl<T> NullableExpressionMethods for Twhere
T: Expression,
impl<T> NullableExpressionMethods for Twhere
T: Expression,
Source§fn nullable(self) -> Nullable<Self>
fn nullable(self) -> Nullable<Self>
Source§fn assume_not_null(self) -> AssumeNotNull<Self>
fn assume_not_null(self) -> AssumeNotNull<Self>
Option. Read moreSource§impl<T> PgAnyJsonExpressionMethods for T
impl<T> PgAnyJsonExpressionMethods for T
Source§fn retrieve_as_object<T>(self, other: T) -> RetrieveAsObject<Self, T>
fn retrieve_as_object<T>(self, other: T) -> RetrieveAsObject<Self, T>
postgres_backend only.-> expression. Read moreSource§fn retrieve_by_path_as_object<T>(
self,
other: T,
) -> RetrieveByPathAsObjectJson<Self, T::Expression>
fn retrieve_by_path_as_object<T>( self, other: T, ) -> RetrieveByPathAsObjectJson<Self, T::Expression>
postgres_backend only.#> expression. Read moreSource§fn retrieve_by_path_as_text<T>(
self,
other: T,
) -> RetrieveByPathAsTextJson<Self, T::Expression>
fn retrieve_by_path_as_text<T>( self, other: T, ) -> RetrieveByPathAsTextJson<Self, T::Expression>
postgres_backend only.#>> expression. Read moreSource§impl<T> PgArrayExpressionMethods for T
impl<T> PgArrayExpressionMethods for T
Source§fn overlaps_with<T>(self, other: T) -> OverlapsWith<Self, T>
fn overlaps_with<T>(self, other: T) -> OverlapsWith<Self, T>
postgres_backend only.&& expression. Read moreSource§fn contains<T>(self, other: T) -> Contains<Self, T>
fn contains<T>(self, other: T) -> Contains<Self, T>
postgres_backend only.@> expression. Read moreSource§fn is_contained_by<T>(self, other: T) -> IsContainedBy<Self, T>
fn is_contained_by<T>(self, other: T) -> IsContainedBy<Self, T>
postgres_backend only.<@ expression. Read moreSource§fn index<T>(self, other: T) -> Index<Self, T>
fn index<T>(self, other: T) -> Index<Self, T>
postgres_backend only.Source§fn index_nullable<T>(self, other: T) -> IndexNullable<Self, T>
fn index_nullable<T>(self, other: T) -> IndexNullable<Self, T>
postgres_backend only.PgArrayExpressionMethods::index
but takes a nullable expression for the parameter. Read moreSource§fn slice<T1, T2>(self, start: T1, end: T2) -> Slice<Self, T1, T2>
fn slice<T1, T2>(self, start: T1, end: T2) -> Slice<Self, T1, T2>
postgres_backend only.Source§fn slice_nullable<T1, T2>(
self,
start: T1,
end: T2,
) -> SliceNullable<Self, T1, T2>where
Self::SqlType: SqlType,
T1: AsExpression<Nullable<Integer>>,
T2: AsExpression<Nullable<Integer>>,
fn slice_nullable<T1, T2>(
self,
start: T1,
end: T2,
) -> SliceNullable<Self, T1, T2>where
Self::SqlType: SqlType,
T1: AsExpression<Nullable<Integer>>,
T2: AsExpression<Nullable<Integer>>,
postgres_backend only.PgArrayExpressionMethods::slice
but takes nullable expressions for the parameters. Read moreSource§fn slice_from<T>(self, start: T) -> SliceFrom<Self, T>
fn slice_from<T>(self, start: T) -> SliceFrom<Self, T>
postgres_backend only.Source§fn slice_from_nullable<T>(self, start: T) -> SliceFromNullable<Self, T>
fn slice_from_nullable<T>(self, start: T) -> SliceFromNullable<Self, T>
postgres_backend only.PgArrayExpressionMethods::slice_from
but takes a nullable expression for the parameter. Read moreSource§fn slice_to<T>(self, end: T) -> SliceTo<Self, T>
fn slice_to<T>(self, end: T) -> SliceTo<Self, T>
postgres_backend only.Source§fn slice_to_nullable<T>(self, end: T) -> SliceToNullable<Self, T>
fn slice_to_nullable<T>(self, end: T) -> SliceToNullable<Self, T>
postgres_backend only.PgArrayExpressionMethods::slice_to
but takes a nullable expression for the parameter. Read moreSource§impl<T> PgBinaryExpressionMethods for T
impl<T> PgBinaryExpressionMethods for T
Source§fn concat<T>(self, other: T) -> Concat<Self, T>
fn concat<T>(self, other: T) -> Concat<Self, T>
postgres_backend only.|| operator. Read moreSource§impl<T> PgExpressionMethods for Twhere
T: Expression,
impl<T> PgExpressionMethods for Twhere
T: Expression,
Source§fn is_not_distinct_from<T>(self, other: T) -> IsNotDistinctFrom<Self, T>
fn is_not_distinct_from<T>(self, other: T) -> IsNotDistinctFrom<Self, T>
postgres_backend only.IS NOT DISTINCT FROM expression. Read moreSource§fn is_distinct_from<T>(self, other: T) -> IsDistinctFrom<Self, T>
fn is_distinct_from<T>(self, other: T) -> IsDistinctFrom<Self, T>
postgres_backend only.IS DISTINCT FROM expression. Read moreSource§fn is_contained_by_range<T>(self, other: T) -> IsContainedByRange<Self, T>
fn is_contained_by_range<T>(self, other: T) -> IsContainedByRange<Self, T>
postgres_backend only.<@ expression. Read moreSource§impl<T> PgJsonbExpressionMethods for T
impl<T> PgJsonbExpressionMethods for T
Source§fn concat<T>(self, other: T) -> Concat<Self, T>
fn concat<T>(self, other: T) -> Concat<Self, T>
postgres_backend only.|| expression. Read moreSource§fn has_key<T>(self, other: T) -> HasKeyJsonb<Self, T>where
T: AsExpression<VarChar>,
fn has_key<T>(self, other: T) -> HasKeyJsonb<Self, T>where
T: AsExpression<VarChar>,
postgres_backend only.? expression. Read moreSource§fn has_any_key<T>(self, other: T) -> HasAnyKeyJsonb<Self, T>
fn has_any_key<T>(self, other: T) -> HasAnyKeyJsonb<Self, T>
postgres_backend only.?| expression. Read moreSource§fn has_all_keys<T>(self, other: T) -> HasAllKeysJsonb<Self, T>
fn has_all_keys<T>(self, other: T) -> HasAllKeysJsonb<Self, T>
postgres_backend only.?& expression. Read moreSource§fn contains<T>(self, other: T) -> Contains<Self, T>
fn contains<T>(self, other: T) -> Contains<Self, T>
postgres_backend only.@> expression. Read moreSource§fn is_contained_by<T>(self, other: T) -> IsContainedBy<Self, T>
fn is_contained_by<T>(self, other: T) -> IsContainedBy<Self, T>
postgres_backend only.<@ expression. Read moreSource§fn remove<T>(
self,
other: T,
) -> RemoveFromJsonb<Self, T::Expression, <T::Expression as Expression>::SqlType>
fn remove<T>( self, other: T, ) -> RemoveFromJsonb<Self, T::Expression, <T::Expression as Expression>::SqlType>
postgres_backend only.- expression. Read moreSource§fn remove_by_path<T>(
self,
other: T,
) -> RemoveByPathFromJsonb<Self, T::Expression>
fn remove_by_path<T>( self, other: T, ) -> RemoveByPathFromJsonb<Self, T::Expression>
postgres_backend only.#- expression. Read moreSource§impl<T> PgNetExpressionMethods for T
impl<T> PgNetExpressionMethods for T
Source§fn contains<T>(self, other: T) -> ContainsNet<Self, T>where
T: AsExpression<Inet>,
fn contains<T>(self, other: T) -> ContainsNet<Self, T>where
T: AsExpression<Inet>,
postgres_backend only.>> expression. Read moreSource§fn contains_or_eq<T>(self, other: T) -> ContainsNetLoose<Self, T>where
T: AsExpression<Inet>,
fn contains_or_eq<T>(self, other: T) -> ContainsNetLoose<Self, T>where
T: AsExpression<Inet>,
postgres_backend only.>>= expression. Read moreSource§fn is_contained_by<T>(self, other: T) -> IsContainedByNet<Self, T>where
T: AsExpression<Inet>,
fn is_contained_by<T>(self, other: T) -> IsContainedByNet<Self, T>where
T: AsExpression<Inet>,
postgres_backend only.<< expression. Read moreSource§fn is_contained_by_or_eq<T>(self, other: T) -> IsContainedByNetLoose<Self, T>where
T: AsExpression<Inet>,
fn is_contained_by_or_eq<T>(self, other: T) -> IsContainedByNetLoose<Self, T>where
T: AsExpression<Inet>,
postgres_backend only.Source§fn overlaps_with<T>(self, other: T) -> OverlapsWithNet<Self, T>where
T: AsExpression<Inet>,
fn overlaps_with<T>(self, other: T) -> OverlapsWithNet<Self, T>where
T: AsExpression<Inet>,
postgres_backend only.&& expression. Read moreSource§fn and<T>(self, other: T) -> AndNet<Self, T>where
T: AsExpression<Inet>,
fn and<T>(self, other: T) -> AndNet<Self, T>where
T: AsExpression<Inet>,
postgres_backend only.& expression. Read moreSource§fn or<T>(self, other: T) -> OrNet<Self, T>where
T: AsExpression<Inet>,
fn or<T>(self, other: T) -> OrNet<Self, T>where
T: AsExpression<Inet>,
postgres_backend only.| expression. Read moreSource§fn diff<T>(self, other: T) -> DifferenceNet<Self, T>where
T: AsExpression<Inet>,
fn diff<T>(self, other: T) -> DifferenceNet<Self, T>where
T: AsExpression<Inet>,
postgres_backend only.- expression. Read moreSource§impl<T> PgRangeExpressionMethods for T
impl<T> PgRangeExpressionMethods for T
Source§fn contains<T>(self, other: T) -> RangeContains<Self, T>where
Self::SqlType: RangeOrMultirange,
<Self::SqlType as RangeOrMultirange>::Inner: SqlType + TypedExpressionType,
T: AsExpression<<Self::SqlType as RangeOrMultirange>::Inner>,
fn contains<T>(self, other: T) -> RangeContains<Self, T>where
Self::SqlType: RangeOrMultirange,
<Self::SqlType as RangeOrMultirange>::Inner: SqlType + TypedExpressionType,
T: AsExpression<<Self::SqlType as RangeOrMultirange>::Inner>,
postgres_backend only.@> expression. Read moreSource§fn contains_range<T>(self, other: T) -> ContainsRange<Self, T>
fn contains_range<T>(self, other: T) -> ContainsRange<Self, T>
postgres_backend only.@> expression. Read moreSource§fn is_contained_by<T>(self, other: T) -> IsContainedBy<Self, T>
fn is_contained_by<T>(self, other: T) -> IsContainedBy<Self, T>
postgres_backend only.<@ expression. Read moreSource§fn overlaps_with<T>(self, other: T) -> OverlapsWith<Self, T>
fn overlaps_with<T>(self, other: T) -> OverlapsWith<Self, T>
postgres_backend only.&& expression. Read moreSource§fn range_extends_right_to<T>(self, other: T) -> RangeExtendsRightTo<Self, T>
fn range_extends_right_to<T>(self, other: T) -> RangeExtendsRightTo<Self, T>
postgres_backend only.&< expression. Read moreSource§fn range_extends_left_to<T>(self, other: T) -> RangeExtendsLeftTo<Self, T>
fn range_extends_left_to<T>(self, other: T) -> RangeExtendsLeftTo<Self, T>
postgres_backend only.&> expression. Read moreSource§fn lesser_than<T>(self, other: T) -> LesserThanRange<Self, T>
fn lesser_than<T>(self, other: T) -> LesserThanRange<Self, T>
postgres_backend only.<< expression. Read moreSource§fn greater_than<T>(self, other: T) -> GreaterThanRange<Self, T>
fn greater_than<T>(self, other: T) -> GreaterThanRange<Self, T>
postgres_backend only.>> expression. Read moreSource§fn range_adjacent<T>(self, other: T) -> RangeAdjacent<Self, T>
fn range_adjacent<T>(self, other: T) -> RangeAdjacent<Self, T>
postgres_backend only.-|- expression. Read moreSource§fn union_range<T>(self, other: T) -> UnionRange<Self, T>
fn union_range<T>(self, other: T) -> UnionRange<Self, T>
postgres_backend only.+ expression. Read moreSource§fn difference_range<T>(self, other: T) -> Difference<Self, T>
fn difference_range<T>(self, other: T) -> Difference<Self, T>
postgres_backend only.- expression. Read moreSource§fn intersection_range<T>(self, other: T) -> Intersection<Self, T>
fn intersection_range<T>(self, other: T) -> Intersection<Self, T>
postgres_backend only.* expression. Read moreSource§impl<T> PgTextExpressionMethods for T
impl<T> PgTextExpressionMethods for T
Source§fn ilike<T>(self, other: T) -> ILike<Self, T>where
T: AsExpression<Text>,
fn ilike<T>(self, other: T) -> ILike<Self, T>where
T: AsExpression<Text>,
postgres_backend only.ILIKE expression Read moreSource§fn not_ilike<T>(self, other: T) -> NotILike<Self, T>where
T: AsExpression<Text>,
fn not_ilike<T>(self, other: T) -> NotILike<Self, T>where
T: AsExpression<Text>,
postgres_backend only.NOT ILIKE expression Read moreSource§fn similar_to<T>(self, other: T) -> SimilarTo<Self, T>where
T: AsExpression<Text>,
fn similar_to<T>(self, other: T) -> SimilarTo<Self, T>where
T: AsExpression<Text>,
postgres_backend only.SIMILAR TO expression Read moreSource§fn not_similar_to<T>(self, other: T) -> NotSimilarTo<Self, T>where
T: AsExpression<Text>,
fn not_similar_to<T>(self, other: T) -> NotSimilarTo<Self, T>where
T: AsExpression<Text>,
postgres_backend only.NOT SIMILAR TO expression Read moreSource§fn is_json(self) -> IsJson<Self>
fn is_json(self) -> IsJson<Self>
postgres_backend only.IS JSON expression.
Requires PostgreSQL>=16 Read moreSource§fn is_not_json(self) -> IsNotJson<Self>
fn is_not_json(self) -> IsNotJson<Self>
postgres_backend only.IS NOT JSON expression.
Requires PostgreSQL>=16 Read moreSource§fn is_json_object(self) -> IsJsonObject<Self>
fn is_json_object(self) -> IsJsonObject<Self>
postgres_backend only.IS JSON OBJECT expression.
Requires PostgreSQL>=16 Read moreSource§fn is_not_json_object(self) -> IsNotJsonObject<Self>
fn is_not_json_object(self) -> IsNotJsonObject<Self>
postgres_backend only.IS NOT JSON OBJECT expression.
Requires PostgreSQL>=16 Read moreSource§fn is_json_array(self) -> IsJsonArray<Self>
fn is_json_array(self) -> IsJsonArray<Self>
postgres_backend only.IS JSON ARRAY expression.
Requires PostgreSQL>=16 Read moreSource§fn is_not_json_array(self) -> IsNotJsonArray<Self>
fn is_not_json_array(self) -> IsNotJsonArray<Self>
postgres_backend only.IS NOT JSON ARRAY expression.
Requires PostgreSQL>=16 Read moreSource§fn is_json_scalar(self) -> IsJsonScalar<Self>
fn is_json_scalar(self) -> IsJsonScalar<Self>
postgres_backend only.IS JSON SCALAR expression.
Requires PostgreSQL>=16 Read moreSource§fn is_not_json_scalar(self) -> IsNotJsonScalar<Self>
fn is_not_json_scalar(self) -> IsNotJsonScalar<Self>
postgres_backend only.IS NOT JSON SCALAR expression.
Requires PostgreSQL>=16 Read moreSource§impl<T> PgTimestampExpressionMethods for T
impl<T> PgTimestampExpressionMethods for T
Source§fn at_time_zone<T>(self, timezone: T) -> AtTimeZone<Self, T>where
T: AsExpression<VarChar>,
fn at_time_zone<T>(self, timezone: T) -> AtTimeZone<Self, T>where
T: AsExpression<VarChar>,
postgres_backend only.Source§impl<E> PreferredBoolSqlType for E
impl<E> PreferredBoolSqlType for E
Source§type PreferredSqlType = <E as Expression>::SqlType
type PreferredSqlType = <E as Expression>::SqlType
Bool SQL type for this AsExpression implementation. Read moreSource§impl<T, DB> QueryFragmentForCachedStatement<DB> for T
impl<T, DB> QueryFragmentForCachedStatement<DB> for T
Source§impl<T, Conn> RunQueryDsl<Conn> for Twhere
T: RunQueryDslSupport,
impl<T, Conn> RunQueryDsl<Conn> for Twhere
T: RunQueryDslSupport,
Source§fn execute(self, conn: &mut Conn) -> QueryResult<usize>where
Conn: Connection,
Self: ExecuteDsl<Conn>,
fn execute(self, conn: &mut Conn) -> QueryResult<usize>where
Conn: Connection,
Self: ExecuteDsl<Conn>,
Source§fn load<'query, U>(self, conn: &mut Conn) -> QueryResult<Vec<U>>where
Self: LoadQuery<'query, Conn, U>,
fn load<'query, U>(self, conn: &mut Conn) -> QueryResult<Vec<U>>where
Self: LoadQuery<'query, Conn, U>,
Source§fn load_iter<'conn, 'query: 'conn, U, B>(
self,
conn: &'conn mut Conn,
) -> QueryResult<Self::RowIter<'conn>>where
U: 'conn,
Self: LoadQuery<'query, Conn, U, B> + 'conn,
fn load_iter<'conn, 'query: 'conn, U, B>(
self,
conn: &'conn mut Conn,
) -> QueryResult<Self::RowIter<'conn>>where
U: 'conn,
Self: LoadQuery<'query, Conn, U, B> + 'conn,
Source§fn get_result<'query, U>(self, conn: &mut Conn) -> QueryResult<U>where
Self: LoadQuery<'query, Conn, U>,
fn get_result<'query, U>(self, conn: &mut Conn) -> QueryResult<U>where
Self: LoadQuery<'query, Conn, U>,
Source§fn get_results<'query, U>(self, conn: &mut Conn) -> QueryResult<Vec<U>>where
Self: LoadQuery<'query, Conn, U>,
fn get_results<'query, U>(self, conn: &mut Conn) -> QueryResult<Vec<U>>where
Self: LoadQuery<'query, Conn, U>,
Vec with the affected rows. Read moreSource§impl<T> SqliteAnyJsonExpressionMethods for T
impl<T> SqliteAnyJsonExpressionMethods for T
Source§fn retrieve_as_object_sqlite<T>(
self,
other: T,
) -> RetrieveAsObjectSqlite<Self, T>
fn retrieve_as_object_sqlite<T>( self, other: T, ) -> RetrieveAsObjectSqlite<Self, T>
__sqlite-shared only.-> expression. Read moreSource§impl<T> SqliteExpressionMethods for Twhere
T: Expression,
impl<T> SqliteExpressionMethods for Twhere
T: Expression,
Source§impl<T> TextExpressionMethods for T
impl<T> TextExpressionMethods for T
Source§fn concat<T>(self, other: T) -> Concat<Self, T>
fn concat<T>(self, other: T) -> Concat<Self, T>
|| operator. Read moreSource§fn collate<C>(self, collation: C) -> Collate<Self, C>where
C: Collation,
fn collate<C>(self, collation: C) -> Collate<Self, C>where
C: Collation,
COLLATE expression. Read more