#[derive(Queryable)]
{
// Attributes available to this derive:
#[table]
#[where_clause]
#[select]
#[join]
#[group_by]
#[order_by]
#[having]
#[limit]
#[offset]
#[distinct]
#[result_type]
}
Expand description
Derive macro for generating SELECT queries.
§Attributes
table: The name of the table to select fromwhere_clause: The WHERE clause for the SELECT statementselect: The columns to select (optional)join: JOIN clauses (optional)group_by: GROUP BY clause (optional)order_by: ORDER BY clause (optional)having: HAVING clause (optional)limit: LIMIT clause (optional)offset: OFFSET clause (optional)distinct: Make query return distinct results (optional)result_type: The type to return as query result (optional, defaults to self)