mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:07:47 +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
|
@ -71,12 +71,13 @@ Messages::SQLServer::PrepareStatementResponse ConnectionFromClient::prepare_stat
|
|||
return { result.value() };
|
||||
}
|
||||
|
||||
void ConnectionFromClient::execute_statement(int statement_id)
|
||||
void ConnectionFromClient::execute_statement(int statement_id, Vector<SQL::Value> const& placeholder_values)
|
||||
{
|
||||
dbgln_if(SQLSERVER_DEBUG, "ConnectionFromClient::execute_query_statement(statement_id: {})", statement_id);
|
||||
auto statement = SQLStatement::statement_for(statement_id);
|
||||
if (statement && statement->connection()->client_id() == client_id()) {
|
||||
statement->execute();
|
||||
// FIXME: Support taking parameters from IPC requests.
|
||||
statement->execute(move(const_cast<Vector<SQL::Value>&>(placeholder_values)));
|
||||
} else {
|
||||
dbgln_if(SQLSERVER_DEBUG, "Statement has disappeared");
|
||||
async_execution_error(statement_id, (int)SQL::SQLErrorCode::StatementUnavailable, DeprecatedString::formatted("{}", statement_id));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue