1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-16 19:45:07 +00:00
serenity/Tests/LibSQL
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
..
CMakeLists.txt Tests: Remove all file(GLOB) from CMakeLists in Tests 2021-09-02 09:08:23 +02:00
TestSqlBtreeIndex.cpp LibSQL: Improve error handling 2021-12-04 20:49:22 +03:30
TestSqlDatabase.cpp LibSQL: Improve error handling 2021-12-04 20:49:22 +03:30
TestSqlExpressionParser.cpp LibSQL: Make lexer and parser more standard SQL compliant 2021-06-24 00:36:53 +02:00
TestSqlHashIndex.cpp LibSQL: Improve error handling 2021-12-04 20:49:22 +03:30
TestSqlStatementExecution.cpp LibSQL: Improve error handling 2021-12-04 20:49:22 +03:30
TestSqlStatementParser.cpp LibSQL: Move Order and Nulls enums from SQL::AST to SQL namespace 2021-07-08 17:55:59 +04:30
TestSqlValueAndTuple.cpp LibSQL: Add 'schema' and 'table' to TupleElementDescriptor 2021-11-10 14:47:49 +01:00