Skip to content

Ability to exclude keys from Query #839

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
RaschidJFR opened this issue Jun 15, 2019 · 2 comments · Fixed by #857
Closed

Ability to exclude keys from Query #839

RaschidJFR opened this issue Jun 15, 2019 · 2 comments · Fixed by #857

Comments

@RaschidJFR
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Parse.Query.selec() lets us minimize the data retrieved by choosing only the keys of interest. But when we need to leave out just a couple of keys from a large property list -for example, when removing sensitive data fields from unlogged users- we need to input a very long array of keys in the select() method.

The issue scales when you're still developing the class models and later on you add more properties to registered classes, so you could easily skip to add the new properties to the select() method or you could misspell any of them as the list is still growing.

Describe the solution you'd like
A method that instead of "whitlisting" the properties to retrieve, it "blacklists" the properties not to. It could be called something like Parse.Query.exclude() or Parse.Query.unselect().

Describe alternatives you've considered
As I said, the current alternative is to type in all the properties but one, being susceptible to errors.

Additional context
I'm having this problem currently when trying to filter data inside the beforeFind hook on cloud code.

@dplewis
Copy link
Member

dplewis commented Jun 15, 2019

I made a post about the same thing. parse-community/parse-server#4948

It’s still up for grabs and a good first issue for a PR. Would you like to implement this feature?

@RaschidJFR
Copy link
Contributor Author

Sure, I'd love to! So, how does it work? I just fork, trace, test, implement and then PR, right? nothing special about it. Do we have anything like a deadline? I'm not familiar with the repo yet so it may take me a while this first time.

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

Successfully merging a pull request may close this issue.

2 participants