diesel/pg/expression/
helper_types.rs

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/// The return type of [`lhs.ilike(rhs)`](super::expression_methods::PgTextExpressionMethods::ilike)
9#[cfg(feature = "postgres_backend")]
10pub type ILike<Lhs, Rhs> = Grouped<super::operators::ILike<Lhs, AsExprOf<Rhs, VarChar>>>;
11#[doc(hidden)] // required for #[auto_type]
12pub type Ilike<Lhs, Rhs> = ILike<Lhs, Rhs>;
13
14/// The return type of [`lhs.not_ilike(rhs)`](super::expression_methods::PgTextExpressionMethods::not_ilike)
15#[cfg(feature = "postgres_backend")]
16pub type NotILike<Lhs, Rhs> = Grouped<super::operators::NotILike<Lhs, AsExprOf<Rhs, VarChar>>>;
17#[doc(hidden)] // required for #[auto_type]
18pub type NotIlike<Lhs, Rhs> = NotILike<Lhs, Rhs>;
19
20/// The return type of [`lhs.similar_to(rhs)`](super::expression_methods::PgTextExpressionMethods::similar_to)
21#[cfg(feature = "postgres_backend")]
22pub type SimilarTo<Lhs, Rhs> = Grouped<super::operators::SimilarTo<Lhs, AsExprOf<Rhs, VarChar>>>;
23
24/// The return type of [`lhs.not_similar_to(rhs)`](super::expression_methods::PgTextExpressionMethods::not_similar_to)
25#[cfg(feature = "postgres_backend")]
26pub type NotSimilarTo<Lhs, Rhs> =
27    Grouped<super::operators::NotSimilarTo<Lhs, AsExprOf<Rhs, VarChar>>>;
28
29/// The return type of [`lhs.is_not_distinct_from(rhs)`](super::expression_methods::PgExpressionMethods::is_not_distinct_from)
30#[cfg(feature = "postgres_backend")]
31pub type IsNotDistinctFrom<Lhs, Rhs> =
32    Grouped<super::operators::IsNotDistinctFrom<Lhs, AsExpr<Rhs, Lhs>>>;
33
34/// The return type of [`lhs.is_distinct_from(rhs)`](super::expression_methods::PgExpressionMethods::is_distinct_from)
35#[cfg(feature = "postgres_backend")]
36pub type IsDistinctFrom<Lhs, Rhs> =
37    Grouped<super::operators::IsDistinctFrom<Lhs, AsExpr<Rhs, Lhs>>>;
38
39/// The return type of [`lhs.overlaps_with(rhs)`](super::expression_methods::PgArrayExpressionMethods::overlaps_with)
40/// and [`lhs.overlaps_with(rhs)`](super::expression_methods::PgRangeExpressionMethods::overlaps_with)
41#[cfg(feature = "postgres_backend")]
42pub type OverlapsWith<Lhs, Rhs> = Grouped<super::operators::OverlapsWith<Lhs, AsExpr<Rhs, Lhs>>>;
43
44/// The return type of [`lhs.contains(rhs)`](super::expression_methods::PgArrayExpressionMethods::contains)
45/// for array expressions
46#[cfg(feature = "postgres_backend")]
47pub type Contains<Lhs, Rhs> = Grouped<super::operators::Contains<Lhs, AsExpr<Rhs, Lhs>>>;
48
49#[doc(hidden)]
50#[deprecated(note = "Use `Contains` instead")]
51pub type ArrayContains<Lhs, Rhs> = Contains<Lhs, Rhs>;
52
53/// The return type of [`lhs.contains(rhs)`](super::expression_methods::PgRangeExpressionMethods::contains)
54/// for range expressions
55#[cfg(feature = "postgres_backend")]
56pub type RangeContains<Lhs, Rhs> = Grouped<
57    super::operators::Contains<
58        Lhs,
59        AsExprOf<Rhs, <SqlTypeOf<Lhs> as super::expression_methods::RangeOrMultirange>::Inner>,
60    >,
61>;
62
63/// The return type of [`lhs.range_extends_right_to(rhs)`](super::expression_methods::PgRangeExpressionMethods::range_extends_right_to)
64/// for range expressions
65#[cfg(feature = "postgres_backend")]
66pub type RangeExtendsRightTo<Lhs, Rhs> =
67    Grouped<super::operators::ExtendsRightTo<Lhs, AsExpr<Rhs, Lhs>>>;
68
69/// The return type of [`lhs.range_extends_left_to(rhs)`](super::expression_methods::PgRangeExpressionMethods::range_extends_left_to)
70/// for range expressions
71#[cfg(feature = "postgres_backend")]
72pub type RangeExtendsLeftTo<Lhs, Rhs> =
73    Grouped<super::operators::ExtendsLeftTo<Lhs, AsExpr<Rhs, Lhs>>>;
74
75/// The return type of [`lhs.contains_range(rhs)`](super::expression_methods::PgRangeExpressionMethods::contains_range)
76/// for range expressions
77#[cfg(feature = "postgres_backend")]
78pub type ContainsRange<Lhs, Rhs> = Contains<Lhs, Rhs>;
79
80/// The return type of [`lhs.range_is_contained_by(rhs)`](super::expression_methods::PgRangeExpressionMethods::is_contained_by)
81/// and [`lhs.is_contained_by(rhs)`](super::expression_methods::PgArrayExpressionMethods::is_contained_by)
82#[cfg(feature = "postgres_backend")]
83pub type IsContainedBy<Lhs, Rhs> = Grouped<super::operators::IsContainedBy<Lhs, AsExpr<Rhs, Lhs>>>;
84
85/// The return type of [`lhs.is_contained_by_range(rhs)`](super::expression_methods::PgExpressionMethods::is_contained_by_range)
86#[cfg(feature = "postgres_backend")]
87pub type IsContainedByRange<Lhs, Rhs> = Grouped<
88    super::operators::IsContainedBy<Lhs, AsExprOf<Rhs, diesel::sql_types::Range<SqlTypeOf<Lhs>>>>,
89>;
90
91/// The return type of [`lhs.range_is_contained_by(rhs)`](super::expression_methods::PgRangeExpressionMethods::lesser_than)
92#[cfg(feature = "postgres_backend")]
93pub type LesserThanRange<Lhs, Rhs> =
94    Grouped<super::operators::IsContainedByNet<Lhs, AsExpr<Rhs, Lhs>>>;
95
96#[doc(hidden)] // used by `#[auto_type]`
97pub type LesserThan<Lhs, Rhs> = LesserThanRange<Lhs, Rhs>;
98
99/// The return type of [`lhs.range_is_contained_by(rhs)`](super::expression_methods::PgRangeExpressionMethods::greater_than)
100#[cfg(feature = "postgres_backend")]
101pub type GreaterThanRange<Lhs, Rhs> = Grouped<super::operators::ContainsNet<Lhs, AsExpr<Rhs, Lhs>>>;
102
103#[doc(hidden)] // used by `#[auto_type]`
104pub type GreaterThan<Lhs, Rhs> = GreaterThanRange<Lhs, Rhs>;
105
106/// The return type of [`lhs.union_range(rhs)`](super::expression_methods::PgRangeExpressionMethods::union_range)
107#[cfg(feature = "postgres_backend")]
108pub type UnionRange<Lhs, Rhs> = Grouped<super::operators::UnionsRange<Lhs, AsExpr<Rhs, Lhs>>>;
109
110/// The return type of [`lhs.difference_range(rhs)`](super::expression_methods::PgRangeExpressionMethods::difference_range)
111#[cfg(feature = "postgres_backend")]
112pub type Difference<Lhs, Rhs> = Grouped<super::operators::DifferenceRange<Lhs, AsExpr<Rhs, Lhs>>>;
113
114#[doc(hidden)] // used by `#[auto_type]`
115pub type DifferenceRange<Lhs, Rhs> = Difference<Lhs, Rhs>;
116
117/// The return type of [`lhs.range_adjacent(rhs)`](super::expression_methods::PgRangeExpressionMethods::range_adjacent)
118#[cfg(feature = "postgres_backend")]
119pub type RangeAdjacent<Lhs, Rhs> = Grouped<super::operators::RangeAdjacent<Lhs, AsExpr<Rhs, Lhs>>>;
120
121/// The return type of [`lhs.intersection_range(rhs)`](super::expression_methods::PgRangeExpressionMethods::intersection_range)
122#[cfg(feature = "postgres_backend")]
123pub type Intersection<Lhs, Rhs> =
124    Grouped<super::operators::IntersectionRange<Lhs, AsExpr<Rhs, Lhs>>>;
125
126#[doc(hidden)] // used by `#[auto_type]`
127pub type IntersectionRange<Lhs, Rhs> = Intersection<Lhs, Rhs>;
128
129/// The return type of [`expr.nulls_first()`](super::expression_methods::PgSortExpressionMethods::nulls_first)
130#[cfg(feature = "postgres_backend")]
131pub type NullsFirst<T> = super::operators::NullsFirst<T>;
132
133/// The return type of [`expr.is_json()`](super::expression_methods::PgTextExpressionMethods::is_json())
134#[cfg(feature = "postgres_backend")]
135pub type IsJson<T> = super::operators::IsJson<T>;
136
137/// The return type of [`expr.is_not_json()`](super::expression_methods::PgTextExpressionMethods::is_not_json())
138#[cfg(feature = "postgres_backend")]
139pub type IsNotJson<T> = super::operators::IsNotJson<T>;
140
141/// The return type of [`expr.is_json_object()`](super::expression_methods::PgTextExpressionMethods::is_json_object())
142#[cfg(feature = "postgres_backend")]
143pub type IsJsonObject<T> = super::operators::IsJsonObject<T>;
144
145/// The return type of [`expr.is_not_json_object()`](super::expression_methods::PgTextExpressionMethods::is_not_json_object())
146#[cfg(feature = "postgres_backend")]
147pub type IsNotJsonObject<T> = super::operators::IsNotJsonObject<T>;
148
149/// The return type of [`expr.is_json_array()`](super::expression_methods::PgTextExpressionMethods::is_json_array())
150#[cfg(feature = "postgres_backend")]
151pub type IsJsonArray<T> = super::operators::IsJsonArray<T>;
152
153/// The return type of [`expr.is_not_json_array()`](super::expression_methods::PgTextExpressionMethods::is_not_json_array())
154#[cfg(feature = "postgres_backend")]
155pub type IsNotJsonArray<T> = super::operators::IsNotJsonArray<T>;
156
157/// The return type of [`expr.is_json_scalar()`](super::expression_methods::PgTextExpressionMethods::is_json_scalar())
158#[cfg(feature = "postgres_backend")]
159pub type IsJsonScalar<T> = super::operators::IsJsonScalar<T>;
160
161/// The return type of [`expr.is_not_json_scalar()`](super::expression_methods::PgTextExpressionMethods::is_not_json_scalar())
162#[cfg(feature = "postgres_backend")]
163pub type IsNotJsonScalar<T> = super::operators::IsNotJsonScalar<T>;
164
165/// The return type of [`expr.nulls_last()`](super::expression_methods::PgSortExpressionMethods::nulls_last())
166#[cfg(feature = "postgres_backend")]
167pub type NullsLast<T> = super::operators::NullsLast<T>;
168
169/// The return type of [`expr.at_time_zone(tz)`](super::expression_methods::PgTimestampExpressionMethods::at_time_zone())
170#[cfg(feature = "postgres_backend")]
171pub type AtTimeZone<Lhs, Rhs> =
172    Grouped<super::date_and_time::AtTimeZone<Lhs, AsExprOf<Rhs, VarChar>>>;
173
174/// The return type of [`lhs.contains(rhs)`](super::expression_methods::PgNetExpressionMethods::contains())
175/// for network types
176#[cfg(feature = "postgres_backend")]
177pub type ContainsNet<Lhs, Rhs> = Grouped<super::operators::ContainsNet<Lhs, AsExprOf<Rhs, Inet>>>;
178
179/// The return type of [`lhs.contains_or_eq(rhs)`](super::expression_methods::PgNetExpressionMethods::contains_or_eq)
180#[cfg(feature = "postgres_backend")]
181pub type ContainsNetLoose<Lhs, Rhs> =
182    Grouped<super::operators::ContainsNetLoose<Lhs, AsExprOf<Rhs, Inet>>>;
183
184#[doc(hidden)] // used by `#[auto_type]`
185pub type ContainsOrEq<Lhs, Rhs> = ContainsNetLoose<Lhs, Rhs>;
186
187/// The return type of [`lhs.is_contained_by(rhs)`]((super::expression_methods::PgNetExpressionMethods::is_contained_by)
188/// for network types
189#[cfg(feature = "postgres_backend")]
190pub type IsContainedByNet<Lhs, Rhs> =
191    Grouped<super::operators::IsContainedByNet<Lhs, AsExprOf<Rhs, Inet>>>;
192
193/// The return type of [`lhs.is_contained_by_or_eq(rhs)`](super::expression_methods::PgNetExpressionMethods::is_contained_by_or_eq)
194#[cfg(feature = "postgres_backend")]
195pub type IsContainedByNetLoose<Lhs, Rhs> =
196    Grouped<super::operators::IsContainedByNetLoose<Lhs, AsExprOf<Rhs, Inet>>>;
197
198#[doc(hidden)] // is used by `#[auto_type]`
199pub type IsContainedByOrEq<Lhs, Rhs> = IsContainedByNetLoose<Lhs, Rhs>;
200
201/// The return type of [`lhs.overlaps_with(rhs)`](super::expression_methods::PgNetExpressionMethods::overlaps_with)
202/// for network types
203#[cfg(feature = "postgres_backend")]
204pub type OverlapsWithNet<Lhs, Rhs> =
205    Grouped<super::operators::OverlapsWith<Lhs, AsExprOf<Rhs, Inet>>>;
206
207/// The return type of [`lsh.and(rhs)`](super::expression_methods::PgNetExpressionMethods::and) for network types
208#[cfg(feature = "postgres_backend")]
209pub type AndNet<Lhs, Rhs> = Grouped<super::operators::AndNet<Lhs, AsExprOf<Rhs, Inet>>>;
210
211/// The return type of [`lsh.or(rhs)`](super::expression_methods::PgNetExpressionMethods::or) for network types
212#[cfg(feature = "postgres_backend")]
213pub type OrNet<Lhs, Rhs> = Grouped<super::operators::OrNet<Lhs, AsExprOf<Rhs, Inet>>>;
214
215/// The return type of [`lsh.diff(rhs)`](super::expression_methods::PgNetExpressionMethods::diff)
216#[cfg(feature = "postgres_backend")]
217pub type DifferenceNet<Lhs, Rhs> =
218    Grouped<super::operators::DifferenceNet<Lhs, AsExprOf<Rhs, Inet>>>;
219
220#[doc(hidden)] // used by `#[auto_type]`
221pub type Diff<Lhs, Rhs> = DifferenceNet<Lhs, Rhs>;
222
223#[doc(hidden)]
224#[deprecated(note = "Use `dsl::Concat` instead")]
225pub type ConcatJsonb<Lhs, Rhs> = crate::dsl::Concat<Lhs, Rhs>;
226
227/// The return type of [`lsh.has_key(rhs)`](super::expression_methods::PgJsonbExpressionMethods::has_key)
228#[cfg(feature = "postgres_backend")]
229pub type HasKeyJsonb<Lhs, Rhs> =
230    Grouped<super::operators::HasKeyJsonb<Lhs, AsExprOf<Rhs, VarChar>>>;
231
232#[doc(hidden)] // needed for `#[auto_type]`
233pub type HasKey<Lhs, Rhs> = HasKeyJsonb<Lhs, Rhs>;
234
235/// The return type of [`lsh.has_any_key(rhs)`](super::expression_methods::PgJsonbExpressionMethods::has_any_key)
236#[cfg(feature = "postgres_backend")]
237pub type HasAnyKeyJsonb<Lhs, Rhs> =
238    Grouped<super::operators::HasAnyKeyJsonb<Lhs, AsExprOf<Rhs, Array<VarChar>>>>;
239
240#[doc(hidden)] // needed for `#[auto_type]`
241pub type HasAnyKey<Lhs, Rhs> = HasAnyKeyJsonb<Lhs, Rhs>;
242
243/// The return type of [`lsh.has_all_keys(rhs)`](super::expression_methods::PgJsonbExpressionMethods::has_all_keys)
244#[cfg(feature = "postgres_backend")]
245pub type HasAllKeysJsonb<Lhs, Rhs> =
246    Grouped<super::operators::HasAllKeysJsonb<Lhs, AsExprOf<Rhs, Array<VarChar>>>>;
247
248#[doc(hidden)] // needed for `#[auto_type]`
249pub type HasAllKeys<Lhs, Rhs> = HasAllKeysJsonb<Lhs, Rhs>;
250
251#[doc(hidden)]
252#[deprecated(note = "Use `dsl::Contains` instead")]
253pub type ContainsJsonb<Lhs, Rhs> = Contains<Lhs, Rhs>;
254
255#[doc(hidden)]
256#[deprecated(note = "Use `dsl::IsContainedBy` instead")]
257pub type IsContainedByJsonb<Lhs, Rhs> = IsContainedBy<Lhs, Rhs>;
258
259/// The return type of [`lhs.index(rhs)`](super::expression_methods::PgArrayExpressionMethods::index)
260#[cfg(feature = "postgres_backend")]
261pub type Index<Lhs, Rhs> = super::operators::ArrayIndex<Lhs, AsExprOf<Rhs, Integer>>;
262
263#[doc(hidden)]
264#[deprecated(note = "Use `Index` instead")]
265pub type ArrayIndex<Lhs, Rhs> = Index<Lhs, Rhs>;
266
267/// The return type of [`lhs.remove(rhs)`](super::expression_methods::PgJsonbExpressionMethods::remove)
268#[cfg(feature = "postgres_backend")]
269pub type RemoveFromJsonb<Lhs, Rhs, ST> =
270    Grouped<super::operators::RemoveFromJsonb<Lhs, AsExprOf<Rhs, ST>>>;
271
272#[doc(hidden)] // needed for `#[auto_type]`
273pub type Remove<Lhs, Rhs> = RemoveFromJsonb<
274    Lhs,
275    <Rhs as JsonRemoveIndex>::Expression,
276    <<Rhs as JsonRemoveIndex>::Expression as Expression>::SqlType,
277>;
278
279/// The return type of [`lhs.retrieve_as_object(rhs)`](super::expression_methods::PgAnyJsonExpressionMethods::retrieve_as_object)
280#[cfg(feature = "postgres_backend")]
281pub type RetrieveAsObjectJson<Lhs, Rhs, ST> =
282    Grouped<super::operators::RetrieveAsObjectJson<Lhs, AsExprOf<Rhs, ST>>>;
283
284#[doc(hidden)] // needed for `#[auto_type]`
285pub type RetrieveAsObject<Lhs, Rhs> = RetrieveAsObjectJson<
286    Lhs,
287    <Rhs as JsonIndex>::Expression,
288    <<Rhs as JsonIndex>::Expression as Expression>::SqlType,
289>;
290
291/// The return type of [`lhs.retrieve_as_text(rhs)`](super::expression_methods::PgAnyJsonExpressionMethods::retrieve_as_text)
292#[cfg(feature = "postgres_backend")]
293pub type RetrieveAsTextJson<Lhs, Rhs, ST> =
294    Grouped<super::operators::RetrieveAsTextJson<Lhs, AsExprOf<Rhs, ST>>>;
295
296#[doc(hidden)] // needed for `#[auto_type]`
297pub type RetrieveAsText<Lhs, Rhs> = RetrieveAsTextJson<
298    Lhs,
299    <Rhs as JsonIndex>::Expression,
300    <<Rhs as JsonIndex>::Expression as Expression>::SqlType,
301>;
302
303/// The return type of [`lhs.retrieve_by_path_as_object(rhs)`](super::expression_methods::PgAnyJsonExpressionMethods::retrieve_by_path_as_object)
304#[cfg(feature = "postgres_backend")]
305pub type RetrieveByPathAsObjectJson<Lhs, Rhs> =
306    Grouped<super::operators::RetrieveByPathAsObjectJson<Lhs, AsExprOf<Rhs, Array<VarChar>>>>;
307
308#[doc(hidden)] // needed for `#[auto_type]`
309pub type RetrieveByPathAsObject<Lhs, Rhs> = RetrieveByPathAsObjectJson<Lhs, Rhs>;
310
311/// The return type of [`lhs.retrieve_by_path_as_text(rhs)`](super::expression_methods::PgAnyJsonExpressionMethods::retrieve_by_path_as_text)
312#[cfg(feature = "postgres_backend")]
313pub type RetrieveByPathAsTextJson<Lhs, Rhs> =
314    Grouped<super::operators::RetrieveByPathAsTextJson<Lhs, AsExprOf<Rhs, Array<VarChar>>>>;
315
316#[doc(hidden)] // needed for `#[auto_type]`
317pub type RetrieveByPathAsText<Lhs, Rhs> = RetrieveByPathAsTextJson<Lhs, Rhs>;
318
319/// The return type of [`lhs.remove_by_path(rhs)`](super::expression_methods::PgJsonbExpressionMethods::remove_by_path)
320#[cfg(feature = "postgres_backend")]
321pub type RemoveByPathFromJsonb<Lhs, Rhs> =
322    Grouped<super::operators::RemoveByPathFromJsonb<Lhs, AsExprOf<Rhs, Array<VarChar>>>>;
323
324#[doc(hidden)] // needed for `#[auto_type]`
325pub type RemoveByPath<Lhs, Rhs> = RemoveByPathFromJsonb<Lhs, Rhs>;
326
327#[doc(hidden)]
328#[deprecated(note = "Use `dsl::Concat` instead")]
329pub type ConcatBinary<Lhs, Rhs> = crate::dsl::Concat<Lhs, Rhs>;
330
331#[doc(hidden)]
332#[deprecated(note = "Use `dsl::Like` instead")]
333pub type LikeBinary<Lhs, Rhs> = crate::dsl::Like<Lhs, Rhs>;
334
335#[doc(hidden)]
336#[deprecated(note = "Use `dsl::NotLike` instead")]
337pub type NotLikeBinary<Lhs, Rhs> = crate::dsl::NotLike<Lhs, Rhs>;
338
339#[doc(hidden)]
340#[deprecated(note = "Use `dsl::Concat` instead")]
341pub type ConcatArray<Lhs, Rhs> = crate::dsl::Concat<Lhs, Rhs>;
342
343/// Return type of [`array_to_string_with_null_string(arr, delim, null_str)`](super::functions::array_to_string_with_null_string())
344#[allow(non_camel_case_types)]
345#[cfg(feature = "postgres_backend")]
346pub type array_to_string_with_null_string<A, D, N> =
347    super::functions::array_to_string_with_null_string<
348        SqlTypeOf<A>, // The SQL type of the array
349        A,            // The array itself
350        D,            // The delimiter
351        N,            // The null string
352    >;
353
354/// Return type of [`array_to_string(arr, delim)`](super::functions::array_to_string())
355#[allow(non_camel_case_types)]
356#[cfg(feature = "postgres_backend")]
357pub type array_to_string<A, D> = super::functions::array_to_string<
358    SqlTypeOf<A>, // The SQL type of the array
359    A,            // The array itself
360    D,            // The delimiter
361>;
362
363/// Return type of [`lower(range)`](super::functions::lower())
364#[allow(non_camel_case_types)]
365#[cfg(feature = "postgres_backend")]
366pub type lower<R> = super::functions::lower<SqlTypeOf<R>, R>;
367
368/// Return type of [`upper(range)`](super::functions::upper())
369#[allow(non_camel_case_types)]
370#[cfg(feature = "postgres_backend")]
371pub type upper<R> = super::functions::upper<SqlTypeOf<R>, R>;
372
373/// Return type of [`isempty(range)`](super::functions::isempty())
374#[allow(non_camel_case_types)]
375#[cfg(feature = "postgres_backend")]
376pub type isempty<R> = super::functions::isempty<SqlTypeOf<R>, R>;
377
378/// Return type of [`lower_inc(range)`](super::functions::lower_inc())
379#[allow(non_camel_case_types)]
380#[cfg(feature = "postgres_backend")]
381pub type lower_inc<R> = super::functions::lower_inc<SqlTypeOf<R>, R>;
382
383/// Return type of [`upper_inc(range)`](super::functions::upper_inc())
384#[allow(non_camel_case_types)]
385#[cfg(feature = "postgres_backend")]
386pub type upper_inc<R> = super::functions::upper_inc<SqlTypeOf<R>, R>;
387
388/// Return type of [`lower_inf(range)`](super::functions::lower_inf())
389#[allow(non_camel_case_types)]
390#[cfg(feature = "postgres_backend")]
391pub type lower_inf<R> = super::functions::lower_inf<SqlTypeOf<R>, R>;
392
393/// Return type of [`upper_inf(range)`](super::functions::upper_inf())
394#[allow(non_camel_case_types)]
395#[cfg(feature = "postgres_backend")]
396pub type upper_inf<R> = super::functions::upper_inf<SqlTypeOf<R>, R>;
397
398/// Return type of [`range_merge(range_a, range_b)`](super::functions::range_merge())
399#[allow(non_camel_case_types)]
400#[cfg(feature = "postgres_backend")]
401pub type range_merge<R1, R2> = super::functions::range_merge<SqlTypeOf<R1>, SqlTypeOf<R2>, R1, R2>;
402
403/// Return type of [`multirange_merge(multirange)`](super::functions::multirange_merge())
404#[allow(non_camel_case_types)]
405#[cfg(feature = "postgres_backend")]
406pub type multirange_merge<R> = super::functions::multirange_merge<SqlTypeOf<R>, R>;
407
408/// Return type of [`array_append(array, element)`](super::functions::array_append())
409#[allow(non_camel_case_types)]
410#[cfg(feature = "postgres_backend")]
411pub type array_append<A, E> = super::functions::array_append<SqlTypeOf<A>, SqlTypeOf<E>, A, E>;
412
413/// Return type of [`array_replace(array, element, replace_with)`](super::functions::array_replace())
414#[allow(non_camel_case_types)]
415#[cfg(feature = "postgres_backend")]
416pub type array_replace<A, E, R> =
417    super::functions::array_replace<SqlTypeOf<A>, SqlTypeOf<E>, A, E, R>;
418
419/// Return type of [`array_dims(array)`](super::functions::array_append())
420#[allow(non_camel_case_types)]
421#[cfg(feature = "postgres_backend")]
422pub type array_dims<A> = super::functions::array_dims<SqlTypeOf<A>, A>;
423
424/// Return type of [`array_prepend(element, array)`](super::functions::array_prepend())
425#[allow(non_camel_case_types)]
426#[cfg(feature = "postgres_backend")]
427pub type array_prepend<E, A> = super::functions::array_prepend<SqlTypeOf<E>, SqlTypeOf<A>, E, A>;
428
429/// Return type of [`array_remove(array, element)`](super::functions::array_remove())
430#[allow(non_camel_case_types)]
431#[cfg(feature = "postgres_backend")]
432pub type array_remove<A, E> = super::functions::array_remove<SqlTypeOf<A>, SqlTypeOf<E>, A, E>;
433
434/// Return type of [`cardinality(array)`](super::functions::cardinality())
435#[allow(non_camel_case_types)]
436#[cfg(feature = "postgres_backend")]
437pub type cardinality<A> = super::functions::cardinality<SqlTypeOf<A>, A>;
438
439/// Return type of [`trim_array(array)`](super::functions::trim_array())
440#[allow(non_camel_case_types)]
441#[cfg(feature = "postgres_backend")]
442pub type trim_array<A, N> = super::functions::trim_array<SqlTypeOf<A>, A, N>;
443
444/// Return type of [`array_cat(array_a, array_b)`](super::functions::array_cat())
445#[allow(non_camel_case_types)]
446#[cfg(feature = "postgres_backend")]
447pub type array_cat<A, B> = super::functions::array_cat<SqlTypeOf<A>, A, B>;
448
449/// Return type of [`array_length(array, dimension)`](super::functions::array_length())
450#[allow(non_camel_case_types)]
451#[cfg(feature = "postgres_backend")]
452pub type array_length<A, D> = super::functions::array_length<SqlTypeOf<A>, A, D>;
453
454/// Return type of [`array_fill(value,array)`](super::functions::array_fill())
455#[allow(non_camel_case_types)]
456#[cfg(feature = "postgres_backend")]
457pub type array_fill<E, A> = super::functions::array_fill<SqlTypeOf<E>, E, A>;
458
459/// Return type of [`array_fill_with_lower_bound(value,array,array)`](super::functions::array_fill_with_lower_bound())
460#[allow(non_camel_case_types)]
461#[cfg(feature = "postgres_backend")]
462pub type array_fill_with_lower_bound<E, A1, A2> =
463    super::functions::array_fill_with_lower_bound<SqlTypeOf<E>, E, A1, A2>;
464
465/// Return type of [`array_lower(array, bound)`](super::functions::array_lower())
466#[allow(non_camel_case_types)]
467#[cfg(feature = "postgres_backend")]
468pub type array_lower<A, D> = super::functions::array_lower<SqlTypeOf<A>, A, D>;
469
470/// Return type of [`array_upper(array, bound)`](super::functions::array_upper())
471#[allow(non_camel_case_types)]
472#[cfg(feature = "postgres_backend")]
473pub type array_upper<A, D> = super::functions::array_upper<SqlTypeOf<A>, A, D>;
474
475/// Return type of [`array_position(array, element)`](super::functions::array_position())
476#[allow(non_camel_case_types)]
477#[cfg(feature = "postgres_backend")]
478pub type array_position<A, E> = super::functions::array_position<SqlTypeOf<A>, SqlTypeOf<E>, A, E>;
479
480/// Return type of [`array_position_with_subscript(array,element, subscript)`](super::functions::array_position_with_subscript())
481#[allow(non_camel_case_types)]
482#[cfg(feature = "postgres_backend")]
483pub type array_position_with_subscript<A, E, S> =
484    super::functions::array_position_with_subscript<SqlTypeOf<A>, SqlTypeOf<E>, A, E, S>;
485
486/// Return type of [`array_positions(array, element)`](super::functions::array_positions())
487#[allow(non_camel_case_types)]
488#[cfg(feature = "postgres_backend")]
489pub type array_positions<A, E> =
490    super::functions::array_positions<SqlTypeOf<A>, SqlTypeOf<E>, A, E>;
491
492/// Return type of [`array_ndims(array)`](super::functions::array_ndims())
493#[allow(non_camel_case_types)]
494#[cfg(feature = "postgres_backend")]
495pub type array_ndims<A> = super::functions::array_ndims<SqlTypeOf<A>, A>;
496
497/// Return type of [`array_shuffle(array)`](super::functions::array_shuffle())
498#[allow(non_camel_case_types)]
499#[cfg(feature = "postgres_backend")]
500pub type array_shuffle<A> = super::functions::array_shuffle<SqlTypeOf<A>, A>;
501
502/// Return type of [`array_sample(array,n)`](super::functions::array_sample())
503#[allow(non_camel_case_types)]
504#[cfg(feature = "postgres_backend")]
505pub type array_sample<A, N> = super::functions::array_sample<SqlTypeOf<A>, A, N>;
506
507/// Return type of [`array_to_json(array)`](super::functions::array_to_json())
508#[allow(non_camel_case_types)]
509#[cfg(feature = "postgres_backend")]
510pub type array_to_json<A> = super::functions::array_to_json<SqlTypeOf<A>, A>;
511
512/// Return type of [`to_json(element)`](super::functions::to_json())
513#[allow(non_camel_case_types)]
514#[cfg(feature = "postgres_backend")]
515pub type to_json<E> = super::functions::to_json<SqlTypeOf<E>, E>;
516
517/// Return type of [`to_jsonb(element)`](super::functions::to_jsonb())
518#[allow(non_camel_case_types)]
519#[cfg(feature = "postgres_backend")]
520pub type to_jsonb<E> = super::functions::to_jsonb<SqlTypeOf<E>, E>;
521
522/// Return type of [`json_object(text_array)`](super::functions::json_object())
523#[allow(non_camel_case_types)]
524#[cfg(feature = "postgres_backend")]
525pub type json_object<A> = super::functions::json_object<SqlTypeOf<A>, A>;
526
527/// Return type of [`json_object_with_keys_and_values(text_array, text_array)`](super::functions::json_object_with_keys_and_values())
528#[allow(non_camel_case_types)]
529#[cfg(feature = "postgres_backend")]
530pub type json_object_with_keys_and_values<K, V> =
531    super::functions::json_object_with_keys_and_values<SqlTypeOf<K>, SqlTypeOf<V>, K, V>;
532
533/// Return type of [`json_typeof(json)`](super::functions::json_typeof())
534#[allow(non_camel_case_types)]
535#[cfg(feature = "postgres_backend")]
536pub type json_typeof<E> = super::functions::json_typeof<SqlTypeOf<E>, E>;
537
538/// Return type of [`jsonb_typeof(jsonb)`](super::functions::jsonb_typeof())
539#[allow(non_camel_case_types)]
540#[cfg(feature = "postgres_backend")]
541pub type jsonb_typeof<E> = super::functions::jsonb_typeof<SqlTypeOf<E>, E>;
542
543/// Return type of [`jsonb_pretty(jsonb)`](super::functions::jsonb_pretty())
544#[allow(non_camel_case_types)]
545#[cfg(feature = "postgres_backend")]
546pub type jsonb_pretty<E> = super::functions::jsonb_pretty<SqlTypeOf<E>, E>;
547
548/// Return type of [`json_strip_nulls(json)`](super::functions::json_strip_nulls())
549#[allow(non_camel_case_types)]
550#[cfg(feature = "postgres_backend")]
551pub type json_strip_nulls<E> = super::functions::json_strip_nulls<SqlTypeOf<E>, E>;
552
553/// Return type of [`jsonb_strip_nulls(jsonb)`](super::functions::jsonb_strip_nulls())
554#[allow(non_camel_case_types)]
555#[cfg(feature = "postgres_backend")]
556pub type jsonb_strip_nulls<E> = super::functions::jsonb_strip_nulls<SqlTypeOf<E>, E>;
557
558/// Return type of [`json_array_length(json)`](super::functions::json_array_length())
559#[allow(non_camel_case_types)]
560#[cfg(feature = "postgres_backend")]
561pub type json_array_length<E> = super::functions::json_array_length<SqlTypeOf<E>, E>;
562
563/// Return type of [`jsonb_array_length(jsonb)`](super::functions::jsonb_array_length())
564#[allow(non_camel_case_types)]
565#[cfg(feature = "postgres_backend")]
566pub type jsonb_array_length<E> = super::functions::jsonb_array_length<SqlTypeOf<E>, E>;
567
568/// Return type of [`jsonb_object(text_array)`](super::functions::jsonb_object())
569#[allow(non_camel_case_types)]
570#[cfg(feature = "postgres_backend")]
571pub type jsonb_object<A> = super::functions::jsonb_object<SqlTypeOf<A>, A>;
572
573/// Return type of [`jsonb_object_with_keys_and_values(text_array, text_array)`](super::functions::jsonb_object_with_keys_and_values())
574#[allow(non_camel_case_types)]
575#[cfg(feature = "postgres_backend")]
576pub type jsonb_object_with_keys_and_values<K, V> =
577    super::functions::jsonb_object_with_keys_and_values<SqlTypeOf<K>, SqlTypeOf<V>, K, V>;
578
579/// Return type of [`row_to_json(record)`](super::functions::row_to_json())
580#[allow(non_camel_case_types)]
581#[cfg(feature = "postgres_backend")]
582pub type row_to_json<R> = super::functions::row_to_json<SqlTypeOf<R>, R>;
583
584/// Return type of [`json_populate_record(base, json)`](super::functions::json_populate_record())
585#[allow(non_camel_case_types)]
586#[cfg(feature = "postgres_backend")]
587pub type json_populate_record<B, J> =
588    super::functions::json_populate_record<SqlTypeOf<B>, SqlTypeOf<J>, B, J>;
589
590/// Return type of [`jsonb_populate_record(base, json)`](super::functions::jsonb_populate_record())
591#[allow(non_camel_case_types)]
592#[cfg(feature = "postgres_backend")]
593pub type jsonb_populate_record<B, J> =
594    super::functions::jsonb_populate_record<SqlTypeOf<B>, SqlTypeOf<J>, B, J>;
595
596/// Return type of [`jsonb_set(base, path, new_value)`](super::functions::jsonb_set())
597#[allow(non_camel_case_types)]
598#[cfg(feature = "postgres_backend")]
599pub type jsonb_set<B, J, R> = super::functions::jsonb_set<SqlTypeOf<B>, SqlTypeOf<J>, B, J, R>;
600
601/// Return type of [`jsonb_set_create_if_missing(base, path, new_value, create_if_missing)`](super::functions::jsonb_set_create_if_missing())
602#[allow(non_camel_case_types)]
603#[cfg(feature = "postgres_backend")]
604pub type jsonb_set_create_if_missing<B, J, R, C> =
605    super::functions::jsonb_set_create_if_missing<SqlTypeOf<B>, SqlTypeOf<J>, B, J, R, C>;
606
607/// Return type of [`jsonb_set_lax(base, path, new_value, create_if_missing, null_value_treatment)`](super::functions::jsonb_set_lax())
608#[allow(non_camel_case_types)]
609#[cfg(feature = "postgres_backend")]
610pub type jsonb_set_lax<B, J, R, C, E> =
611    super::functions::jsonb_set_lax<SqlTypeOf<B>, SqlTypeOf<J>, B, J, R, C, E>;
612
613/// Return type of [`jsonb_insert(base, path, new_value)`](super::functions::jsonb_insert())
614#[allow(non_camel_case_types)]
615#[cfg(feature = "postgres_backend")]
616pub type jsonb_insert<B, J, R> =
617    super::functions::jsonb_insert<SqlTypeOf<B>, SqlTypeOf<J>, B, J, R>;
618
619/// Return type of [`jsonb_insert_with_insert_after(base, path, new_value, insert_after)`](super::functions::jsonb_insert_with_insert_after())
620#[allow(non_camel_case_types)]
621#[cfg(feature = "postgres_backend")]
622pub type jsonb_insert_with_insert_after<B, J, R, I> =
623    super::functions::jsonb_insert_with_insert_after<SqlTypeOf<B>, SqlTypeOf<J>, B, J, R, I>;