Part 4: add Uuid to query arguments.
This commit is contained in:
parent
3a7e2752a5
commit
58a310a6e1
1 changed files with 6 additions and 0 deletions
|
@ -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) => {
|
||||
|
|
Loading…
Reference in a new issue