summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibSQL/AST
diff options
context:
space:
mode:
authorTimothy Flynn <trflynn89@pm.me>2022-02-10 08:15:18 -0500
committerAndreas Kling <kling@serenityos.org>2022-02-10 23:11:13 +0100
commitb683e8ab77ce05085272239dcd177bfe1d76f4c6 (patch)
tree1dad3c418abd8885758eb2375dea7a425d81161c /Userland/Libraries/LibSQL/AST
parentdf2ddcafd4ac0de163a80e357f83a64dce698fb9 (diff)
downloadserenity-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.cpp3
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();
}
}