use crate::dsl::{AsExpr, AsExprOf, SqlTypeOf};
use crate::expression::grouped::Grouped;
use crate::expression::Expression;
use crate::pg::expression::expression_methods::private::{JsonIndex, JsonRemoveIndex};
use crate::pg::types::sql_types::Array;
use crate::sql_types::{Inet, Integer, VarChar};
#[cfg(feature = "postgres_backend")]
pub type ILike<Lhs, Rhs> = Grouped<super::operators::ILike<Lhs, AsExprOf<Rhs, VarChar>>>;
#[doc(hidden)] pub type Ilike<Lhs, Rhs> = ILike<Lhs, Rhs>;
#[cfg(feature = "postgres_backend")]
pub type NotILike<Lhs, Rhs> = Grouped<super::operators::NotILike<Lhs, AsExprOf<Rhs, VarChar>>>;
#[doc(hidden)] pub type NotIlike<Lhs, Rhs> = NotILike<Lhs, Rhs>;
#[cfg(feature = "postgres_backend")]
pub type SimilarTo<Lhs, Rhs> = Grouped<super::operators::SimilarTo<Lhs, AsExprOf<Rhs, VarChar>>>;
#[cfg(feature = "postgres_backend")]
pub type NotSimilarTo<Lhs, Rhs> =
Grouped<super::operators::NotSimilarTo<Lhs, AsExprOf<Rhs, VarChar>>>;
#[cfg(feature = "postgres_backend")]
pub type IsNotDistinctFrom<Lhs, Rhs> =
Grouped<super::operators::IsNotDistinctFrom<Lhs, AsExpr<Rhs, Lhs>>>;
#[cfg(feature = "postgres_backend")]
pub type IsDistinctFrom<Lhs, Rhs> =
Grouped<super::operators::IsDistinctFrom<Lhs, AsExpr<Rhs, Lhs>>>;
#[cfg(feature = "postgres_backend")]
pub type OverlapsWith<Lhs, Rhs> = Grouped<super::operators::OverlapsWith<Lhs, AsExpr<Rhs, Lhs>>>;
#[cfg(feature = "postgres_backend")]
pub type Contains<Lhs, Rhs> = Grouped<super::operators::Contains<Lhs, AsExpr<Rhs, Lhs>>>;
#[doc(hidden)]
#[deprecated(note = "Use `Contains` instead")]
pub type ArrayContains<Lhs, Rhs> = Contains<Lhs, Rhs>;
#[cfg(feature = "postgres_backend")]
pub type RangeContains<Lhs, Rhs> = Grouped<
super::operators::Contains<
Lhs,
AsExprOf<Rhs, <SqlTypeOf<Lhs> as super::expression_methods::RangeHelper>::Inner>,
>,
>;
#[cfg(feature = "postgres_backend")]
pub type RangeExtendsRightTo<Lhs, Rhs> =
Grouped<super::operators::ExtendsRightTo<Lhs, AsExpr<Rhs, Lhs>>>;
#[cfg(feature = "postgres_backend")]
pub type RangeExtendsLeftTo<Lhs, Rhs> =
Grouped<super::operators::ExtendsLeftTo<Lhs, AsExpr<Rhs, Lhs>>>;
#[cfg(feature = "postgres_backend")]
pub type ContainsRange<Lhs, Rhs> = Contains<Lhs, Rhs>;
#[cfg(feature = "postgres_backend")]
pub type IsContainedBy<Lhs, Rhs> = Grouped<super::operators::IsContainedBy<Lhs, AsExpr<Rhs, Lhs>>>;
#[cfg(feature = "postgres_backend")]
pub type IsContainedByRange<Lhs, Rhs> = Grouped<
super::operators::IsContainedBy<Lhs, AsExprOf<Rhs, diesel::sql_types::Range<SqlTypeOf<Lhs>>>>,
>;
#[cfg(feature = "postgres_backend")]
pub type LesserThanRange<Lhs, Rhs> =
Grouped<super::operators::IsContainedByNet<Lhs, AsExpr<Rhs, Lhs>>>;
#[doc(hidden)] pub type LesserThan<Lhs, Rhs> = LesserThanRange<Lhs, Rhs>;
#[cfg(feature = "postgres_backend")]
pub type GreaterThanRange<Lhs, Rhs> = Grouped<super::operators::ContainsNet<Lhs, AsExpr<Rhs, Lhs>>>;
#[doc(hidden)] pub type GreaterThan<Lhs, Rhs> = GreaterThanRange<Lhs, Rhs>;
#[cfg(feature = "postgres_backend")]
pub type UnionRange<Lhs, Rhs> = Grouped<super::operators::UnionsRange<Lhs, AsExpr<Rhs, Lhs>>>;
#[cfg(feature = "postgres_backend")]
pub type Difference<Lhs, Rhs> = Grouped<super::operators::DifferenceRange<Lhs, AsExpr<Rhs, Lhs>>>;
#[doc(hidden)] pub type DifferenceRange<Lhs, Rhs> = Difference<Lhs, Rhs>;
#[cfg(feature = "postgres_backend")]
pub type RangeAdjacent<Lhs, Rhs> = Grouped<super::operators::RangeAdjacent<Lhs, AsExpr<Rhs, Lhs>>>;
#[cfg(feature = "postgres_backend")]
pub type Intersection<Lhs, Rhs> =
Grouped<super::operators::IntersectionRange<Lhs, AsExpr<Rhs, Lhs>>>;
#[doc(hidden)] pub type IntersectionRange<Lhs, Rhs> = Intersection<Lhs, Rhs>;
#[cfg(feature = "postgres_backend")]
pub type NullsFirst<T> = super::operators::NullsFirst<T>;
#[cfg(feature = "postgres_backend")]
pub type NullsLast<T> = super::operators::NullsLast<T>;
#[cfg(feature = "postgres_backend")]
pub type AtTimeZone<Lhs, Rhs> =
Grouped<super::date_and_time::AtTimeZone<Lhs, AsExprOf<Rhs, VarChar>>>;
#[cfg(feature = "postgres_backend")]
pub type ContainsNet<Lhs, Rhs> = Grouped<super::operators::ContainsNet<Lhs, AsExprOf<Rhs, Inet>>>;
#[cfg(feature = "postgres_backend")]
pub type ContainsNetLoose<Lhs, Rhs> =
Grouped<super::operators::ContainsNetLoose<Lhs, AsExprOf<Rhs, Inet>>>;
#[doc(hidden)] pub type ContainsOrEq<Lhs, Rhs> = ContainsNetLoose<Lhs, Rhs>;
#[cfg(feature = "postgres_backend")]
pub type IsContainedByNet<Lhs, Rhs> =
Grouped<super::operators::IsContainedByNet<Lhs, AsExprOf<Rhs, Inet>>>;
#[cfg(feature = "postgres_backend")]
pub type IsContainedByNetLoose<Lhs, Rhs> =
Grouped<super::operators::IsContainedByNetLoose<Lhs, AsExprOf<Rhs, Inet>>>;
#[doc(hidden)] pub type IsContainedByOrEq<Lhs, Rhs> = IsContainedByNetLoose<Lhs, Rhs>;
#[cfg(feature = "postgres_backend")]
pub type OverlapsWithNet<Lhs, Rhs> =
Grouped<super::operators::OverlapsWith<Lhs, AsExprOf<Rhs, Inet>>>;
#[cfg(feature = "postgres_backend")]
pub type AndNet<Lhs, Rhs> = Grouped<super::operators::AndNet<Lhs, AsExprOf<Rhs, Inet>>>;
#[cfg(feature = "postgres_backend")]
pub type OrNet<Lhs, Rhs> = Grouped<super::operators::OrNet<Lhs, AsExprOf<Rhs, Inet>>>;
#[cfg(feature = "postgres_backend")]
pub type DifferenceNet<Lhs, Rhs> =
Grouped<super::operators::DifferenceNet<Lhs, AsExprOf<Rhs, Inet>>>;
#[doc(hidden)] pub type Diff<Lhs, Rhs> = DifferenceNet<Lhs, Rhs>;
#[doc(hidden)]
#[deprecated(note = "Use `dsl::Concat` instead")]
pub type ConcatJsonb<Lhs, Rhs> = crate::dsl::Concat<Lhs, Rhs>;
#[cfg(feature = "postgres_backend")]
pub type HasKeyJsonb<Lhs, Rhs> =
Grouped<super::operators::HasKeyJsonb<Lhs, AsExprOf<Rhs, VarChar>>>;
#[doc(hidden)] pub type HasKey<Lhs, Rhs> = HasKeyJsonb<Lhs, Rhs>;
#[cfg(feature = "postgres_backend")]
pub type HasAnyKeyJsonb<Lhs, Rhs> =
Grouped<super::operators::HasAnyKeyJsonb<Lhs, AsExprOf<Rhs, Array<VarChar>>>>;
#[doc(hidden)] pub type HasAnyKey<Lhs, Rhs> = HasAnyKeyJsonb<Lhs, Rhs>;
#[cfg(feature = "postgres_backend")]
pub type HasAllKeysJsonb<Lhs, Rhs> =
Grouped<super::operators::HasAllKeysJsonb<Lhs, AsExprOf<Rhs, Array<VarChar>>>>;
#[doc(hidden)] pub type HasAllKeys<Lhs, Rhs> = HasAllKeysJsonb<Lhs, Rhs>;
#[doc(hidden)]
#[deprecated(note = "Use `dsl::Contains` instead")]
pub type ContainsJsonb<Lhs, Rhs> = Contains<Lhs, Rhs>;
#[doc(hidden)]
#[deprecated(note = "Use `dsl::IsContainedBy` instead")]
pub type IsContainedByJsonb<Lhs, Rhs> = IsContainedBy<Lhs, Rhs>;
#[cfg(feature = "postgres_backend")]
pub type Index<Lhs, Rhs> = super::operators::ArrayIndex<Lhs, AsExprOf<Rhs, Integer>>;
#[doc(hidden)]
#[deprecated(note = "Use `Index` instead")]
pub type ArrayIndex<Lhs, Rhs> = Index<Lhs, Rhs>;
#[cfg(feature = "postgres_backend")]
pub type RemoveFromJsonb<Lhs, Rhs, ST> =
Grouped<super::operators::RemoveFromJsonb<Lhs, AsExprOf<Rhs, ST>>>;
#[doc(hidden)] pub type Remove<Lhs, Rhs> = RemoveFromJsonb<
Lhs,
<Rhs as JsonRemoveIndex>::Expression,
<<Rhs as JsonRemoveIndex>::Expression as Expression>::SqlType,
>;
#[cfg(feature = "postgres_backend")]
pub type RetrieveAsObjectJson<Lhs, Rhs, ST> =
Grouped<super::operators::RetrieveAsObjectJson<Lhs, AsExprOf<Rhs, ST>>>;
#[doc(hidden)] pub type RetrieveAsObject<Lhs, Rhs> = RetrieveAsObjectJson<
Lhs,
<Rhs as JsonIndex>::Expression,
<<Rhs as JsonIndex>::Expression as Expression>::SqlType,
>;
#[cfg(feature = "postgres_backend")]
pub type RetrieveAsTextJson<Lhs, Rhs, ST> =
Grouped<super::operators::RetrieveAsTextJson<Lhs, AsExprOf<Rhs, ST>>>;
#[doc(hidden)] pub type RetrieveAsText<Lhs, Rhs> = RetrieveAsTextJson<
Lhs,
<Rhs as JsonIndex>::Expression,
<<Rhs as JsonIndex>::Expression as Expression>::SqlType,
>;
#[cfg(feature = "postgres_backend")]
pub type RetrieveByPathAsObjectJson<Lhs, Rhs> =
Grouped<super::operators::RetrieveByPathAsObjectJson<Lhs, AsExprOf<Rhs, Array<VarChar>>>>;
#[doc(hidden)] pub type RetrieveByPathAsObject<Lhs, Rhs> = RetrieveByPathAsObjectJson<Lhs, Rhs>;
#[cfg(feature = "postgres_backend")]
pub type RetrieveByPathAsTextJson<Lhs, Rhs> =
Grouped<super::operators::RetrieveByPathAsTextJson<Lhs, AsExprOf<Rhs, Array<VarChar>>>>;
#[doc(hidden)] pub type RetrieveByPathAsText<Lhs, Rhs> = RetrieveByPathAsTextJson<Lhs, Rhs>;
#[cfg(feature = "postgres_backend")]
pub type RemoveByPathFromJsonb<Lhs, Rhs> =
Grouped<super::operators::RemoveByPathFromJsonb<Lhs, AsExprOf<Rhs, Array<VarChar>>>>;
#[doc(hidden)] pub type RemoveByPath<Lhs, Rhs> = RemoveByPathFromJsonb<Lhs, Rhs>;
#[doc(hidden)]
#[deprecated(note = "Use `dsl::Concat` instead")]
pub type ConcatBinary<Lhs, Rhs> = crate::dsl::Concat<Lhs, Rhs>;
#[doc(hidden)]
#[deprecated(note = "Use `dsl::Like` instead")]
pub type LikeBinary<Lhs, Rhs> = crate::dsl::Like<Lhs, Rhs>;
#[doc(hidden)]
#[deprecated(note = "Use `dsl::NotLike` instead")]
pub type NotLikeBinary<Lhs, Rhs> = crate::dsl::NotLike<Lhs, Rhs>;
#[doc(hidden)]
#[deprecated(note = "Use `dsl::Concat` instead")]
pub type ConcatArray<Lhs, Rhs> = crate::dsl::Concat<Lhs, Rhs>;
#[allow(non_camel_case_types)]
#[cfg(feature = "postgres_backend")]
pub type array_to_string_with_null_string<A, D, N> =
super::functions::array_to_string_with_null_string<
SqlTypeOf<A>, A, D, N, >;
#[allow(non_camel_case_types)]
#[cfg(feature = "postgres_backend")]
pub type array_to_string<A, D> = super::functions::array_to_string<
SqlTypeOf<A>, A, D, >;
#[allow(non_camel_case_types)]
#[cfg(feature = "postgres_backend")]
pub type lower<R> = super::functions::lower<SqlTypeOf<R>, R>;
#[allow(non_camel_case_types)]
#[cfg(feature = "postgres_backend")]
pub type upper<R> = super::functions::upper<SqlTypeOf<R>, R>;
#[allow(non_camel_case_types)]
#[cfg(feature = "postgres_backend")]
pub type isempty<R> = super::functions::isempty<SqlTypeOf<R>, R>;
#[allow(non_camel_case_types)]
#[cfg(feature = "postgres_backend")]
pub type lower_inc<R> = super::functions::lower_inc<SqlTypeOf<R>, R>;
#[allow(non_camel_case_types)]
#[cfg(feature = "postgres_backend")]
pub type upper_inc<R> = super::functions::upper_inc<SqlTypeOf<R>, R>;
#[allow(non_camel_case_types)]
#[cfg(feature = "postgres_backend")]
pub type lower_inf<R> = super::functions::lower_inf<SqlTypeOf<R>, R>;
#[allow(non_camel_case_types)]
#[cfg(feature = "postgres_backend")]
pub type upper_inf<R> = super::functions::upper_inf<SqlTypeOf<R>, R>;
#[allow(non_camel_case_types)]
#[cfg(feature = "postgres_backend")]
pub type range_merge<R1, R2> = super::functions::range_merge<SqlTypeOf<R1>, SqlTypeOf<R2>, R1, R2>;
#[allow(non_camel_case_types)]
#[cfg(feature = "postgres_backend")]
pub type multirange_merge<R> = super::functions::multirange_merge<SqlTypeOf<R>, R>;
#[allow(non_camel_case_types)]
#[cfg(feature = "postgres_backend")]
pub type array_append<A, E> = super::functions::array_append<SqlTypeOf<A>, SqlTypeOf<E>, A, E>;
#[allow(non_camel_case_types)]
#[cfg(feature = "postgres_backend")]
pub type array_replace<A, E, R> =
super::functions::array_replace<SqlTypeOf<A>, SqlTypeOf<E>, A, E, R>;
#[allow(non_camel_case_types)]
#[cfg(feature = "postgres_backend")]
pub type array_dims<A> = super::functions::array_dims<SqlTypeOf<A>, A>;
#[allow(non_camel_case_types)]
#[cfg(feature = "postgres_backend")]
pub type array_prepend<E, A> = super::functions::array_prepend<SqlTypeOf<E>, SqlTypeOf<A>, E, A>;
#[allow(non_camel_case_types)]
#[cfg(feature = "postgres_backend")]
pub type array_remove<A, E> = super::functions::array_remove<SqlTypeOf<A>, SqlTypeOf<E>, A, E>;
#[allow(non_camel_case_types)]
#[cfg(feature = "postgres_backend")]
pub type cardinality<A> = super::functions::cardinality<SqlTypeOf<A>, A>;
#[allow(non_camel_case_types)]
#[cfg(feature = "postgres_backend")]
pub type trim_array<A, N> = super::functions::trim_array<SqlTypeOf<A>, A, N>;
#[allow(non_camel_case_types)]
#[cfg(feature = "postgres_backend")]
pub type array_cat<A, B> = super::functions::array_cat<SqlTypeOf<A>, A, B>;
#[allow(non_camel_case_types)]
#[cfg(feature = "postgres_backend")]
pub type array_length<A, D> = super::functions::array_length<SqlTypeOf<A>, A, D>;
#[allow(non_camel_case_types)]
#[cfg(feature = "postgres_backend")]
pub type array_fill<E, A> = super::functions::array_fill<SqlTypeOf<E>, E, A>;
#[allow(non_camel_case_types)]
#[cfg(feature = "postgres_backend")]
pub type array_fill_with_lower_bound<E, A1, A2> =
super::functions::array_fill_with_lower_bound<SqlTypeOf<E>, E, A1, A2>;
#[allow(non_camel_case_types)]
#[cfg(feature = "postgres_backend")]
pub type array_lower<A, D> = super::functions::array_lower<SqlTypeOf<A>, A, D>;
#[allow(non_camel_case_types)]
#[cfg(feature = "postgres_backend")]
pub type array_upper<A, D> = super::functions::array_upper<SqlTypeOf<A>, A, D>;
#[allow(non_camel_case_types)]
#[cfg(feature = "postgres_backend")]
pub type array_position<A, E> = super::functions::array_position<SqlTypeOf<A>, SqlTypeOf<E>, A, E>;
#[allow(non_camel_case_types)]
#[cfg(feature = "postgres_backend")]
pub type array_position_with_subscript<A, E, S> =
super::functions::array_position_with_subscript<SqlTypeOf<A>, SqlTypeOf<E>, A, E, S>;
#[allow(non_camel_case_types)]
#[cfg(feature = "postgres_backend")]
pub type array_positions<A, E> =
super::functions::array_positions<SqlTypeOf<A>, SqlTypeOf<E>, A, E>;
#[allow(non_camel_case_types)]
#[cfg(feature = "postgres_backend")]
pub type array_ndims<A> = super::functions::array_ndims<SqlTypeOf<A>, A>;
#[allow(non_camel_case_types)]
#[cfg(feature = "postgres_backend")]
pub type array_shuffle<A> = super::functions::array_shuffle<SqlTypeOf<A>, A>;
#[allow(non_camel_case_types)]
#[cfg(feature = "postgres_backend")]
pub type to_json<E> = super::functions::to_json<SqlTypeOf<E>, E>;