fn build_proposals_query<'a, DB: 'a + Backend>(
    filter: Vec<Constraint>,
    order_by: Vec<OrderBy>
) -> Result<BoxedSelectStatement<'a, (Integer, Text, Text, Text, Text, Text, BigInt, Text, Text, BigInt, Text, Text, Text, Text, Binary, Array<Text>, Integer, Nullable<Text>, Integer, BigInt, BigInt, BigInt, Text, Text, Integer, Text, Nullable<Text>, Nullable<Text>, Nullable<Text>, Nullable<Text>, Nullable<Text>, BigInt, Text, Text), table, DB>, HandleError>