Part 4: add Uuid to query arguments.

This commit is contained in:
Richard Newman 2017-04-26 17:25:55 -07:00
parent 3a7e2752a5
commit 58a310a6e1

View file

@ -140,6 +140,12 @@ impl QueryBuilder for SQLiteQueryBuilder {
&Boolean(v) => self.push_sql(if v { "1" } else { "0" }),
&Long(v) => self.push_sql(v.to_string().as_str()),
&Double(OrderedFloat(v)) => self.push_sql(v.to_string().as_str()),
&Uuid(ref u) => {
// Get a byte array.
let bytes = u.as_bytes().clone();
let v = Rc::new(rusqlite::types::Value::Blob(bytes.to_vec()));
self.push_static_arg(v);
},
// These are both `Rc`. Unfortunately, we can't use that fact when
// turning these into rusqlite Values.
&String(ref s) => {