mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 11:57:34 +00:00
LibSQL+SQLServer+SQLStudio+sql: Use proper types for SQL IPC and IDs
When storing IDs and sending values over IPC, this changes SQLServer to: 1. Stop using -1 as a nominal "bad" ID. Store the IDs as unsigned, and use Optional in the one place that the IPC needs to indicate an ID was not allocated. 2. Let LibIPC encode/decode enumerations (SQLErrorCode) on our behalf. 3. Use size_t for array sizes.
This commit is contained in:
parent
3a915483b0
commit
e2f71d2808
13 changed files with 85 additions and 84 deletions
|
@ -1,10 +1,12 @@
|
|||
#include <LibSQL/Result.h>
|
||||
|
||||
endpoint SQLClient
|
||||
{
|
||||
connected(int connection_id, DeprecatedString connected_to_database) =|
|
||||
connection_error(int connection_id, int code, DeprecatedString message) =|
|
||||
execution_success(int statement_id, bool has_results, int created, int updated, int deleted) =|
|
||||
next_result(int statement_id, Vector<DeprecatedString> row) =|
|
||||
results_exhausted(int statement_id, int total_rows) =|
|
||||
execution_error(int statement_id, int code, DeprecatedString message) =|
|
||||
disconnected(int connection_id) =|
|
||||
connected(u64 connection_id, DeprecatedString connected_to_database) =|
|
||||
connection_error(u64 connection_id, SQL::SQLErrorCode code, DeprecatedString message) =|
|
||||
execution_success(u64 statement_id, bool has_results, size_t created, size_t updated, size_t deleted) =|
|
||||
next_result(u64 statement_id, Vector<DeprecatedString> row) =|
|
||||
results_exhausted(u64 statement_id, size_t total_rows) =|
|
||||
execution_error(u64 statement_id, SQL::SQLErrorCode code, DeprecatedString message) =|
|
||||
disconnected(u64 connection_id) =|
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue