@@ -262,7 +262,7 @@ Entity.prototype.testLookup = function(callback) {
262
262
// };
263
263
}
264
264
} ) ;
265
- // [End lookup]
265
+ // [END lookup]
266
266
267
267
this . datastore . insert ( {
268
268
key : taskKey ,
@@ -337,7 +337,6 @@ Entity.prototype.testDelete = function(callback) {
337
337
Entity . prototype . testBatchUpsert = function ( callback ) {
338
338
datastore . key = this . datastore . key ;
339
339
340
- // [START batch_upsert]
341
340
var taskKey1 = datastore . key ( [ 'Task' , 1 ] ) ;
342
341
var taskKey2 = datastore . key ( [ 'Task' , 2 ] ) ;
343
342
@@ -355,6 +354,7 @@ Entity.prototype.testBatchUpsert = function(callback) {
355
354
description : 'Integrate Cloud Datastore'
356
355
} ;
357
356
357
+ // [START batch_upsert]
358
358
datastore . upsert ( [
359
359
{
360
360
key : taskKey1 ,
@@ -392,19 +392,9 @@ Entity.prototype.testBatchLookup = function(callback) {
392
392
datastore . get ( [
393
393
taskKey1 ,
394
394
taskKey2
395
- ] , function ( err , entities ) {
395
+ ] , function ( err , tasks ) {
396
396
if ( ! err ) {
397
- // entities[0].data = {
398
- // type: 'Personal',
399
- // done: false,
400
- // priority: 4,
401
- // description: 'Learn Cloud Datastore'
402
- // };
403
-
404
- // entities[1].data = {
405
- // type: 'Work',
406
- // // ...
407
- // };
397
+ // Tasks retrieved successfully.
408
398
}
409
399
} ) ;
410
400
// [END batch_lookup]
@@ -651,12 +641,12 @@ Query.prototype.getProjectionQuery = function() {
651
641
Query . prototype . getAncestorQuery = function ( ) {
652
642
var datastore = this . datastore ;
653
643
654
- // [START anscestor_query ]
644
+ // [START ancestor_query ]
655
645
var ancestorKey = datastore . key ( [ 'TaskList' , 'default' ] ) ;
656
646
657
647
var query = datastore . createQuery ( 'Task' )
658
648
. hasAncestor ( ancestorKey ) ;
659
- // [END anscestor_query ]
649
+ // [END ancestor_query ]
660
650
661
651
return query ;
662
652
} ;
@@ -852,11 +842,11 @@ Query.prototype.testArrayValueInequalityRange = function(callback) {
852
842
Query . prototype . testArrayValueEquality = function ( callback ) {
853
843
var datastore = this . datastore ;
854
844
855
- // [START array_value_equality_range ]
845
+ // [START array_value_equality ]
856
846
var query = datastore . createQuery ( 'Task' )
857
847
. filter ( 'tag =' , 'fun' )
858
848
. filter ( 'tag =' , 'programming' ) ;
859
- // [END array_value_equality_range ]
849
+ // [END array_value_equality ]
860
850
861
851
this . datastore . runQuery ( query , callback ) ;
862
852
} ;
0 commit comments