diff --git a/lib/datastore/request.js b/lib/datastore/request.js index e0260b5d8bf..aa0ce984405 100644 --- a/lib/datastore/request.js +++ b/lib/datastore/request.js @@ -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;