Description
Is your feature request related to a problem? Please describe.
Our MongoDB use a collation/strength that allows for case-insensitive queries/indexes
Unfortunatly ParseObject.startsWith()
and ParseObject.endssWith()
use a $regex
that is case-sensitive.
Describe the solution you'd like
A clear and concise description of what you want to happen.
Considering that matches()
already allow modifiers
, would you consider adding a 2nd parameter to startsWith/endsWith
to allow case-insensitive regex ?
matches(key, regex , modifiers)
//....
if (regex.ignoreCase) {
modifiers += 'i';
}
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
// Currently using instead
q.matches('name', '^' +value, 'i')
//But it would be nice to ...
q.startsWith('name', value, 'i')
Additional context
Add any other context or screenshots about the feature request here.
LMK and i can submit a PR later this week