1use crate::dsl::{AsExpr, AsExprOf, SqlTypeOf};
2use crate::expression::grouped::Grouped;
3use crate::expression::Expression;
4use crate::pg::expression::expression_methods::private::{JsonIndex, JsonRemoveIndex};
5use crate::pg::types::sql_types::Array;
6use crate::sql_types::{Inet, Integer, VarChar};
7
8#[cfg(feature = "postgres_backend")]
10pub type ILike<Lhs, Rhs> = Grouped<super::operators::ILike<Lhs, AsExprOf<Rhs, VarChar>>>;
11#[doc(hidden)] pub type Ilike<Lhs, Rhs> = ILike<Lhs, Rhs>;
13
14#[cfg(feature = "postgres_backend")]
16pub type NotILike<Lhs, Rhs> = Grouped<super::operators::NotILike<Lhs, AsExprOf<Rhs, VarChar>>>;
17#[doc(hidden)] pub type NotIlike<Lhs, Rhs> = NotILike<Lhs, Rhs>;
19
20#[cfg(feature = "postgres_backend")]
22pub type SimilarTo<Lhs, Rhs> = Grouped<super::operators::SimilarTo<Lhs, AsExprOf<Rhs, VarChar>>>;
23
24#[cfg(feature = "postgres_backend")]
26pub type NotSimilarTo<Lhs, Rhs> =
27 Grouped<super::operators::NotSimilarTo<Lhs, AsExprOf<Rhs, VarChar>>>;
28
29#[cfg(feature = "postgres_backend")]
31pub type IsNotDistinctFrom<Lhs, Rhs> =
32 Grouped<super::operators::IsNotDistinctFrom<Lhs, AsExpr<Rhs, Lhs>>>;
33
34#[cfg(feature = "postgres_backend")]
36pub type IsDistinctFrom<Lhs, Rhs> =
37 Grouped<super::operators::IsDistinctFrom<Lhs, AsExpr<Rhs, Lhs>>>;
38
39#[cfg(feature = "postgres_backend")]
41pub type OverlapsWith<Lhs, Rhs> = Grouped<super::operators::OverlapsWith<Lhs, AsExpr<Rhs, Lhs>>>;
42
43#[cfg(feature = "postgres_backend")]
46pub type Contains<Lhs, Rhs> = Grouped<super::operators::Contains<Lhs, AsExpr<Rhs, Lhs>>>;
47
48#[doc(hidden)]
49#[deprecated(note = "Use `Contains` instead")]
50pub type ArrayContains<Lhs, Rhs> = Contains<Lhs, Rhs>;
51
52#[cfg(feature = "postgres_backend")]
55pub type RangeContains<Lhs, Rhs> = Grouped<
56 super::operators::Contains<
57 Lhs,
58 AsExprOf<Rhs, <SqlTypeOf<Lhs> as super::expression_methods::RangeHelper>::Inner>,
59 >,
60>;
61
62#[cfg(feature = "postgres_backend")]
64pub type IsContainedBy<Lhs, Rhs> = Grouped<super::operators::IsContainedBy<Lhs, AsExpr<Rhs, Lhs>>>;
65
66#[cfg(feature = "postgres_backend")]
68pub type NullsFirst<T> = super::operators::NullsFirst<T>;
69
70#[cfg(feature = "postgres_backend")]
72pub type NullsLast<T> = super::operators::NullsLast<T>;
73
74#[cfg(feature = "postgres_backend")]
76pub type AtTimeZone<Lhs, Rhs> =
77 Grouped<super::date_and_time::AtTimeZone<Lhs, AsExprOf<Rhs, VarChar>>>;
78
79#[cfg(feature = "postgres_backend")]
82pub type ContainsNet<Lhs, Rhs> = Grouped<super::operators::ContainsNet<Lhs, AsExprOf<Rhs, Inet>>>;
83
84#[cfg(feature = "postgres_backend")]
86pub type ContainsNetLoose<Lhs, Rhs> =
87 Grouped<super::operators::ContainsNetLoose<Lhs, AsExprOf<Rhs, Inet>>>;
88
89#[doc(hidden)] pub type ContainsOrEq<Lhs, Rhs> = ContainsNetLoose<Lhs, Rhs>;
91
92#[cfg(feature = "postgres_backend")]
95pub type IsContainedByNet<Lhs, Rhs> =
96 Grouped<super::operators::IsContainedByNet<Lhs, AsExprOf<Rhs, Inet>>>;
97
98#[cfg(feature = "postgres_backend")]
100pub type IsContainedByNetLoose<Lhs, Rhs> =
101 Grouped<super::operators::IsContainedByNetLoose<Lhs, AsExprOf<Rhs, Inet>>>;
102
103#[doc(hidden)] pub type IsContainedByOrEq<Lhs, Rhs> = IsContainedByNetLoose<Lhs, Rhs>;
105
106#[cfg(feature = "postgres_backend")]
109pub type OverlapsWithNet<Lhs, Rhs> =
110 Grouped<super::operators::OverlapsWith<Lhs, AsExprOf<Rhs, Inet>>>;
111
112#[cfg(feature = "postgres_backend")]
114pub type AndNet<Lhs, Rhs> = Grouped<super::operators::AndNet<Lhs, AsExprOf<Rhs, Inet>>>;
115
116#[cfg(feature = "postgres_backend")]
118pub type OrNet<Lhs, Rhs> = Grouped<super::operators::OrNet<Lhs, AsExprOf<Rhs, Inet>>>;
119
120#[cfg(feature = "postgres_backend")]
122pub type DifferenceNet<Lhs, Rhs> =
123 Grouped<super::operators::DifferenceNet<Lhs, AsExprOf<Rhs, Inet>>>;
124
125#[doc(hidden)] pub type Diff<Lhs, Rhs> = DifferenceNet<Lhs, Rhs>;
127
128#[doc(hidden)]
129#[deprecated(note = "Use `dsl::Concat` instead")]
130pub type ConcatJsonb<Lhs, Rhs> = crate::dsl::Concat<Lhs, Rhs>;
131
132#[cfg(feature = "postgres_backend")]
134pub type HasKeyJsonb<Lhs, Rhs> =
135 Grouped<super::operators::HasKeyJsonb<Lhs, AsExprOf<Rhs, VarChar>>>;
136
137#[doc(hidden)] pub type HasKey<Lhs, Rhs> = HasKeyJsonb<Lhs, Rhs>;
139
140#[cfg(feature = "postgres_backend")]
142pub type HasAnyKeyJsonb<Lhs, Rhs> =
143 Grouped<super::operators::HasAnyKeyJsonb<Lhs, AsExprOf<Rhs, Array<VarChar>>>>;
144
145#[doc(hidden)] pub type HasAnyKey<Lhs, Rhs> = HasAnyKeyJsonb<Lhs, Rhs>;
147
148#[cfg(feature = "postgres_backend")]
150pub type HasAllKeysJsonb<Lhs, Rhs> =
151 Grouped<super::operators::HasAllKeysJsonb<Lhs, AsExprOf<Rhs, Array<VarChar>>>>;
152
153#[doc(hidden)] pub type HasAllKeys<Lhs, Rhs> = HasAllKeysJsonb<Lhs, Rhs>;
155
156#[doc(hidden)]
157#[deprecated(note = "Use `dsl::Contains` instead")]
158pub type ContainsJsonb<Lhs, Rhs> = Contains<Lhs, Rhs>;
159
160#[doc(hidden)]
161#[deprecated(note = "Use `dsl::IsContainedBy` instead")]
162pub type IsContainedByJsonb<Lhs, Rhs> = IsContainedBy<Lhs, Rhs>;
163
164#[cfg(feature = "postgres_backend")]
166pub type Index<Lhs, Rhs> = super::operators::ArrayIndex<Lhs, AsExprOf<Rhs, Integer>>;
167
168#[doc(hidden)]
169#[deprecated(note = "Use `Index` instead")]
170pub type ArrayIndex<Lhs, Rhs> = Index<Lhs, Rhs>;
171
172#[cfg(feature = "postgres_backend")]
174pub type RemoveFromJsonb<Lhs, Rhs, ST> =
175 Grouped<super::operators::RemoveFromJsonb<Lhs, AsExprOf<Rhs, ST>>>;
176
177#[doc(hidden)] pub type Remove<Lhs, Rhs> = RemoveFromJsonb<
179 Lhs,
180 <Rhs as JsonRemoveIndex>::Expression,
181 <<Rhs as JsonRemoveIndex>::Expression as Expression>::SqlType,
182>;
183
184#[cfg(feature = "postgres_backend")]
186pub type RetrieveAsObjectJson<Lhs, Rhs, ST> =
187 Grouped<super::operators::RetrieveAsObjectJson<Lhs, AsExprOf<Rhs, ST>>>;
188
189#[doc(hidden)] pub type RetrieveAsObject<Lhs, Rhs> = RetrieveAsObjectJson<
191 Lhs,
192 <Rhs as JsonIndex>::Expression,
193 <<Rhs as JsonIndex>::Expression as Expression>::SqlType,
194>;
195
196#[cfg(feature = "postgres_backend")]
198pub type RetrieveAsTextJson<Lhs, Rhs, ST> =
199 Grouped<super::operators::RetrieveAsTextJson<Lhs, AsExprOf<Rhs, ST>>>;
200
201#[doc(hidden)] pub type RetrieveAsText<Lhs, Rhs> = RetrieveAsTextJson<
203 Lhs,
204 <Rhs as JsonIndex>::Expression,
205 <<Rhs as JsonIndex>::Expression as Expression>::SqlType,
206>;
207
208#[cfg(feature = "postgres_backend")]
210pub type RetrieveByPathAsObjectJson<Lhs, Rhs> =
211 Grouped<super::operators::RetrieveByPathAsObjectJson<Lhs, AsExprOf<Rhs, Array<VarChar>>>>;
212
213#[doc(hidden)] pub type RetrieveByPathAsObject<Lhs, Rhs> = RetrieveByPathAsObjectJson<Lhs, Rhs>;
215
216#[cfg(feature = "postgres_backend")]
218pub type RetrieveByPathAsTextJson<Lhs, Rhs> =
219 Grouped<super::operators::RetrieveByPathAsTextJson<Lhs, AsExprOf<Rhs, Array<VarChar>>>>;
220
221#[doc(hidden)] pub type RetrieveByPathAsText<Lhs, Rhs> = RetrieveByPathAsTextJson<Lhs, Rhs>;
223
224#[cfg(feature = "postgres_backend")]
226pub type RemoveByPathFromJsonb<Lhs, Rhs> =
227 Grouped<super::operators::RemoveByPathFromJsonb<Lhs, AsExprOf<Rhs, Array<VarChar>>>>;
228
229#[doc(hidden)] pub type RemoveByPath<Lhs, Rhs> = RemoveByPathFromJsonb<Lhs, Rhs>;
231
232#[doc(hidden)]
233#[deprecated(note = "Use `dsl::Concat` instead")]
234pub type ConcatBinary<Lhs, Rhs> = crate::dsl::Concat<Lhs, Rhs>;
235
236#[doc(hidden)]
237#[deprecated(note = "Use `dsl::Like` instead")]
238pub type LikeBinary<Lhs, Rhs> = crate::dsl::Like<Lhs, Rhs>;
239
240#[doc(hidden)]
241#[deprecated(note = "Use `dsl::NotLike` instead")]
242pub type NotLikeBinary<Lhs, Rhs> = crate::dsl::NotLike<Lhs, Rhs>;
243
244#[doc(hidden)]
245#[deprecated(note = "Use `dsl::Concat` instead")]
246pub type ConcatArray<Lhs, Rhs> = crate::dsl::Concat<Lhs, Rhs>;