whereEndsWith method
Add a constraint for finding objects where the String value in column
ends with prefix
Implementation
void whereEndsWith(
String column,
String prefix, {
bool caseSensitive = false,
}) {
prefix = Uri.encodeComponent(prefix);
if (caseSensitive) {
queries.add(
MapEntry<String, dynamic>(
_singleQuery,
'"$column":{"\$regex": "$prefix\$"}',
),
);
} else {
queries.add(
MapEntry<String, dynamic>(
_singleQuery,
'"$column":{"\$regex": "$prefix\$", "\$options": "i"}',
),
);
}
}