mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 00:25:12 +00:00
sql+SQLStudio: Recover from errors preparing SQL statements
In both applications, display the SQL statement that failed to parse. For the REPL, ensure the REPL prompts the user for another statement. For SQLStudio, we don't continue executing the script as it likely does not make sense to run statements that come after a failed statement.
This commit is contained in:
committed by
Andreas Kling
parent
c08956028a
commit
82363aa1c4
@@ -275,6 +275,11 @@ private:
|
||||
});
|
||||
} else if (auto statement_id = m_sql_client->prepare_statement(m_connection_id, piece); statement_id.has_value()) {
|
||||
m_sql_client->async_execute_statement(*statement_id, {});
|
||||
} else {
|
||||
warnln("\033[33;1mError parsing SQL statement\033[0m: {}", piece);
|
||||
m_loop.deferred_invoke([this]() {
|
||||
read_sql();
|
||||
});
|
||||
}
|
||||
|
||||
// ...But m_keep_running can also be set to false by a command handler.
|
||||
|
||||
Reference in New Issue
Block a user