Skip to content

Commit

Permalink
Merge pull request #697 from stephenplusplus/spp--datastore-document-…
Browse files Browse the repository at this point in the history
…keys-only-query

docs: datastore: document keys-only query
  • Loading branch information
stephenplusplus committed Jun 30, 2015
2 parents b4a42ce + 5303702 commit 0d024b4
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lib/datastore/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,17 @@ DatastoreRequest.prototype.delete = function(keys, callback) {
* //-
* transaction.runQuery(query)
* .on('data', function (entity) {});
*
* //-
* // A keys-only query returns just the keys of the result entities instead of
* // the entities themselves, at lower latency and cost.
* //-
* var keysOnlyQuery = dataset.createQuery('Lion').select('__key__');
*
* transaction.runQuery(query, function(err, entities, endCursor, callback) {
* // entities[].key = Key object
* // entities[].data = Empty object
* });
*/
DatastoreRequest.prototype.runQuery = function(q, callback) {
var that = this;
Expand Down

0 comments on commit 0d024b4

Please sign in to comment.