1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 02:07:36 +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:
Timothy Flynn 2022-12-02 16:25:27 -05:00 committed by Andreas Kling
parent 3a915483b0
commit e2f71d2808
13 changed files with 85 additions and 84 deletions

View file

@ -2,8 +2,8 @@
endpoint SQLServer
{
connect(DeprecatedString name) => (int connection_id)
prepare_statement(int connection_id, DeprecatedString statement) => (int statement_id)
execute_statement(int statement_id, Vector<SQL::Value> placeholder_values) =|
disconnect(int connection_id) =|
connect(DeprecatedString name) => (u64 connection_id)
prepare_statement(u64 connection_id, DeprecatedString statement) => (Optional<u64> statement_id)
execute_statement(u64 statement_id, Vector<SQL::Value> placeholder_values) =|
disconnect(u64 connection_id) =|
}