diesel/expression/functions/
helper_types.rs

1#![allow(non_camel_case_types)]
2
3use crate::dsl::SqlTypeOf;
4use crate::expression::grouped::Grouped;
5use crate::expression::operators;
6
7/// The return type of [`not(expr)`](crate::dsl::not())
8pub type not<Expr> = operators::Not<Grouped<Expr>>;
9
10/// The return type of [`max(expr)`](crate::dsl::max())
11pub type max<Expr> = super::aggregate_ordering::max<SqlTypeOf<Expr>, Expr>;
12
13/// The return type of [`min(expr)`](crate::dsl::min())
14pub type min<Expr> = super::aggregate_ordering::min<SqlTypeOf<Expr>, Expr>;
15
16/// The return type of [`sum(expr)`](crate::dsl::sum())
17pub type sum<Expr> = super::aggregate_folding::sum<SqlTypeOf<Expr>, Expr>;
18
19/// The return type of [`avg(expr)`](crate::dsl::avg())
20pub type avg<Expr> = super::aggregate_folding::avg<SqlTypeOf<Expr>, Expr>;
21
22/// The return type of [`exists(expr)`](crate::dsl::exists())
23pub type exists<Expr> = crate::expression::exists::Exists<Expr>;
24
25/// The return type of [`lag(expr)`](crate::dsl::lag())
26pub 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())
28pub 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())
30pub 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())
33pub 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())
35pub 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())
37pub 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())
40pub type first_value<Expr> = super::window_functions::first_value<SqlTypeOf<Expr>, Expr>;
41/// The return type of [`last_value(expr)`](crate::dsl::last_value())
42pub 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())
44pub type nth_value<V, N> = super::window_functions::nth_value<SqlTypeOf<V>, V, N>;
45
46#[doc(inline)]
47pub use super::aggregate_expressions::dsl::*;