1use crate::dsl::{AsExpr, AsExprOf, SqlTypeOf};
2use crate::expression::grouped::Grouped;
3use crate::expression::Expression;
4use crate::expression_methods::JsonIndex;
5use crate::pg::expression::expression_methods::private::JsonRemoveIndex;
6use crate::pg::types::sql_types::Array;
7use crate::sql_types::{Inet, Integer, VarChar};
8
9#[cfg(feature = "postgres_backend")]
11pub type ILike<Lhs, Rhs> = Grouped<super::operators::ILike<Lhs, AsExprOf<Rhs, VarChar>>>;
12#[doc(hidden)] pub type Ilike<Lhs, Rhs> = ILike<Lhs, Rhs>;
14
15#[cfg(feature = "postgres_backend")]
17pub type NotILike<Lhs, Rhs> = Grouped<super::operators::NotILike<Lhs, AsExprOf<Rhs, VarChar>>>;
18#[doc(hidden)] pub type NotIlike<Lhs, Rhs> = NotILike<Lhs, Rhs>;
20
21#[cfg(feature = "postgres_backend")]
23pub type SimilarTo<Lhs, Rhs> = Grouped<super::operators::SimilarTo<Lhs, AsExprOf<Rhs, VarChar>>>;
24
25#[cfg(feature = "postgres_backend")]
27pub type NotSimilarTo<Lhs, Rhs> =
28 Grouped<super::operators::NotSimilarTo<Lhs, AsExprOf<Rhs, VarChar>>>;
29
30#[cfg(feature = "postgres_backend")]
32pub type IsNotDistinctFrom<Lhs, Rhs> =
33 Grouped<super::operators::IsNotDistinctFrom<Lhs, AsExpr<Rhs, Lhs>>>;
34
35#[cfg(feature = "postgres_backend")]
37pub type IsDistinctFrom<Lhs, Rhs> =
38 Grouped<super::operators::IsDistinctFrom<Lhs, AsExpr<Rhs, Lhs>>>;
39
40#[cfg(feature = "postgres_backend")]
43pub type OverlapsWith<Lhs, Rhs> = Grouped<super::operators::OverlapsWith<Lhs, AsExpr<Rhs, Lhs>>>;
44
45#[cfg(feature = "postgres_backend")]
48pub type Contains<Lhs, Rhs> = Grouped<super::operators::Contains<Lhs, AsExpr<Rhs, Lhs>>>;
49
50#[doc(hidden)]
51#[deprecated(note = "Use `Contains` instead")]
52pub type ArrayContains<Lhs, Rhs> = Contains<Lhs, Rhs>;
53
54#[cfg(feature = "postgres_backend")]
57pub type RangeContains<Lhs, Rhs> = Grouped<
58 super::operators::Contains<
59 Lhs,
60 AsExprOf<Rhs, <SqlTypeOf<Lhs> as super::expression_methods::RangeOrMultirange>::Inner>,
61 >,
62>;
63
64#[cfg(feature = "postgres_backend")]
67pub type RangeExtendsRightTo<Lhs, Rhs> =
68 Grouped<super::operators::ExtendsRightTo<Lhs, AsExpr<Rhs, Lhs>>>;
69
70#[cfg(feature = "postgres_backend")]
73pub type RangeExtendsLeftTo<Lhs, Rhs> =
74 Grouped<super::operators::ExtendsLeftTo<Lhs, AsExpr<Rhs, Lhs>>>;
75
76#[cfg(feature = "postgres_backend")]
79pub type ContainsRange<Lhs, Rhs> = Contains<Lhs, Rhs>;
80
81#[cfg(feature = "postgres_backend")]
84pub type IsContainedBy<Lhs, Rhs> = Grouped<super::operators::IsContainedBy<Lhs, AsExpr<Rhs, Lhs>>>;
85
86#[cfg(feature = "postgres_backend")]
88pub type IsContainedByRange<Lhs, Rhs> = Grouped<
89 super::operators::IsContainedBy<Lhs, AsExprOf<Rhs, diesel::sql_types::Range<SqlTypeOf<Lhs>>>>,
90>;
91
92#[cfg(feature = "postgres_backend")]
94pub type LesserThanRange<Lhs, Rhs> =
95 Grouped<super::operators::IsContainedByNet<Lhs, AsExpr<Rhs, Lhs>>>;
96
97#[doc(hidden)] pub type LesserThan<Lhs, Rhs> = LesserThanRange<Lhs, Rhs>;
99
100#[cfg(feature = "postgres_backend")]
102pub type GreaterThanRange<Lhs, Rhs> = Grouped<super::operators::ContainsNet<Lhs, AsExpr<Rhs, Lhs>>>;
103
104#[doc(hidden)] pub type GreaterThan<Lhs, Rhs> = GreaterThanRange<Lhs, Rhs>;
106
107#[cfg(feature = "postgres_backend")]
109pub type UnionRange<Lhs, Rhs> = Grouped<super::operators::UnionsRange<Lhs, AsExpr<Rhs, Lhs>>>;
110
111#[cfg(feature = "postgres_backend")]
113pub type Difference<Lhs, Rhs> = Grouped<super::operators::DifferenceRange<Lhs, AsExpr<Rhs, Lhs>>>;
114
115#[doc(hidden)] pub type DifferenceRange<Lhs, Rhs> = Difference<Lhs, Rhs>;
117
118#[cfg(feature = "postgres_backend")]
120pub type RangeAdjacent<Lhs, Rhs> = Grouped<super::operators::RangeAdjacent<Lhs, AsExpr<Rhs, Lhs>>>;
121
122#[cfg(feature = "postgres_backend")]
124pub type Intersection<Lhs, Rhs> =
125 Grouped<super::operators::IntersectionRange<Lhs, AsExpr<Rhs, Lhs>>>;
126
127#[doc(hidden)] pub type IntersectionRange<Lhs, Rhs> = Intersection<Lhs, Rhs>;
129
130#[cfg(feature = "postgres_backend")]
132pub type NullsFirst<T> = super::operators::NullsFirst<T>;
133
134#[cfg(feature = "postgres_backend")]
136pub type IsJson<T> = super::operators::IsJson<T>;
137
138#[cfg(feature = "postgres_backend")]
140pub type IsNotJson<T> = super::operators::IsNotJson<T>;
141
142#[cfg(feature = "postgres_backend")]
144pub type IsJsonObject<T> = super::operators::IsJsonObject<T>;
145
146#[cfg(feature = "postgres_backend")]
148pub type IsNotJsonObject<T> = super::operators::IsNotJsonObject<T>;
149
150#[cfg(feature = "postgres_backend")]
152pub type IsJsonArray<T> = super::operators::IsJsonArray<T>;
153
154#[cfg(feature = "postgres_backend")]
156pub type IsNotJsonArray<T> = super::operators::IsNotJsonArray<T>;
157
158#[cfg(feature = "postgres_backend")]
160pub type IsJsonScalar<T> = super::operators::IsJsonScalar<T>;
161
162#[cfg(feature = "postgres_backend")]
164pub type IsNotJsonScalar<T> = super::operators::IsNotJsonScalar<T>;
165
166#[cfg(feature = "postgres_backend")]
168pub type NullsLast<T> = super::operators::NullsLast<T>;
169
170#[cfg(feature = "postgres_backend")]
172pub type AtTimeZone<Lhs, Rhs> =
173 Grouped<super::date_and_time::AtTimeZone<Lhs, AsExprOf<Rhs, VarChar>>>;
174
175#[cfg(feature = "postgres_backend")]
178pub type ContainsNet<Lhs, Rhs> = Grouped<super::operators::ContainsNet<Lhs, AsExprOf<Rhs, Inet>>>;
179
180#[cfg(feature = "postgres_backend")]
182pub type ContainsNetLoose<Lhs, Rhs> =
183 Grouped<super::operators::ContainsNetLoose<Lhs, AsExprOf<Rhs, Inet>>>;
184
185#[doc(hidden)] pub type ContainsOrEq<Lhs, Rhs> = ContainsNetLoose<Lhs, Rhs>;
187
188#[cfg(feature = "postgres_backend")]
191pub type IsContainedByNet<Lhs, Rhs> =
192 Grouped<super::operators::IsContainedByNet<Lhs, AsExprOf<Rhs, Inet>>>;
193
194#[cfg(feature = "postgres_backend")]
196pub type IsContainedByNetLoose<Lhs, Rhs> =
197 Grouped<super::operators::IsContainedByNetLoose<Lhs, AsExprOf<Rhs, Inet>>>;
198
199#[doc(hidden)] pub type IsContainedByOrEq<Lhs, Rhs> = IsContainedByNetLoose<Lhs, Rhs>;
201
202#[cfg(feature = "postgres_backend")]
205pub type OverlapsWithNet<Lhs, Rhs> =
206 Grouped<super::operators::OverlapsWith<Lhs, AsExprOf<Rhs, Inet>>>;
207
208#[cfg(feature = "postgres_backend")]
210pub type AndNet<Lhs, Rhs> = Grouped<super::operators::AndNet<Lhs, AsExprOf<Rhs, Inet>>>;
211
212#[cfg(feature = "postgres_backend")]
214pub type OrNet<Lhs, Rhs> = Grouped<super::operators::OrNet<Lhs, AsExprOf<Rhs, Inet>>>;
215
216#[cfg(feature = "postgres_backend")]
218pub type DifferenceNet<Lhs, Rhs> =
219 Grouped<super::operators::DifferenceNet<Lhs, AsExprOf<Rhs, Inet>>>;
220
221#[doc(hidden)] pub type Diff<Lhs, Rhs> = DifferenceNet<Lhs, Rhs>;
223
224#[doc(hidden)]
225#[deprecated(note = "Use `dsl::Concat` instead")]
226pub type ConcatJsonb<Lhs, Rhs> = crate::dsl::Concat<Lhs, Rhs>;
227
228#[cfg(feature = "postgres_backend")]
230pub type HasKeyJsonb<Lhs, Rhs> =
231 Grouped<super::operators::HasKeyJsonb<Lhs, AsExprOf<Rhs, VarChar>>>;
232
233#[doc(hidden)] pub type HasKey<Lhs, Rhs> = HasKeyJsonb<Lhs, Rhs>;
235
236#[cfg(feature = "postgres_backend")]
238pub type HasAnyKeyJsonb<Lhs, Rhs> =
239 Grouped<super::operators::HasAnyKeyJsonb<Lhs, AsExprOf<Rhs, Array<VarChar>>>>;
240
241#[doc(hidden)] pub type HasAnyKey<Lhs, Rhs> = HasAnyKeyJsonb<Lhs, Rhs>;
243
244#[cfg(feature = "postgres_backend")]
246pub type HasAllKeysJsonb<Lhs, Rhs> =
247 Grouped<super::operators::HasAllKeysJsonb<Lhs, AsExprOf<Rhs, Array<VarChar>>>>;
248
249#[doc(hidden)] pub type HasAllKeys<Lhs, Rhs> = HasAllKeysJsonb<Lhs, Rhs>;
251
252#[doc(hidden)]
253#[deprecated(note = "Use `dsl::Contains` instead")]
254pub type ContainsJsonb<Lhs, Rhs> = Contains<Lhs, Rhs>;
255
256#[doc(hidden)]
257#[deprecated(note = "Use `dsl::IsContainedBy` instead")]
258pub type IsContainedByJsonb<Lhs, Rhs> = IsContainedBy<Lhs, Rhs>;
259
260#[cfg(feature = "postgres_backend")]
262pub type Index<Lhs, Rhs> = super::operators::ArrayIndex<Lhs, AsExprOf<Rhs, Integer>>;
263
264#[doc(hidden)]
265#[deprecated(note = "Use `Index` instead")]
266pub type ArrayIndex<Lhs, Rhs> = Index<Lhs, Rhs>;
267
268#[cfg(feature = "postgres_backend")]
270pub type RemoveFromJsonb<Lhs, Rhs, ST> =
271 Grouped<super::operators::RemoveFromJsonb<Lhs, AsExprOf<Rhs, ST>>>;
272
273#[doc(hidden)] pub type Remove<Lhs, Rhs> = RemoveFromJsonb<
275 Lhs,
276 <Rhs as JsonRemoveIndex>::Expression,
277 <<Rhs as JsonRemoveIndex>::Expression as Expression>::SqlType,
278>;
279
280#[doc(hidden)] pub type RetrieveAsObjectJson<Lhs, Rhs, ST> =
282 Grouped<crate::pg::expression::operators::RetrieveAsObjectJson<Lhs, AsExprOf<Rhs, ST>>>;
283
284#[cfg(feature = "postgres_backend")]
286pub type RetrieveAsObject<Lhs, Rhs> = Grouped<
287 crate::pg::expression::operators::RetrieveAsObjectJson<
288 Lhs,
289 AsExprOf<
290 <Rhs as JsonIndex>::Expression,
291 <<Rhs as JsonIndex>::Expression as Expression>::SqlType,
292 >,
293 >,
294>;
295
296#[doc(hidden)] pub type RetrieveAsTextJson<Lhs, Rhs, ST> =
298 Grouped<crate::expression::operators::RetrieveAsTextJson<Lhs, AsExprOf<Rhs, ST>>>;
299
300#[cfg(feature = "postgres_backend")]
302pub type RetrieveByPathAsObjectJson<Lhs, Rhs> =
303 Grouped<super::operators::RetrieveByPathAsObjectJson<Lhs, AsExprOf<Rhs, Array<VarChar>>>>;
304
305#[doc(hidden)] pub type RetrieveByPathAsObject<Lhs, Rhs> = RetrieveByPathAsObjectJson<Lhs, Rhs>;
307
308#[cfg(feature = "postgres_backend")]
310pub type RetrieveByPathAsTextJson<Lhs, Rhs> =
311 Grouped<super::operators::RetrieveByPathAsTextJson<Lhs, AsExprOf<Rhs, Array<VarChar>>>>;
312
313#[doc(hidden)] pub type RetrieveByPathAsText<Lhs, Rhs> = RetrieveByPathAsTextJson<Lhs, Rhs>;
315
316#[cfg(feature = "postgres_backend")]
318pub type RemoveByPathFromJsonb<Lhs, Rhs> =
319 Grouped<super::operators::RemoveByPathFromJsonb<Lhs, AsExprOf<Rhs, Array<VarChar>>>>;
320
321#[doc(hidden)] pub type RemoveByPath<Lhs, Rhs> = RemoveByPathFromJsonb<Lhs, Rhs>;
323
324#[doc(hidden)]
325#[deprecated(note = "Use `dsl::Concat` instead")]
326pub type ConcatBinary<Lhs, Rhs> = crate::dsl::Concat<Lhs, Rhs>;
327
328#[doc(hidden)]
329#[deprecated(note = "Use `dsl::Like` instead")]
330pub type LikeBinary<Lhs, Rhs> = crate::dsl::Like<Lhs, Rhs>;
331
332#[doc(hidden)]
333#[deprecated(note = "Use `dsl::NotLike` instead")]
334pub type NotLikeBinary<Lhs, Rhs> = crate::dsl::NotLike<Lhs, Rhs>;
335
336#[doc(hidden)]
337#[deprecated(note = "Use `dsl::Concat` instead")]
338pub type ConcatArray<Lhs, Rhs> = crate::dsl::Concat<Lhs, Rhs>;
339
340#[doc(inline)]
341pub use super::return_type_helpers::*;