ladybird/Userland/Libraries/LibSQL/AST
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.h LibSQL: Add current statement to the ExecutionContext 2021-11-10 14:47:49 +01:00
CreateSchema.cpp LibSQL: Improve error handling 2021-12-04 20:49:22 +03:30
CreateTable.cpp LibSQL: Improve error handling 2021-12-04 20:49:22 +03:30
Expression.cpp LibSQL: Improve error handling 2021-12-04 20:49:22 +03:30
Insert.cpp LibSQL: Improve error handling 2021-12-04 20:49:22 +03:30
Lexer.cpp LibSQL: Make lexer and parser more standard SQL compliant 2021-06-24 00:36:53 +02:00
Lexer.h LibSQL: Make lexer and parser more standard SQL compliant 2021-06-24 00:36:53 +02:00
Parser.cpp Everywhere: Prevent risky implicit casts of (Nonnull)RefPtr 2021-09-03 23:20:23 +02:00
Parser.h LibSQL: Replace Optional<NonnullRefPtr<T>> with RefPtr<T> 2021-09-03 15:36:51 +02:00
Select.cpp LibSQL: Improve error handling 2021-12-04 20:49:22 +03:30
Statement.cpp LibSQL: Add current statement to the ExecutionContext 2021-11-10 14:47:49 +01:00
SyntaxHighlighter.cpp LibSQL: Make lexer and parser more standard SQL compliant 2021-06-24 00:36:53 +02:00
SyntaxHighlighter.h LibSQL: Move Lexer and Parser machinery to AST directory 2021-06-24 00:36:53 +02:00
Token.cpp LibSQL: Move Lexer and Parser machinery to AST directory 2021-06-24 00:36:53 +02:00
Token.h LibSQL: Invent statement execution machinery and CREATE SCHEMA statement 2021-07-08 17:55:59 +04:30