Debian Codegraph @

src/expression/functions/helper_types.rs

raw
1 #![allow(non_camel_case_types)]
2
3 use crate::dsl::SqlTypeOf;
4 use crate::expression::grouped::Grouped;
5 use crate::expression::operators;
6
7 /// The return type of [`not(expr)`](crate::dsl::not())
8 pub type not<Expr> = operators::Not<Grouped<Expr>>;
9
10 /// The return type of [`max(expr)`](crate::dsl::max())
11 pub type max<Expr> = super::aggregate_ordering::max<SqlTypeOf<Expr>, Expr>;
12
13 /// The return type of [`min(expr)`](crate::dsl::min())
14 pub type min<Expr> = super::aggregate_ordering::min<SqlTypeOf<Expr>, Expr>;
15
16 /// The return type of [`sum(expr)`](crate::dsl::sum())
17 pub type sum<Expr> = super::aggregate_folding::sum<SqlTypeOf<Expr>, Expr>;
18
19 /// The return type of [`avg(expr)`](crate::dsl::avg())
20 pub type avg<Expr> = super::aggregate_folding::avg<SqlTypeOf<Expr>, Expr>;
21
22 /// The return type of [`exists(expr)`](crate::dsl::exists())
23 pub type exists<Expr> = crate::expression::exists::Exists<Expr>;
24
25 /// The return type of [`lag(expr)`](crate::dsl::lag())
26 pub type lag<Expr> = super::window_functions::lag<SqlTypeOf<Expr>, Expr>;
27 /// The return type of [`lag_with_offset(expr, offset)`](crate::dsl::lag_with_offset())
28 pub type lag_with_offset<V, O> = super::window_functions::lag_with_offset<SqlTypeOf<V>, V, O>;
29 /// The return type of [`lag_with_offset_and_default(expr, offset)`](crate::dsl::lag_with_offset_and_default())
30 pub type lag_with_offset_and_default<V, O, D> =
31 super::window_functions::lag_with_offset_and_default<SqlTypeOf<V>, SqlTypeOf<D>, V, O, D>;
32 /// The return type of [`lead(expr)`](crate::dsl::lead())
33 pub type lead<Expr> = super::window_functions::lead<SqlTypeOf<Expr>, Expr>;
34 /// The return type of [`lead_with_offset(expr, offset)`](crate::dsl::lead_with_offset())
35 pub type lead_with_offset<V, O> = super::window_functions::lead_with_offset<SqlTypeOf<V>, V, O>;
36 /// The return type of [`lead_with_offset_and_default(expr, offset)`](crate::dsl::lead_with_offset_and_default())
37 pub type lead_with_offset_and_default<V, O, D> =
38 super::window_functions::lead_with_offset_and_default<SqlTypeOf<V>, SqlTypeOf<D>, V, O, D>;
39 /// The return type of [`first_value(expr)`](crate::dsl::first_value())
40 pub type first_value<Expr> = super::window_functions::first_value<SqlTypeOf<Expr>, Expr>;
41 /// The return type of [`last_value(expr)`](crate::dsl::last_value())
42 pub type last_value<Expr> = super::window_functions::last_value<SqlTypeOf<Expr>, Expr>;
43 /// The return type of [`nth_value(expr, n)`](crate::dsl::nth_value())
44 pub type nth_value<V, N> = super::window_functions::nth_value<SqlTypeOf<V>, V, N>;
45
46 #[doc(inline)]
47 pub use super::aggregate_expressions::dsl::*;