deuterium 0.3.2

Deuterium is a fancy SQL builder for Rust. It's designed to provide a DSL to easily build SQL queries in safe and *typed* way.
1
2
3
4
5
6
7
8
9
10
use super::super::order_by;

impl super::ToSql for order_by::OrderBy {
    fn to_sql(&self, ctx: &mut super::SqlContext) -> String {
        format!("{} {}", self.get_by().expression_as_sql().to_sql(ctx), match self.get_order() {
            &order_by::Order::Asc => "ASC",
            &order_by::Order::Desc => "DESC"
        })
    }
}