mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:37:46 +00:00
SQLServer+SQLStudio+sql: Allow sending placeholder values to SQLServer
This commit is contained in:
parent
b13527b8b2
commit
8fcb8c30c6
7 changed files with 16 additions and 10 deletions
|
@ -61,19 +61,20 @@ void SQLStatement::report_error(SQL::Result result)
|
|||
m_result = {};
|
||||
}
|
||||
|
||||
void SQLStatement::execute()
|
||||
void SQLStatement::execute(Vector<SQL::Value> placeholder_values)
|
||||
{
|
||||
dbgln_if(SQLSERVER_DEBUG, "SQLStatement::execute(statement_id {}", statement_id());
|
||||
|
||||
auto client_connection = ConnectionFromClient::client_connection_for(connection()->client_id());
|
||||
if (!client_connection) {
|
||||
warnln("Cannot yield next result. Client disconnected");
|
||||
return;
|
||||
}
|
||||
|
||||
deferred_invoke([this] {
|
||||
deferred_invoke([this, placeholder_values = move(placeholder_values)] {
|
||||
VERIFY(!connection()->database().is_null());
|
||||
|
||||
auto execution_result = m_statement->execute(connection()->database().release_nonnull());
|
||||
auto execution_result = m_statement->execute(connection()->database().release_nonnull(), placeholder_values);
|
||||
if (execution_result.is_error()) {
|
||||
report_error(execution_result.release_error());
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue