like method
Builds a LIKE
predicate.
To prevent injections, an optional sanitizer
is called with a name that
will be escaped by the underlying QueryExecutor. Use this if the pattern
is not constant, and/or involves user input.
Otherwise, you can omit sanitizer
.
Example:
carNameBuilder.like('%Mazda%');
carNameBuilder.like((name) => 'Mazda %$name%');
Implementation
void like(String pattern, {String Function(String)? sanitize}) {
sanitize ??= (s) => pattern;
_raw = 'LIKE \'' + sanitize('@$substitution') + '\'';
//query.substitutionValues[substitution] = pattern;
_hasValue = true;
_value = null;
}