mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-11 01:06:01 +03:00
LibSQL: Return a not-yet-implemented error for unimplemented expressions
Easier to debug than returning a NULL value.
This commit is contained in:
parent
5c90aa357b
commit
e649ff5d31
Notes:
sideshowbarker
2024-07-17 18:53:33 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/e649ff5d31 Pull-request: https://github.com/SerenityOS/serenity/pull/12433 Reviewed-by: https://github.com/linusg ✅
@ -305,7 +305,10 @@ struct ExecutionContext {
|
||||
|
||||
class Expression : public ASTNode {
|
||||
public:
|
||||
virtual ResultOr<Value> evaluate(ExecutionContext&) const;
|
||||
virtual ResultOr<Value> evaluate(ExecutionContext&) const
|
||||
{
|
||||
return Result { SQLCommand::Unknown, SQLErrorCode::NotYetImplemented };
|
||||
}
|
||||
};
|
||||
|
||||
class ErrorExpression final : public Expression {
|
||||
|
@ -12,11 +12,6 @@ namespace SQL::AST {
|
||||
|
||||
static const String s_posix_basic_metacharacters = ".^$*[]+\\";
|
||||
|
||||
ResultOr<Value> Expression::evaluate(ExecutionContext&) const
|
||||
{
|
||||
return Value::null();
|
||||
}
|
||||
|
||||
ResultOr<Value> NumericLiteral::evaluate(ExecutionContext&) const
|
||||
{
|
||||
Value ret(SQLType::Float);
|
||||
|
Loading…
Reference in New Issue
Block a user