ladybird/Userland/Libraries/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
..
AST LibSQL: Improve error handling 2021-12-04 20:49:22 +03:30
BTree.cpp LibSQL: Introduce Serializer as a mediator between Heap and client code 2021-08-21 22:03:30 +02:00
BTree.h LibSQL: Introduce Serializer as a mediator between Heap and client code 2021-08-21 22:03:30 +02:00
BTreeIterator.cpp LibSQL: Introduce Serializer as a mediator between Heap and client code 2021-08-21 22:03:30 +02:00
CMakeLists.txt LibSQL: Add current statement to the ExecutionContext 2021-11-10 14:47:49 +01:00
Database.cpp LibSQL: Improve error handling 2021-12-04 20:49:22 +03:30
Database.h LibSQL: Improve error handling 2021-12-04 20:49:22 +03:30
Forward.h LibSQL: Introduce Serializer as a mediator between Heap and client code 2021-08-21 22:03:30 +02:00
HashIndex.cpp LibSQL: Introduce Serializer as a mediator between Heap and client code 2021-08-21 22:03:30 +02:00
HashIndex.h LibSQL: Introduce Serializer as a mediator between Heap and client code 2021-08-21 22:03:30 +02:00
Heap.cpp LibSQL: Improve error handling 2021-12-04 20:49:22 +03:30
Heap.h LibSQL: Improve error handling 2021-12-04 20:49:22 +03:30
Index.cpp LibSQL: Introduce Serializer as a mediator between Heap and client code 2021-08-21 22:03:30 +02:00
Index.h LibSQL: Introduce Serializer as a mediator between Heap and client code 2021-08-21 22:03:30 +02:00
Key.cpp LibSQL: Introduce Serializer as a mediator between Heap and client code 2021-08-21 22:03:30 +02:00
Key.h LibSQL: Resolve cyclic dependency 2021-10-06 23:52:40 +01:00
Meta.cpp LibSQL: Add 'schema' and 'table' to TupleElementDescriptor 2021-11-10 14:47:49 +01:00
Meta.h Libraries: Fix visibility of Object-derivative constructors 2021-11-02 22:56:53 +01:00
Row.cpp LibSQL: Introduce Serializer as a mediator between Heap and client code 2021-08-21 22:03:30 +02:00
Row.h LibSQL: Resolve cyclic dependency 2021-10-06 23:52:40 +01:00
Serializer.cpp LibSQL: Introduce Serializer as a mediator between Heap and client code 2021-08-21 22:03:30 +02:00
Serializer.h LibSQL: Introduce Serializer as a mediator between Heap and client code 2021-08-21 22:03:30 +02:00
SQLClient.cpp SQLServer+SQL+LibSQL: Allow sql client to specify the database name 2021-10-05 02:22:19 +02:00
SQLClient.h SQLServer+SQL+LibSQL: Allow sql client to specify the database name 2021-10-05 02:22:19 +02:00
SQLResult.h LibSQL: Improve error handling 2021-12-04 20:49:22 +03:30
TreeNode.cpp LibSQL: Introduce Serializer as a mediator between Heap and client code 2021-08-21 22:03:30 +02:00
Tuple.cpp LibSQL: Add the 'extend' operation to the Tuple class 2021-11-10 14:47:49 +01:00
Tuple.h LibSQL: Add the 'extend' operation to the Tuple class 2021-11-10 14:47:49 +01:00
TupleDescriptor.h LibSQL: Add 'schema' and 'table' to TupleElementDescriptor 2021-11-10 14:47:49 +01:00
Type.h LibSQL: Allow expressions and column names in SELECT ... FROM 2021-10-05 02:22:19 +02:00
Value.cpp LibSQL: Relax assignment rules for Null Values 2021-11-10 14:47:49 +01:00
Value.h LibSQL: Add 'schema' and 'table' to TupleElementDescriptor 2021-11-10 14:47:49 +01:00
ValueImpl.h LibSQL: Introduce Serializer as a mediator between Heap and client code 2021-08-21 22:03:30 +02:00