eval method
Evaluate this expression in the context of row (column name -> value).
Implementation
@override
Object? eval(Map<String, Object?> row) {
final v = value.eval(row);
final p = pattern.eval(row);
if (v == null || p == null) return null;
String? esc;
if (escape != null) {
final ev = escape!.eval(row);
if (ev == null) return null;
final es = ev.toString();
if (es.length != 1) {
throw FormatException('LIKE ESCAPE expects a single-character string');
}
esc = es;
}
final m = _likeWithEscape(v.toString(), p.toString(), esc);
return negated ? !m : m;
}