ladybird/Userland/Services/SQLServer/SQLClient.ipc
Timothy Flynn e2f71d2808 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.
2022-12-07 13:09:00 +01:00

12 lines
588 B
Text

#include <LibSQL/Result.h>
endpoint SQLClient
{
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) =|
}