sift_query_sqlx/postgres/
sum.rs1pub trait PgSummaryValue {}
2impl PgSummaryValue for i64 {}
3impl PgSummaryValue for f32 {}
4impl PgSummaryValue for f64 {}
5#[cfg(feature = "decimal")]
6impl PgSummaryValue for rust_decimal::Decimal {}
7
8pub trait PgSumType {
9 type Output: PgSummaryValue;
10}
11
12impl PgSumType for i32 {
13 type Output = i64;
14}
15
16#[cfg(feature = "decimal")]
17impl PgSumType for i64 {
18 type Output = rust_decimal::Decimal;
19}
20
21#[cfg(feature = "decimal")]
22impl PgSumType for rust_decimal::Decimal {
23 type Output = rust_decimal::Decimal;
24}
25
26impl PgSumType for f32 {
27 type Output = f32;
28}
29
30impl PgSumType for f64 {
31 type Output = f64;
32}