File tree 2 files changed +11
-1
lines changed 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -221,7 +221,9 @@ var util = require('../common/util.js');
221
221
* contacts: entities
222
222
* };
223
223
*
224
- * if (info.moreResults !== 'NO_MORE_RESULTS') {
224
+ * var moreResultsMayExist = info.moreResults !== datastore.NO_MORE_RESULTS;
225
+ *
226
+ * if (moreResultsMayExist) {
225
227
* frontEndResponse.nextPageCursor = info.endCursor;
226
228
* }
227
229
*
@@ -396,6 +398,8 @@ Datastore.int = function(value) {
396
398
return new entity . Int ( value ) ;
397
399
} ;
398
400
401
+ Datastore . NO_MORE_RESULTS = 'NO_MORE_RESULTS' ;
402
+
399
403
/**
400
404
* Create a query for the specified kind. See {module:datastore/query} for all
401
405
* of the available methods.
Original file line number Diff line number Diff line change @@ -190,6 +190,12 @@ describe('Datastore', function() {
190
190
} ) ;
191
191
} ) ;
192
192
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
+
193
199
describe ( 'createQuery' , function ( ) {
194
200
it ( 'should return a Query object' , function ( ) {
195
201
var namespace = 'namespace' ;
You can’t perform that action at this time.
0 commit comments