1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 22:48:11 +00:00
serenity/Userland/Services/SQLServer
Jan de Visser 001949d77a LibSQL: Improve error handling
The handling of filesystem level errors was basically non-existing or
consisting of `VERIFY_NOT_REACHED` assertions. Addressed this by
* Adding `open` methods to `Heap` and `Database` which return errors.
* Changing the interface of methods of these classes and clients
downstream to propagate these errors.

The constructors of `Heap` and `Database` don't open the underlying
filesystem file anymore.

The SQL statement handlers return an `SQLErrorCode::InternalError`
error code if an error comes back from the lower levels. Note that some
of these errors are things like duplicate index entry errors that should
be caught before the SQL layer attempts to actually update the database.

Added tests to catch attempts to open weird or non-existent files as
databases.

Finally, in between me writing this patch and submitting the PR the
AK::Result<Foo, Bar> template got deprecated in favour of ErrorOr<Foo>.
This resulted in more busywork.
2021-12-04 20:49:22 +03:30
..
ClientConnection.cpp LibSQL+SQLServer: Build SQLServer system service 2021-07-08 17:55:59 +04:30
ClientConnection.h Services: Fix visibility of Object-derivative constructors 2021-11-02 22:56:53 +01:00
CMakeLists.txt LibSQL+SQLServer: Build SQLServer system service 2021-07-08 17:55:59 +04:30
DatabaseConnection.cpp LibSQL: Improve error handling 2021-12-04 20:49:22 +03:30
DatabaseConnection.h Services: Fix visibility of Object-derivative constructors 2021-11-02 22:56:53 +01:00
Forward.h LibSQL+SQLServer: Build SQLServer system service 2021-07-08 17:55:59 +04:30
main.cpp LibCore: Change Core::LocalServer::on_ready_to_accept => on_accept 2021-11-30 23:34:40 +01:00
SQLClient.ipc SQLServer+SQL+LibSQL: Allow sql client to specify the database name 2021-10-05 02:22:19 +02:00
SQLServer.ipc SQLServer: Remove unnecessary magic number 2021-11-05 00:17:01 +03:30
SQLStatement.cpp LibSQL: Add current statement to the ExecutionContext 2021-11-10 14:47:49 +01:00
SQLStatement.h Services: Fix visibility of Object-derivative constructors 2021-11-02 22:56:53 +01:00