whereStartsWith method
Add a constraint for finding objects where the String value in column
starts with prefix
Implementation
void whereStartsWith(
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"}'));
}
}