mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:37:35 +00: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
2 changed files with 4 additions and 6 deletions
|
@ -305,7 +305,10 @@ struct ExecutionContext {
|
||||||
|
|
||||||
class Expression : public ASTNode {
|
class Expression : public ASTNode {
|
||||||
public:
|
public:
|
||||||
virtual ResultOr<Value> evaluate(ExecutionContext&) const;
|
virtual ResultOr<Value> evaluate(ExecutionContext&) const
|
||||||
|
{
|
||||||
|
return Result { SQLCommand::Unknown, SQLErrorCode::NotYetImplemented };
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class ErrorExpression final : public Expression {
|
class ErrorExpression final : public Expression {
|
||||||
|
|
|
@ -12,11 +12,6 @@ namespace SQL::AST {
|
||||||
|
|
||||||
static const String s_posix_basic_metacharacters = ".^$*[]+\\";
|
static const String s_posix_basic_metacharacters = ".^$*[]+\\";
|
||||||
|
|
||||||
ResultOr<Value> Expression::evaluate(ExecutionContext&) const
|
|
||||||
{
|
|
||||||
return Value::null();
|
|
||||||
}
|
|
||||||
|
|
||||||
ResultOr<Value> NumericLiteral::evaluate(ExecutionContext&) const
|
ResultOr<Value> NumericLiteral::evaluate(ExecutionContext&) const
|
||||||
{
|
{
|
||||||
Value ret(SQLType::Float);
|
Value ret(SQLType::Float);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue