Add ToSql impl for bool.

This commit is contained in:
John Gallagher
2016-05-26 00:05:00 -04:00
parent 9125826534
commit 13bff6fab6
2 changed files with 7 additions and 0 deletions

View File

@@ -24,6 +24,12 @@ impl From<Null> for Value {
}
}
impl From<bool> for Value {
fn from(i: bool) -> Value {
Value::Integer(i as i64)
}
}
impl From<i32> for Value {
fn from(i: i32) -> Value {
Value::Integer(i as i64)