You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
🙋♂️ I want in!
So I just start working on this, right? I guess there's no specific deadline, but anyway I'll try not to delay it that much while getting familiar with the repo.
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?
I have added and tested a new restOption as excludeKeys. Can you have a look @dplewis ? If that's ok then all proceed to update the docs and add the function to the SDK repo i guess.
Activity
ozeas commentedon Oct 4, 2018
Hello, I would like to help with this, can I?
dplewis commentedon Oct 4, 2018
@ozeas Its all yours feel free to open a PR and let us know if you need direction
srameshr commentedon Dec 4, 2018
@dplewis @ozeas You guys working on this?
dplewis commentedon Dec 4, 2018
It’s up for grabs. Feel free to do a PR.
ozeas commentedon Jan 21, 2019
Hi everyone, I had some personal problems, I could not continue. Sorry about that.
flovilmart commentedon Jan 21, 2019
Take care @ozeas
RaschidJFR commentedon Jun 15, 2019
🙋♂️ I want in!
So I just start working on this, right? I guess there's no specific deadline, but anyway I'll try not to delay it that much while getting familiar with the repo.
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?
dplewis commentedon Jun 15, 2019
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.
RaschidJFR commentedon Jun 19, 2019
So how do you think guys this restOption should be called? Currently the selecting option is
keys, so let's call this new optionexcludeKeys, ok?dplewis commentedon Jun 19, 2019
excludeKeysorexcludewhichever one you wantsrameshr commentedon Jun 20, 2019
excludeRaschidJFR commentedon Jun 24, 2019
I have added and tested a new restOption as
excludeKeys. Can you have a look @dplewis ? If that's ok then all proceed to update the docs and add the function to the SDK repo i guess.