Fix SqlAdapter::format_blob (rusqlite API change)

https://docs.rs/rusqlite/0.20.0/rusqlite/types/enum.ValueRef.html#method.as_str
This commit is contained in:
Oleksii Filonenko 2019-07-27 22:08:50 +03:00
parent 611fba3755
commit 9d6cea3d40
No known key found for this signature in database
GPG Key ID: F3510FE5691629A1

View File

@ -46,7 +46,7 @@ fn format_blob(b: ValueRef) -> String {
Null => "NULL".to_owned(),
Integer(i) => format!("{}", i),
Real(i) => format!("{}", i),
Text(i) => format!("'{}'", i.replace("'", "''")),
Text(i) => format!("'{}'", String::from_utf8_lossy(i).replace("'", "''")),
Blob(b) => format!(
"[blob {}B]",
size_format::SizeFormatterSI::new(