mirror of
https://github.com/isar/rusqlite.git
synced 2024-11-26 19:41:37 +08:00
Add ToSql impl for bool
.
This commit is contained in:
parent
9125826534
commit
13bff6fab6
@ -49,6 +49,7 @@ macro_rules! to_sql_self(
|
|||||||
);
|
);
|
||||||
|
|
||||||
to_sql_self!(Null);
|
to_sql_self!(Null);
|
||||||
|
to_sql_self!(bool);
|
||||||
to_sql_self!(i32);
|
to_sql_self!(i32);
|
||||||
to_sql_self!(i64);
|
to_sql_self!(i64);
|
||||||
to_sql_self!(f64);
|
to_sql_self!(f64);
|
||||||
|
@ -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 {
|
impl From<i32> for Value {
|
||||||
fn from(i: i32) -> Value {
|
fn from(i: i32) -> Value {
|
||||||
Value::Integer(i as i64)
|
Value::Integer(i as i64)
|
||||||
|
Loading…
Reference in New Issue
Block a user