mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-24 03:34:18 +01:00
cli: Improve .schema command output on errors
Improve `.schema` output on errors by marking them as comments. This allows you to pipe any `.schema` output to another shell.
This commit is contained in:
@@ -724,9 +724,9 @@ impl Limbo {
|
|||||||
if !found {
|
if !found {
|
||||||
if let Some(table_name) = table {
|
if let Some(table_name) = table {
|
||||||
let _ = self
|
let _ = self
|
||||||
.write_fmt(format_args!("Error: Table '{}' not found.", table_name));
|
.write_fmt(format_args!("-- Error: Table '{}' not found.", table_name));
|
||||||
} else {
|
} else {
|
||||||
let _ = self.writeln("No tables or indexes found in the database.");
|
let _ = self.writeln("-- No tables or indexes found in the database.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -227,7 +227,7 @@ do_execshell_test(
|
|||||||
pipe,
|
pipe,
|
||||||
"test-can-switch-back-to-in-memory",
|
"test-can-switch-back-to-in-memory",
|
||||||
".schema users",
|
".schema users",
|
||||||
"Error: Table 'users' not found.",
|
"-- Error: Table 'users' not found.",
|
||||||
)
|
)
|
||||||
|
|
||||||
do_execshell_test(pipe, "test-verify-null-value", "select NULL;", "LIMBO")
|
do_execshell_test(pipe, "test-verify-null-value", "select NULL;", "LIMBO")
|
||||||
|
|||||||
Reference in New Issue
Block a user