-
Notifications
You must be signed in to change notification settings - Fork 1
Select attributes
Andrey edited this page Oct 1, 2024
·
2 revisions
Fields that are marked by these attributes - are used to render Order by part of SQL statement.
#[derive(SelectDbEntity)]
pub struct MyDto {
#[order_by]
pub dt_from: String,
}
Wraps the content while rendering select field and replacing ${} with the name of the struct property name
#[derive(Debug, Clone, PartialEq, SelectDbEntity)]
pub struct DbInfoEntity {
pub table_schema: Option<String>,
pub table_name: Option<String>,
#[wrap_column_name("pg_total_relation_size(table_schema || '.' || table_name) AS ${}")]
pub total_size: Option<i64>,
}