mirror of
https://github.com/tursodatabase/limbo.git
synced 2025-08-04 10:08:20 +00:00
Display blob literals in .dump
This commit is contained in:
parent
c393ce896a
commit
dbe0a64d50
1 changed files with 5 additions and 0 deletions
|
@ -307,6 +307,11 @@ impl<'a> Limbo<'a> {
|
|||
|| value_type.contains("TEXT")
|
||||
{
|
||||
format!("'{}'", value.to_string().replace("'", "''"))
|
||||
} else if value_type.contains("BLOB") {
|
||||
let blob = value.to_blob().unwrap_or(&[]);
|
||||
let hex_string: String =
|
||||
blob.iter().map(|b| format!("{:02x}", b)).collect();
|
||||
format!("X'{}'", hex_string)
|
||||
} else {
|
||||
value.to_string()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue