Skip to content

Commit

Permalink
Batch ops included too much extra info.
Browse files Browse the repository at this point in the history
  • Loading branch information
pcostell committed Nov 16, 2015
1 parent ef0a589 commit 2416873
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions datastore/concepts.js
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,6 @@ Entity.prototype.testDelete = function(callback) {
Entity.prototype.testBatchUpsert = function(callback) {
datastore.key = this.datastore.key;

// [START batch_upsert]
var taskKey1 = datastore.key(['Task', 1]);
var taskKey2 = datastore.key(['Task', 2]);

Expand All @@ -355,6 +354,7 @@ Entity.prototype.testBatchUpsert = function(callback) {
description: 'Integrate Cloud Datastore'
};

// [START batch_upsert]
datastore.upsert([
{
key: taskKey1,
Expand Down Expand Up @@ -392,19 +392,9 @@ Entity.prototype.testBatchLookup = function(callback) {
datastore.get([
taskKey1,
taskKey2
], function(err, entities) {
], function(err, tasks) {
if (!err) {
// entities[0].data = {
// type: 'Personal',
// done: false,
// priority: 4,
// description: 'Learn Cloud Datastore'
// };

// entities[1].data = {
// type: 'Work',
// // ...
// };
// Tasks retrieved successfully.
}
});
// [END batch_lookup]
Expand Down

0 comments on commit 2416873

Please sign in to comment.