From d693f9b6e4bd945d6e8d230a68ac6c7c58b47fd4 Mon Sep 17 00:00:00 2001 From: Simon Reinsperger Date: Wed, 12 Oct 2016 18:56:47 +0200 Subject: [PATCH] Adds example for select option in query-language --- queries/query-language.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/queries/query-language.md b/queries/query-language.md index edd9879..5665183 100644 --- a/queries/query-language.md +++ b/queries/query-language.md @@ -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']}); +```