mirror of
https://github.com/tursodatabase/limbo.git
synced 2025-08-04 18:18:03 +00:00
Fix .schema
- Add tests for .schema - Make command line sql arguments to allow .commands
This commit is contained in:
parent
0f85c36416
commit
5b4bdc8aa3
4 changed files with 40 additions and 2 deletions
|
@ -40,7 +40,11 @@ fn main() -> anyhow::Result<()> {
|
|||
let db = Database::open_file(io.clone(), path)?;
|
||||
let conn = db.connect();
|
||||
if let Some(sql) = opts.sql {
|
||||
query(io.clone(), &conn, &sql, &opts.output_mode)?;
|
||||
if sql.trim().starts_with('.') {
|
||||
handle_dot_command(io.clone(), &conn, &sql)?;
|
||||
} else {
|
||||
query(io.clone(), &conn, &sql, &opts.output_mode)?;
|
||||
}
|
||||
return Ok(());
|
||||
}
|
||||
let mut rl = DefaultEditor::new()?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue