-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
[Feature Request] Deselect Keys #4948
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
Comments
Hello, I would like to help with this, can I? |
@ozeas Its all yours feel free to open a PR and let us know if you need direction |
It’s up for grabs. Feel free to do a PR. |
Hi everyone, I had some personal problems, I could not continue. Sorry about that. |
Take care @ozeas |
🙋♂️ I want in! Just point me in the right direction: It seems to me this is to be done in the JS-SDK, not on the server... or why is this posted in the server repo? I'm I supposing wrong? |
You have to add it to the server first. Here is a sample PR. #4195 and there are a lot of other examples from previous Pull Requests. The SDK sends the request to the server. You can use the Rest API to send the requests. |
So how do you think guys this restOption should be called? Currently the selecting option is |
|
|
I have added and tested a new restOption as |
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
I often find myself wanting to select all keys except one or a few. This requires me to specify a lot of keys which is a lot of work.
Describe the solution you'd like
A clear and concise description of what you want to happen.
query.deselect('somefield'); or unselect or exclude or selectAllExcluding()?
If used with select just remove from select
If used without select all keys added excluding
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Aggregate project { key: -1 } will exclude that key. (Only for Mongo 3.4+)
Alternatively you can get the schema and find all the keys from that then remove what you don't need
Additional context
Add any other context or screenshots about the feature request here.
From a quick glance adding this to Mongo should be pretty easy
Postgres uses * or column names. You don’t know the column names if you only uses exclude. So you’ll have to get all fields first then use exclude
The text was updated successfully, but these errors were encountered: