We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Since it's possible to mark fields as GroupBy attributes - aggregate fields are needed.
These structs are in module my_postgres::group_by_fields.
Example of GroupByDto
#[derive(SelectDbEntity, Debug)] pub struct MinMaxKeySelectDto { #[group_by] pub candle_type: i64, #[group_by] pub instrument_id: String, pub is_bid: bool, #[db_column_name("date")] pub min: GroupByMin<i64>, #[db_column_name("date")] pub max: GroupByMax<i64>, }
Which would generate SELECT statement
SELECT candle_type,instrument_id,is_bid,MIN(date)::bigint as "min",MAX(date)::bigint as "max"