diff options
author | Timothy Flynn <trflynn89@pm.me> | 2022-02-10 08:15:18 -0500 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-02-10 23:11:13 +0100 |
commit | b683e8ab77ce05085272239dcd177bfe1d76f4c6 (patch) | |
tree | 1dad3c418abd8885758eb2375dea7a425d81161c /Userland/Libraries/LibSQL/AST | |
parent | df2ddcafd4ac0de163a80e357f83a64dce698fb9 (diff) | |
download | serenity-b683e8ab77ce05085272239dcd177bfe1d76f4c6.zip |
LibSQL: Return unimplemented errors from unimplemented MATCH expressions
A bit friendlier than crashing the entire SQLService process.
Diffstat (limited to 'Userland/Libraries/LibSQL/AST')
-rw-r--r-- | Userland/Libraries/LibSQL/AST/Expression.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Userland/Libraries/LibSQL/AST/Expression.cpp b/Userland/Libraries/LibSQL/AST/Expression.cpp index d9b3cc8696..2d48cfcadb 100644 --- a/Userland/Libraries/LibSQL/AST/Expression.cpp +++ b/Userland/Libraries/LibSQL/AST/Expression.cpp @@ -239,11 +239,12 @@ ResultOr<Value> MatchExpression::evaluate(ExecutionContext& context) const return Value(invert_expression() ? !result.success : result.success); } case MatchOperator::Glob: + return Result { SQLCommand::Unknown, SQLErrorCode::NotYetImplemented, "GLOB expression is not yet implemented"sv }; case MatchOperator::Match: + return Result { SQLCommand::Unknown, SQLErrorCode::NotYetImplemented, "MATCH expression is not yet implemented"sv }; default: VERIFY_NOT_REACHED(); } - return Value::null(); } } |