Skip to content

Case Insensitive Query #3973

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

Closed
dblythy opened this issue Jun 29, 2017 · 6 comments
Closed

Case Insensitive Query #3973

dblythy opened this issue Jun 29, 2017 · 6 comments

Comments

@dblythy
Copy link
Member

dblythy commented Jun 29, 2017

Is it possible to order queries case insensitive? Currently "ascending" orders strings by case sensitivity.

@stale
Copy link

stale bot commented Sep 18, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Sep 18, 2018
@stale stale bot closed this as completed Sep 25, 2018
@ADSRP
Copy link

ADSRP commented Sep 11, 2020

I have the same problem.

"Is it possible to order queries case insensitive? Currently "ascending" orders strings by case sensitivity."

#3973 (comment)

@SkyGanfor
Copy link

Same, would love to have this functionality.

@mtrezza
Copy link
Member

mtrezza commented Nov 11, 2020

I think this should be possible by now with Parse.Query.find({ caseInsensitive: true }). This adds en collation to the query which should result in collation not only for the query conditions but also for the sorting.

@CodeWithOz
Copy link

@mtrezza does that option still work? I just tried it and found that:

  1. caseInsensitive is not part of the properties exposed by Query.FindOptions
  2. the results were still not sorted in a case-insensitive manner

@evtimmy
Copy link

evtimmy commented Jul 4, 2024

caseInsensitive option is not supported in Parse.Query, I had to use DatabaseController instead, where the option is supported. Here's an example:

   const databaseController = Parse.Server.database
   const result = await databaseController.find(
        '_User', 
        { username: username }, 
        { caseInsensitive: true }
    )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants