Skip to main content

AliasedField

Struct AliasedField 

Source
pub struct AliasedField<S, F> { /* private fields */ }
Expand description

Represents an aliased field (column) within diesel’s query builder

See alias! for more details.

Trait Implementations§

Source§

impl<S, F, __Rhs> Add<__Rhs> for AliasedField<S, F>
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<AliasedField<S, F>, <__Rhs as AsExpression<<<AliasedField<S, F> as Expression>::SqlType as Add>::Rhs>>::Expression>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl<QS, S, C> AppearsOnTable<QS> for AliasedField<S, C>
where S: AliasSource, QS: AppearsInFromClause<Alias<S>, Count = Once>, C: QueryRelationField<QueryRelation = S::Target>,

Source§

impl<S: Clone, F: Clone> Clone for AliasedField<S, F>

Source§

fn clone(&self) -> AliasedField<S, F>

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<S: Copy, F: Copy> Copy for AliasedField<S, F>

Source§

impl<S: Debug, F: Debug> Debug for AliasedField<S, F>

Source§

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

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

impl<S, F, __Rhs> Div<__Rhs> for AliasedField<S, F>
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<AliasedField<S, F>, <__Rhs as AsExpression<<<AliasedField<S, F> as Expression>::SqlType as Div>::Rhs>>::Expression>

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl<S, C> Expression for AliasedField<S, C>
where S: AliasSource, C: QueryRelationField<QueryRelation = S::Target> + Expression,

Source§

type SqlType = <C as Expression>::SqlType

The type that this expression represents in SQL
Source§

impl<S, F, __Rhs> Mul<__Rhs> for AliasedField<S, F>
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<AliasedField<S, F>, <__Rhs as AsExpression<<<AliasedField<S, F> as Expression>::SqlType as Mul>::Rhs>>::Expression>

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl<S, C, DB> QueryFragment<DB> for AliasedField<S, C>
where S: AliasSource, DB: Backend, C: QueryRelationField<QueryRelation = S::Target>,

Source§

fn walk_ast<'b>(&'b self, pass: AstPass<'_, 'b, DB>) -> QueryResult<()>

Walk over this QueryFragment for all passes. Read more
Source§

fn to_sql(&self, out: &mut DB::QueryBuilder, backend: &DB) -> QueryResult<()>

Converts this QueryFragment to its SQL representation. Read more
Source§

fn collect_binds<'b>( &'b self, out: &mut DB::BindCollector<'b>, metadata_lookup: &mut DB::MetadataLookup, backend: &'b DB, ) -> QueryResult<()>

Serializes all bind parameters in this query. Read more
Source§

fn is_safe_to_cache_prepared(&self, backend: &DB) -> QueryResult<bool>

Is this query safe to store in the prepared statement cache? Read more
Source§

fn is_noop(&self, backend: &DB) -> QueryResult<bool>

Does walking this AST have any effect?
Source§

impl<S, C> QueryId for AliasedField<S, C>
where S: AliasSource + 'static, S::Target: 'static, C: QueryRelationField<QueryRelation = S::Target> + 'static + QueryId,

Source§

const HAS_STATIC_QUERY_ID: bool = <C as QueryId>::HAS_STATIC_QUERY_ID

Can the SQL generated by Self be uniquely identified by its type? Read more
Source§

type QueryId = AliasedField<S, C>

A type which uniquely represents Self in a SQL query. Read more
Source§

fn query_id() -> Option<TypeId>

Returns the type id of Self::QueryId if Self::HAS_STATIC_QUERY_ID. Returns None otherwise. Read more
Source§

impl<S, C> SelectableExpression<Alias<S>> for AliasedField<S, C>
where S: AliasSource, C: QueryRelationField<QueryRelation = S::Target>, Self: AppearsOnTable<Alias<S>>,

Source§

impl<S, F, __Rhs> Sub<__Rhs> for AliasedField<S, F>
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<AliasedField<S, F>, <__Rhs as AsExpression<<<AliasedField<S, F> as Expression>::SqlType as Sub>::Rhs>>::Expression>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl<S, C> ValidGrouping<()> for AliasedField<S, C>
where S: AliasSource, C: QueryRelationField<QueryRelation = S::Target>,

Source§

type IsAggregate = No

Is this expression aggregate? Read more
Source§

impl<S, C1, C2> ValidGrouping<AliasedField<S, C1>> for AliasedField<S, C2>
where S: AliasSource, C1: QueryRelationField<QueryRelation = S::Target>, C2: QueryRelationField<QueryRelation = S::Target> + ValidGrouping<C1, IsAggregate = Yes>,

Source§

type IsAggregate = Yes

Is this expression aggregate? Read more

Auto Trait Implementations§

§

impl<S, F> Freeze for AliasedField<S, F>
where PhantomData<S>: Freeze, F: Freeze,

§

impl<S, F> RefUnwindSafe for AliasedField<S, F>

§

impl<S, F> Send for AliasedField<S, F>
where PhantomData<S>: Send, F: Send,

§

impl<S, F> Sync for AliasedField<S, F>
where PhantomData<S>: Sync, F: Sync,

§

impl<S, F> Unpin for AliasedField<S, F>
where PhantomData<S>: Unpin, F: Unpin,

§

impl<S, F> UnsafeUnpin for AliasedField<S, F>

§

impl<S, F> UnwindSafe for AliasedField<S, F>

Blanket Implementations§

Source§

impl<T> AggregateExpressionMethods for T

Source§

fn aggregate_distinct(self) -> AggregateDistinct<Self>
where Self: DistinctDsl,

DISTINCT modifier for aggregate functions Read more
Source§

fn aggregate_all(self) -> AggregateAll<Self>
where Self: AllDsl,

ALL modifier for aggregate functions Read more
Source§

fn aggregate_filter<P>(self, f: P) -> AggregateFilter<Self, P>
where P: AsExpression<Bool>, Self: FilterDsl<P::Expression>,

Add an aggregate function filter Read more
Source§

fn aggregate_order<O>(self, o: O) -> AggregateOrder<Self, O>
where Self: OrderAggregateDsl<O>,

Add an aggregate function order Read more
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> AnyJsonExpressionMethods for T
where T: Expression, <T as Expression>::SqlType: JsonOrNullableJsonOrJsonbOrNullableJsonb,

Source§

fn retrieve_as_text<T>(self, other: T) -> RetrieveAsText<Self, T>
where T: JsonIndex, <T::Expression as Expression>::SqlType: SqlType,

Available on crate features __sqlite-shared or postgres_backend only.
Creates a ->> expression JSON. Read more
Source§

impl<T, ST> AsExpression<ST> for T
where T: Expression<SqlType = ST>, ST: SqlType + TypedExpressionType,

Source§

type Expression = T

The expression being returned
Source§

fn as_expression(self) -> T

Perform the conversion
Source§

impl<T, ST> AsExpressionList<ST> for T

Source§

type Expression = <T as IntoArrayExpression<ST>>::ArrayExpression

👎Deprecated:

Use IntoArrayExpression instead

Available on crate feature with-deprecated and non-crate feature without-deprecated only.
The final output expression
Source§

fn as_expression_list(self) -> <T as AsExpressionList<ST>>::Expression

👎Deprecated:

Use IntoArrayExpression instead

Available on crate feature with-deprecated and non-crate feature without-deprecated only.
Perform the conversion
Source§

impl<T> BoolExpressionMethods for T

Source§

fn and<T, ST>(self, other: T) -> And<Self, T, ST>

Creates a SQL AND expression Read more
Source§

fn or<T, ST>(self, other: T) -> Or<Self, T, ST>

Creates a SQL OR expression 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<QS, T, DB, GB, IsAggregate> BoxableExpression<QS, DB, GB, IsAggregate> for T
where 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 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<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Converts 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>

Converts 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)

Converts &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)

Converts &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
where T: Any + Send,

Source§

fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>

Converts Box<Trait> (where Trait: DowncastSend) to Box<dyn Any + Send>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

impl<Conn, DB, T> ExecuteDsl<Conn, DB> for T
where Conn: Connection<Backend = DB>, DB: Backend, T: QueryFragment<DB> + QueryId,

Source§

fn execute(query: T, conn: &mut Conn) -> Result<usize, Error>

Execute this command
Source§

impl<T> ExpressionMethods for T

Source§

fn eq<T>(self, other: T) -> Eq<Self, T>
where Self::SqlType: SqlType, T: AsExpression<Self::SqlType>,

Creates a SQL = expression. Read more
Source§

fn ne<T>(self, other: T) -> NotEq<Self, T>
where Self::SqlType: SqlType, T: AsExpression<Self::SqlType>,

Creates a SQL != expression. Read more
Source§

fn eq_any<T>(self, values: T) -> EqAny<Self, T>
where Self::SqlType: SqlType, T: AsInExpression<Self::SqlType>,

Creates a SQL IN statement. Read more
Source§

fn ne_all<T>(self, values: T) -> NeAny<Self, T>
where Self::SqlType: SqlType, T: AsInExpression<Self::SqlType>,

Creates a SQL NOT IN statement. Read more
Source§

fn is_null(self) -> IsNull<Self>

Creates a SQL IS NULL expression. Read more
Source§

fn is_not_null(self) -> IsNotNull<Self>

Creates a SQL IS NOT NULL expression. Read more
Source§

fn gt<T>(self, other: T) -> Gt<Self, T>
where Self::SqlType: SqlType, T: AsExpression<Self::SqlType>,

Creates a SQL > expression. Read more
Source§

fn ge<T>(self, other: T) -> GtEq<Self, T>
where Self::SqlType: SqlType, T: AsExpression<Self::SqlType>,

Creates a SQL >= expression. Read more
Source§

fn lt<T>(self, other: T) -> Lt<Self, T>
where Self::SqlType: SqlType, T: AsExpression<Self::SqlType>,

Creates a SQL < expression. Read more
Source§

fn le<T>(self, other: T) -> LtEq<Self, T>
where Self::SqlType: SqlType, T: AsExpression<Self::SqlType>,

Creates a SQL <= expression. Read more
Source§

fn between<T, U>(self, lower: T, upper: U) -> Between<Self, T, U>
where Self::SqlType: SqlType, T: AsExpression<Self::SqlType>, U: AsExpression<Self::SqlType>,

Creates a SQL BETWEEN expression using the given lower and upper bounds. Read more
Source§

fn not_between<T, U>(self, lower: T, upper: U) -> NotBetween<Self, T, U>
where Self::SqlType: SqlType, T: AsExpression<Self::SqlType>, U: AsExpression<Self::SqlType>,

Creates a SQL NOT BETWEEN expression using the given lower and upper bounds. Read more
Source§

fn cast<ST>(self) -> Cast<Self, ST>
where ST: SingleValue, Self::SqlType: CastsTo<ST>,

Generates a CAST(expr AS sql_type) expression Read more
Source§

fn fallible_cast<ST>(self) -> Cast<Self, ST>
where ST: SingleValue, Self::SqlType: FallibleCastsTo<ST>,

Generates a CAST(expr AS sql_type) expression, this version does not check the castability, like cast(). Read more
Source§

fn desc(self) -> Desc<Self>

Creates a SQL DESC expression, representing this expression in descending order. Read more
Source§

fn asc(self) -> Asc<Self>

Creates a SQL ASC expression, representing this expression in ascending order. 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<ST, T> IntoArrayExpression<ST> for T
where T: AsExpression<Array<ST>>, ST: SqlType + TypedExpressionType + 'static,

Source§

type ArrayExpression = <T as AsExpression<Array<ST>>>::Expression

Available on crate feature postgres_backend only.
Type of the expression returned by IntoArrayExpression::into_array_expression
Source§

fn into_array_expression( self, ) -> <T as IntoArrayExpression<ST>>::ArrayExpression

Available on crate feature postgres_backend only.
Construct the diesel query dsl representation of the ARRAY (values) clause for the given type
Source§

impl<T> IntoSql for T

Source§

fn into_sql<T>(self) -> AsExprOf<Self, T>

Convert self to an expression for Diesel’s query builder. Read more
Source§

fn as_sql<'a, T>(&'a self) -> AsExprOf<&'a Self, T>
where &'a Self: AsExpression<T>, T: SqlType + TypedExpressionType,

Convert &self to an expression for Diesel’s query builder. Read more
Source§

impl<T> JsonIndex for T
where T: Expression, <T as Expression>::SqlType: TextOrInteger,

Source§

type Expression = T

Source§

fn into_json_index_expression(self) -> <T as JsonIndex>::Expression

Source§

impl<T> NonAggregate for T
where T: ValidGrouping<()>, <T as ValidGrouping<()>>::IsAggregate: MixedAggregates<No, Output = No>,

Source§

impl<T> NullableExpressionMethods for T
where T: Expression,

Source§

fn nullable(self) -> Nullable<Self>

Converts this potentially non-null expression into one which is treated as nullable. This method has no impact on the generated SQL, and is only used to allow certain comparisons that would otherwise fail to compile. Read more
Source§

fn assume_not_null(self) -> AssumeNotNull<Self>

Converts this potentially nullable expression into one which will be assumed to be not-null. This method has no impact on the generated SQL, however it will enable you to attempt deserialization of the returned value in a non-Option. Read more
Source§

impl<T> PgAnyJsonExpressionMethods for T
where T: Expression, <T as Expression>::SqlType: JsonOrNullableJsonOrJsonbOrNullableJsonb,

Source§

fn retrieve_as_object<T>(self, other: T) -> RetrieveAsObject<Self, T>
where T: JsonIndex, <T::Expression as Expression>::SqlType: SqlType,

Available on crate feature postgres_backend only.
Creates a PostgreSQL -> expression. Read more
Source§

fn retrieve_by_path_as_object<T>( self, other: T, ) -> RetrieveByPathAsObjectJson<Self, T::Expression>
where T: AsExpression<Array<Text>>,

Available on crate feature postgres_backend only.
Creates a PostgreSQL #> expression. Read more
Source§

fn retrieve_by_path_as_text<T>( self, other: T, ) -> RetrieveByPathAsTextJson<Self, T::Expression>
where T: AsExpression<Array<Text>>,

Available on crate feature postgres_backend only.
Creates a PostgreSQL #>> expression. Read more
Source§

impl<T> PgArrayExpressionMethods for T
where T: Expression, <T as Expression>::SqlType: ArrayOrNullableArray,

Source§

fn overlaps_with<T>(self, other: T) -> OverlapsWith<Self, T>
where Self::SqlType: SqlType, T: AsExpression<Self::SqlType>,

Available on crate feature postgres_backend only.
Creates a PostgreSQL && expression. Read more
Source§

fn contains<T>(self, other: T) -> Contains<Self, T>
where Self::SqlType: SqlType, T: AsExpression<Self::SqlType>,

Available on crate feature postgres_backend only.
Creates a PostgreSQL @> expression. Read more
Source§

fn is_contained_by<T>(self, other: T) -> IsContainedBy<Self, T>
where Self::SqlType: SqlType, T: AsExpression<Self::SqlType>,

Available on crate feature postgres_backend only.
Creates a PostgreSQL <@ expression. Read more
Source§

fn index<T>(self, other: T) -> Index<Self, T>
where Self::SqlType: SqlType, T: AsExpression<Integer>,

Available on crate feature postgres_backend only.
Indexes a PostgreSQL array. Read more
Source§

fn index_nullable<T>(self, other: T) -> IndexNullable<Self, T>

Available on crate feature postgres_backend only.
Indexes a PostgreSQL array. This is the same as PgArrayExpressionMethods::index but takes a nullable expression for the parameter. Read more
Source§

fn slice<T1, T2>(self, start: T1, end: T2) -> Slice<Self, T1, T2>

Available on crate feature postgres_backend only.
Indexes a PostgreSQL array with the slice delimited by the given indexes. Read more
Source§

fn slice_nullable<T1, T2>( self, start: T1, end: T2, ) -> SliceNullable<Self, T1, T2>

Available on crate feature postgres_backend only.
Indexes a PostgreSQL array with the slice delimited by the given indexes. This is the same as PgArrayExpressionMethods::slice but takes nullable expressions for the parameters. Read more
Source§

fn slice_from<T>(self, start: T) -> SliceFrom<Self, T>
where Self::SqlType: SqlType, T: AsExpression<Integer>,

Available on crate feature postgres_backend only.
Indexes a PostgreSQL array with the slice starting from the given index. Read more
Source§

fn slice_from_nullable<T>(self, start: T) -> SliceFromNullable<Self, T>

Available on crate feature postgres_backend only.
Indexes a PostgreSQL array with the slice starting from the given index. This is the same as PgArrayExpressionMethods::slice_from but takes a nullable expression for the parameter. Read more
Source§

fn slice_to<T>(self, end: T) -> SliceTo<Self, T>
where Self::SqlType: SqlType, T: AsExpression<Integer>,

Available on crate feature postgres_backend only.
Indexes a PostgreSQL array with the slice ending with the given index. Read more
Source§

fn slice_to_nullable<T>(self, end: T) -> SliceToNullable<Self, T>

Available on crate feature postgres_backend only.
Indexes a PostgreSQL array with the slice ending with the given index. This is the same as PgArrayExpressionMethods::slice_to but takes a nullable expression for the parameter. Read more
Source§

fn concat<T>(self, other: T) -> Concat<Self, T>
where Self::SqlType: SqlType, T: AsExpression<Self::SqlType>,

Available on crate feature postgres_backend only.
Creates a PostgreSQL || expression. Read more
Source§

impl<T> PgBinaryExpressionMethods for T
where T: Expression, <T as Expression>::SqlType: BinaryOrNullableBinary,

Source§

fn concat<T>(self, other: T) -> Concat<Self, T>
where Self::SqlType: SqlType, T: AsExpression<Self::SqlType>,

Available on crate feature postgres_backend only.
Concatenates two PostgreSQL byte arrays using the || operator. Read more
Source§

fn like<T>(self, other: T) -> Like<Self, T>
where Self::SqlType: SqlType, T: AsExpression<Self::SqlType>,

Available on crate feature postgres_backend only.
Creates a PostgreSQL binary LIKE expression. Read more
Source§

fn not_like<T>(self, other: T) -> NotLike<Self, T>
where Self::SqlType: SqlType, T: AsExpression<Self::SqlType>,

Available on crate feature postgres_backend only.
Creates a PostgreSQL binary LIKE expression. Read more
Source§

impl<T> PgExpressionMethods for T
where T: Expression,

Source§

fn is_not_distinct_from<T>(self, other: T) -> IsNotDistinctFrom<Self, T>
where Self::SqlType: SqlType, T: AsExpression<Self::SqlType>,

Available on crate feature postgres_backend only.
Creates a PostgreSQL IS NOT DISTINCT FROM expression. Read more
Source§

fn is_distinct_from<T>(self, other: T) -> IsDistinctFrom<Self, T>
where Self::SqlType: SqlType, T: AsExpression<Self::SqlType>,

Available on crate feature postgres_backend only.
Creates a PostgreSQL IS DISTINCT FROM expression. Read more
Source§

fn is_contained_by_range<T>(self, other: T) -> IsContainedByRange<Self, T>
where Self::SqlType: SqlType, T: AsExpression<Range<Self::SqlType>>,

Available on crate feature postgres_backend only.
Creates a PostgreSQL <@ expression. Read more
Source§

impl<T> PgJsonbExpressionMethods for T
where T: Expression, <T as Expression>::SqlType: JsonbOrNullableJsonb,

Source§

fn concat<T>(self, other: T) -> Concat<Self, T>
where Self::SqlType: SqlType, T: AsExpression<Self::SqlType>,

Available on crate feature postgres_backend only.
Creates a PostgreSQL || expression. Read more
Source§

fn has_key<T>(self, other: T) -> HasKeyJsonb<Self, T>

Available on crate feature postgres_backend only.
Creates a PostgreSQL ? expression. Read more
Source§

fn has_any_key<T>(self, other: T) -> HasAnyKeyJsonb<Self, T>

Available on crate feature postgres_backend only.
Creates a PostgreSQL ?| expression. Read more
Source§

fn has_all_keys<T>(self, other: T) -> HasAllKeysJsonb<Self, T>

Available on crate feature postgres_backend only.
Creates a PostgreSQL ?& expression. Read more
Source§

fn contains<T>(self, other: T) -> Contains<Self, T>
where Self::SqlType: SqlType, T: AsExpression<Self::SqlType>,

Available on crate feature postgres_backend only.
Creates a PostgreSQL @> expression. Read more
Source§

fn is_contained_by<T>(self, other: T) -> IsContainedBy<Self, T>
where Self::SqlType: SqlType, T: AsExpression<Self::SqlType>,

Available on crate feature postgres_backend only.
Creates a PostgreSQL <@ expression. Read more
Source§

fn remove<T>( self, other: T, ) -> RemoveFromJsonb<Self, T::Expression, <T::Expression as Expression>::SqlType>
where T: JsonRemoveIndex, <T::Expression as Expression>::SqlType: SqlType,

Available on crate feature postgres_backend only.
Creates a PostgreSQL - expression. Read more
Source§

fn remove_by_path<T>( self, other: T, ) -> RemoveByPathFromJsonb<Self, T::Expression>
where T: AsExpression<Array<Text>>,

Available on crate feature postgres_backend only.
Creates a PostgreSQL #- expression. Read more
Source§

impl<T> PgNetExpressionMethods for T
where T: Expression, <T as Expression>::SqlType: InetOrCidr,

Source§

fn contains<T>(self, other: T) -> ContainsNet<Self, T>
where T: AsExpression<Inet>,

Available on crate feature postgres_backend only.
Creates a PostgreSQL >> expression. Read more
Source§

fn contains_or_eq<T>(self, other: T) -> ContainsNetLoose<Self, T>
where T: AsExpression<Inet>,

Available on crate feature postgres_backend only.
Creates a PostgreSQL >>= expression. Read more
Source§

fn is_contained_by<T>(self, other: T) -> IsContainedByNet<Self, T>
where T: AsExpression<Inet>,

Available on crate feature postgres_backend only.
Creates a PostgreSQL << expression. Read more
Source§

fn is_contained_by_or_eq<T>(self, other: T) -> IsContainedByNetLoose<Self, T>
where T: AsExpression<Inet>,

Available on crate feature postgres_backend only.
Creates a PostgreSQL `<<= expression. Read more
Source§

fn overlaps_with<T>(self, other: T) -> OverlapsWithNet<Self, T>
where T: AsExpression<Inet>,

Available on crate feature postgres_backend only.
Creates a PostgreSQL && expression. Read more
Source§

fn and<T>(self, other: T) -> AndNet<Self, T>
where T: AsExpression<Inet>,

Available on crate feature postgres_backend only.
Creates a PostgreSQL & expression. Read more
Source§

fn or<T>(self, other: T) -> OrNet<Self, T>
where T: AsExpression<Inet>,

Available on crate feature postgres_backend only.
Creates a PostgreSQL | expression. Read more
Source§

fn diff<T>(self, other: T) -> DifferenceNet<Self, T>
where T: AsExpression<Inet>,

Available on crate feature postgres_backend only.
Creates a PostgreSQL - expression. Read more
Source§

impl<T> PgRangeExpressionMethods for T
where T: Expression, <T as Expression>::SqlType: MultirangeOrRangeMaybeNullable,

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>,

Available on crate feature postgres_backend only.
Creates a PostgreSQL @> expression. Read more
Source§

fn contains_range<T>(self, other: T) -> ContainsRange<Self, T>
where Self::SqlType: SqlType, T: AsExpression<Self::SqlType>,

Available on crate feature postgres_backend only.
Creates a PostgreSQL @> expression. Read more
Source§

fn is_contained_by<T>(self, other: T) -> IsContainedBy<Self, T>
where Self::SqlType: SqlType, T: AsExpression<Self::SqlType>,

Available on crate feature postgres_backend only.
Creates a PostgreSQL <@ expression. Read more
Source§

fn overlaps_with<T>(self, other: T) -> OverlapsWith<Self, T>
where Self::SqlType: SqlType, T: AsExpression<Self::SqlType>,

Available on crate feature postgres_backend only.
Creates a PostgreSQL && expression. Read more
Source§

fn range_extends_right_to<T>(self, other: T) -> RangeExtendsRightTo<Self, T>
where Self::SqlType: SqlType, T: AsExpression<Self::SqlType>,

Available on crate feature postgres_backend only.
Creates a PostgreSQL &< expression. Read more
Source§

fn range_extends_left_to<T>(self, other: T) -> RangeExtendsLeftTo<Self, T>
where Self::SqlType: SqlType, T: AsExpression<Self::SqlType>,

Available on crate feature postgres_backend only.
Creates a PostgreSQL &> expression. Read more
Source§

fn lesser_than<T>(self, other: T) -> LesserThanRange<Self, T>
where Self::SqlType: SqlType, T: AsExpression<Self::SqlType>,

Available on crate feature postgres_backend only.
Creates a PostgreSQL << expression. Read more
Source§

fn greater_than<T>(self, other: T) -> GreaterThanRange<Self, T>
where Self::SqlType: SqlType, T: AsExpression<Self::SqlType>,

Available on crate feature postgres_backend only.
Creates a PostgreSQL >> expression. Read more
Source§

fn range_adjacent<T>(self, other: T) -> RangeAdjacent<Self, T>
where Self::SqlType: SqlType, T: AsExpression<Self::SqlType>,

Available on crate feature postgres_backend only.
Creates a PostgreSQL -|- expression. Read more
Source§

fn union_range<T>(self, other: T) -> UnionRange<Self, T>
where Self::SqlType: SqlType, T: AsExpression<Self::SqlType>,

Available on crate feature postgres_backend only.
Creates a PostgreSQL + expression. Read more
Source§

fn difference_range<T>(self, other: T) -> Difference<Self, T>
where Self::SqlType: SqlType, T: AsExpression<Self::SqlType>,

Available on crate feature postgres_backend only.
Creates a PostgreSQL - expression. Read more
Source§

fn intersection_range<T>(self, other: T) -> Intersection<Self, T>
where Self::SqlType: SqlType, T: AsExpression<Self::SqlType>,

Available on crate feature postgres_backend only.
Creates a PostgreSQL * expression. Read more
Source§

impl<T> PgTextExpressionMethods for T
where T: Expression, <T as Expression>::SqlType: TextOrNullableText,

Source§

fn ilike<T>(self, other: T) -> ILike<Self, T>
where T: AsExpression<Text>,

Available on crate feature postgres_backend only.
Creates a PostgreSQL ILIKE expression Read more
Source§

fn not_ilike<T>(self, other: T) -> NotILike<Self, T>
where T: AsExpression<Text>,

Available on crate feature postgres_backend only.
Creates a PostgreSQL NOT ILIKE expression Read more
Source§

fn similar_to<T>(self, other: T) -> SimilarTo<Self, T>
where T: AsExpression<Text>,

Available on crate feature postgres_backend only.
Creates a PostgreSQL SIMILAR TO expression Read more
Source§

fn not_similar_to<T>(self, other: T) -> NotSimilarTo<Self, T>
where T: AsExpression<Text>,

Available on crate feature postgres_backend only.
Creates a PostgreSQL NOT SIMILAR TO expression Read more
Source§

fn is_json(self) -> IsJson<Self>

Available on crate feature postgres_backend only.
Creates a PostgreSQL IS JSON expression. Requires PostgreSQL>=16 Read more
Source§

fn is_not_json(self) -> IsNotJson<Self>

Available on crate feature postgres_backend only.
Creates a PostgreSQL IS NOT JSON expression. Requires PostgreSQL>=16 Read more
Source§

fn is_json_object(self) -> IsJsonObject<Self>

Available on crate feature postgres_backend only.
Creates a PostgreSQL IS JSON OBJECT expression. Requires PostgreSQL>=16 Read more
Source§

fn is_not_json_object(self) -> IsNotJsonObject<Self>

Available on crate feature postgres_backend only.
Creates a PostgreSQL IS NOT JSON OBJECT expression. Requires PostgreSQL>=16 Read more
Source§

fn is_json_array(self) -> IsJsonArray<Self>

Available on crate feature postgres_backend only.
Creates a PostgreSQL IS JSON ARRAY expression. Requires PostgreSQL>=16 Read more
Source§

fn is_not_json_array(self) -> IsNotJsonArray<Self>

Available on crate feature postgres_backend only.
Creates a PostgreSQL IS NOT JSON ARRAY expression. Requires PostgreSQL>=16 Read more
Source§

fn is_json_scalar(self) -> IsJsonScalar<Self>

Available on crate feature postgres_backend only.
Creates a PostgreSQL IS JSON SCALAR expression. Requires PostgreSQL>=16 Read more
Source§

fn is_not_json_scalar(self) -> IsNotJsonScalar<Self>

Available on crate feature postgres_backend only.
Creates a PostgreSQL IS NOT JSON SCALAR expression. Requires PostgreSQL>=16 Read more
Source§

impl<T> PgTimestampExpressionMethods for T
where T: Expression, <T as Expression>::SqlType: DateTimeLike,

Source§

fn at_time_zone<T>(self, timezone: T) -> AtTimeZone<Self, T>

Available on crate feature postgres_backend only.
Creates a PostgreSQL “AT TIME ZONE” expression. Read more
Source§

impl<E> PreferredBoolSqlType for E

Source§

type PreferredSqlType = <E as Expression>::SqlType

The preferred Bool SQL type for this AsExpression implementation. Read more
Source§

impl<T, DB> QueryFragmentForCachedStatement<DB> for T
where DB: Backend, <DB as Backend>::QueryBuilder: Default, T: QueryFragment<DB>,

Source§

fn construct_sql(&self, backend: &DB) -> Result<String, Error>

Available on crate feature i-implement-a-third-party-backend-and-opt-into-breaking-changes only.
Convert the query fragment into a SQL string for the given backend
Source§

fn is_safe_to_cache_prepared(&self, backend: &DB) -> Result<bool, Error>

Available on crate feature i-implement-a-third-party-backend-and-opt-into-breaking-changes only.
Check whether it’s safe to cache the query
Source§

impl<T> SqliteAnyJsonExpressionMethods for T
where T: Expression, <T as Expression>::SqlType: JsonOrNullableJsonOrJsonbOrNullableJsonb,

Source§

fn retrieve_as_object_sqlite<T>( self, other: T, ) -> RetrieveAsObjectSqlite<Self, T>
where T: JsonIndex, <T::Expression as Expression>::SqlType: SqlType,

Available on crate feature __sqlite-shared only.
Creates a SQLite -> expression. Read more
Source§

impl<T> SqliteExpressionMethods for T
where T: Expression,

Source§

fn is<T>(self, other: T) -> Is<Self, T>
where Self::SqlType: SqlType, T: AsExpression<Self::SqlType>,

Available on crate feature __sqlite-shared only.
Creates a Sqlite IS expression. Read more
Source§

fn is_not<T>(self, other: T) -> IsNot<Self, T>
where Self::SqlType: SqlType, T: AsExpression<Self::SqlType>,

Available on crate feature __sqlite-shared only.
Creates a Sqlite IS NOT expression. Read more
Source§

impl<T> TextExpressionMethods for T
where T: Expression, <T as Expression>::SqlType: TextOrNullableText,

Source§

fn concat<T>(self, other: T) -> Concat<Self, T>
where Self::SqlType: SqlType, T: AsExpression<Self::SqlType>,

Concatenates two strings using the || operator. Read more
Source§

fn collate<C>(self, collation: C) -> Collate<Self, C>
where C: Collation,

Returns a SQL COLLATE expression. Read more
Source§

fn like<T>(self, other: T) -> Like<Self, T>
where Self::SqlType: SqlType, T: AsExpression<Self::SqlType>,

Returns a SQL LIKE expression Read more
Source§

fn not_like<T>(self, other: T) -> NotLike<Self, T>
where Self::SqlType: SqlType, T: AsExpression<Self::SqlType>,

Returns a SQL NOT LIKE expression Read more
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, 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, <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> UntypedExpressionMethods for T
where T: Expression<SqlType = Untyped>,

Source§

fn is_null(self) -> IsNull<Self>

Creates a SQL IS NULL expression. Read more
Source§

fn is_not_null(self) -> IsNotNull<Self>

Creates a SQL IS NOT NULL expression. Read more
Source§

fn desc(self) -> Desc<Self>

Creates a SQL DESC expression, representing this expression in descending order. Read more
Source§

fn asc(self) -> Asc<Self>

Creates a SQL ASC expression, representing this expression in ascending order. Read more
Source§

impl<T> WindowExpressionMethods for T

Source§

fn over(self) -> Over<Self>
where Self: OverDsl,

Turn a function call into a window function call Read more
Source§

fn window_filter<P>(self, f: P) -> WindowFilter<Self, P>
where P: AsExpression<Bool>, Self: FilterDsl<P::Expression>,

Add a filter to the current window function Read more
Source§

fn partition_by<E>(self, expr: E) -> PartitionBy<Self, E>
where Self: PartitionByDsl<E>,

Add a partition clause to the current window function Read more
Source§

fn window_order<E>(self, expr: E) -> WindowOrder<Self, E>
where Self: OrderWindowDsl<E>,

Add a order clause to the current window function Read more
Source§

fn frame_by<E>(self, expr: E) -> FrameBy<Self, E>
where Self: FrameDsl<E>,

Add a frame clause to the current window function Read more