sails-dynamodb icon indicating copy to clipboard operation
sails-dynamodb copied to clipboard

Is it possible to select only a few fields in query?

Open robert-cornescu opened this issue 9 years ago • 1 comments

I have a user table in DynamoDB, with multiple fields, like "email", "phone_number", etc.

However, during a query, I don't need all that data, I need only a few select ones.

I have tried using this query, however I get returned all the fields:

User.find({where: {phone_number: phoneNumberArray}, select: ['phone_number', 'avatar']})

I read about this issue being present in a mongoDB adapter. Is this problem present here too?

robert-cornescu avatar Jul 26 '16 17:07 robert-cornescu

Yes, I think that may be the case! Would take a PR.

devinivy avatar Jul 26 '16 17:07 devinivy