gadelkareem / sails-dynamodb

Amazon DynamoDB adapter for Waterline / Sails.js
http://sailsjs.org
46 stars 22 forks source link

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

Open robert-cornescu opened 8 years ago

robert-cornescu commented 8 years ago

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?

devinivy commented 8 years ago

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