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
commit b683e8ab77
Notes: sideshowbarker 2024-07-17 19:02:11 +09:00

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