Skip to content
This repository has been archived by the owner on Oct 15, 2018. It is now read-only.

Adds example for select option in query-language #131

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions queries/query-language.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,3 +254,11 @@ Model.find({ where: { name: 'foo' }, sort: { 'name': 1 }});
// Sort by multiple attributes
Model.find({ where: { name: 'foo' }, sort: { name: 1, age: 0 });
```

### Select

Only returns requested attributes instead of the whole item.

```javascript
Model.find({ where: { name: 'foo' }, select: ['email', 'age']});
```