File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -221,7 +221,9 @@ var util = require('../common/util.js');
221221 * contacts: entities
222222 * };
223223 *
224- * if (info.moreResults !== 'NO_MORE_RESULTS') {
224+ * var moreResultsMayExist = info.moreResults !== datastore.NO_MORE_RESULTS;
225+ *
226+ * if (moreResultsMayExist) {
225227 * frontEndResponse.nextPageCursor = info.endCursor;
226228 * }
227229 *
@@ -396,6 +398,8 @@ Datastore.int = function(value) {
396398 return new entity . Int ( value ) ;
397399} ;
398400
401+ Datastore . NO_MORE_RESULTS = 'NO_MORE_RESULTS' ;
402+
399403/**
400404 * Create a query for the specified kind. See {module:datastore/query} for all
401405 * of the available methods.
Original file line number Diff line number Diff line change @@ -190,6 +190,12 @@ describe('Datastore', function() {
190190 } ) ;
191191 } ) ;
192192
193+ describe ( 'NO_MORE_RESULTS' , function ( ) {
194+ it ( 'should expose a NO_MORE_RESULTS helper' , function ( ) {
195+ assert . strictEqual ( Datastore . NO_MORE_RESULTS , 'NO_MORE_RESULTS' ) ;
196+ } ) ;
197+ } ) ;
198+
193199 describe ( 'createQuery' , function ( ) {
194200 it ( 'should return a Query object' , function ( ) {
195201 var namespace = 'namespace' ;
You can’t perform that action at this time.
0 commit comments