1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:58:12 +00:00

LibSQL: Return unimplemented errors from unimplemented MATCH expressions

A bit friendlier than crashing the entire SQLService process.
This commit is contained in:
Timothy Flynn 2022-02-10 08:15:18 -05:00 committed by Andreas Kling
parent df2ddcafd4
commit b683e8ab77

View file

@ -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();
}
}