deuterium 0.3.1

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
11
12
13
14
15
use super::super::placeholder;
use super::value::{self, ToPredicateValue};

impl value::ToPredicateValue for placeholder::Placeholder {
    fn to_predicate_value(&self, ctx: &mut super::SqlContext) -> String {
        ctx.expl_indexed_placeholder(self.get_idx());
        ctx.adapter().placeholder(self.get_idx())
    }
}

impl super::ToSql for placeholder::Placeholder {
    fn to_sql(&self, ctx: &mut super::SqlContext) -> String {
        self.to_predicate_value(ctx)
    }
}