-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Case-insensitive sort #139
Comments
There isn't an officially supported way to do this right now. But we have ideas for how to support these sorts of transformations in the query api in the future. For now you have a few options:
const text = 'AbC';
await client.insert('collection', { attr: text, attr_lower: lowercase(text) });
await client.update('collection', 'id', (entity) => {
const updatedText = 'XyZ';
entity.attr = updatedText;
entity.attr_lower = lowercase(updatedText);
}); That should allow you to fully use the query engine We discussed this approach in our Discord recently as well: https://discord.com/channels/1138467878623006720/1138467879113728033/1256648644736712715 Other features on our short term roadmap like triggers could also be helpful here eventually. I'll leave this open for others to share any ideas. |
related to this: localeCompare for numerical string sorting |
Hi. I'm trying to use
query.order
, but it seems like it is case-sensitive (A...
comes beforea...
). Is there anyway to make the query case-insensitive (a...
andA...
are treated the same, but they come beforeb...
)? Thanks!The text was updated successfully, but these errors were encountered: