Fix limbo output to match sqlite3

Fix the output of the `limbo` program to match `sqlite3` to simplify
testing.
This commit is contained in:
Pekka Enberg
2024-06-19 16:06:20 +03:00
parent c89924c5a1
commit 70b73e7535

View File

@@ -79,14 +79,16 @@ fn query(
OutputMode::Raw => loop {
match rows.next()? {
RowResult::Row(row) => {
print!("|");
for val in row.values.iter() {
match val {
Value::Null => print!("NULL|"),
Value::Integer(i) => print!("{}|", i),
Value::Float(f) => print!("{}|", f),
Value::Text(s) => print!("{}|", s),
Value::Blob(b) => print!("{:?}|", b),
for (i, value) in row.values.iter().enumerate() {
if i > 0 {
print!("|");
}
match value {
Value::Null => print!("NULL"),
Value::Integer(i) => print!("{}", i),
Value::Float(f) => print!("{}", f),
Value::Text(s) => print!("{}", s),
Value::Blob(b) => print!("{:?}", b),
}
}
println!();