sql_builder/func.rs
1//! For calling built-in SQL functions.
2
3use crate::{expr::*, query::Condition, types::*};
4
5pub use crate::extension::postgres::PgFunc;
6
7mod aggregate;
8mod bitwise;
9mod call;
10mod cast;
11
12pub use call::*;
13
14/// Known SQL functions.
15///
16/// If something is not supported here, you can use [`Func::Custom`].
17#[derive(Debug, Clone, PartialEq)]
18pub enum Func {
19 Max,
20 Min,
21 Sum,
22 Avg,
23 Abs,
24 Count,
25 IfNull,
26 Greatest,
27 Least,
28 CharLength,
29 Cast,
30 Custom(DynIden),
31 Coalesce,
32 Lower,
33 Upper,
34 BitAnd,
35 BitOr,
36 Random,
37 Round,
38 Md5,
39
40 PgFunction(PgFunc),
41}