mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 16:37:47 +00:00
LibSQL+SQLServer+SQLStudio+sql: Send result rows over IPC as SQL::Value
We've been sending the values converted to a string, but now that the Value type is transferrable over IPC, send the values themselves. Any client that wants the value as a string may do so easily, whereas this will allow less trivial clients to avoid string parsing.
This commit is contained in:
parent
27ce88864f
commit
b9d8c25b0b
8 changed files with 17 additions and 18 deletions
|
@ -1,9 +1,10 @@
|
|||
#include <LibSQL/Result.h>
|
||||
#include <LibSQL/Value.h>
|
||||
|
||||
endpoint SQLClient
|
||||
{
|
||||
execution_success(u64 statement_id, u64 execution_id, bool has_results, size_t created, size_t updated, size_t deleted) =|
|
||||
next_result(u64 statement_id, u64 execution_id, Vector<DeprecatedString> row) =|
|
||||
next_result(u64 statement_id, u64 execution_id, Vector<SQL::Value> row) =|
|
||||
results_exhausted(u64 statement_id, u64 execution_id, size_t total_rows) =|
|
||||
execution_error(u64 statement_id, u64 execution_id, SQL::SQLErrorCode code, DeprecatedString message) =|
|
||||
}
|
||||
|
|
|
@ -125,7 +125,7 @@ void SQLStatement::next(u64 execution_id, SQL::ResultSet result, size_t result_s
|
|||
|
||||
if (!result.is_empty()) {
|
||||
auto result_row = result.take_first();
|
||||
client_connection->async_next_result(statement_id(), execution_id, result_row.row.to_deprecated_string_vector());
|
||||
client_connection->async_next_result(statement_id(), execution_id, result_row.row.take_data());
|
||||
|
||||
deferred_invoke([this, execution_id, result = move(result), result_size]() {
|
||||
next(execution_id, move(result), result_size);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue