mirror of
https://github.com/aljazceru/turso.git
synced 2026-02-23 08:55:40 +01:00
Fix limbo output to match sqlite3
Fix the output of the `limbo` program to match `sqlite3` to simplify testing.
This commit is contained in:
18
cli/main.rs
18
cli/main.rs
@@ -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!();
|
||||
|
||||
Reference in New Issue
Block a user