Skip to content

Commit

Permalink
Merge pull request #32 from GoogleCloudPlatform/datastore-remove-v1beta3
Browse files Browse the repository at this point in the history
Remove datastore v1beta3 samples from master.
  • Loading branch information
jmdobry committed Nov 19, 2015
2 parents b922176 + ab4f065 commit 57d4486
Show file tree
Hide file tree
Showing 9 changed files with 55 additions and 1,843 deletions.
1,329 changes: 0 additions & 1,329 deletions datastore/concepts.js

This file was deleted.

2 changes: 1 addition & 1 deletion datastore/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
},
"dependencies": {
"async": "^1.5.0",
"gcloud": "stephenplusplus/gcloud-node#spp--datastore-v1beta3"
"gcloud": "^0.25.0"
}
}
106 changes: 54 additions & 52 deletions datastore/tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ if (keyFile) {
options.keyFilename = keyFile;
}

var datastore = gcloud.datastore(options);
var datastore = gcloud.datastore.dataset(options);
// [END build_service]

/*
Expand Down Expand Up @@ -169,72 +169,74 @@ function formatTasks(tasks) {
}
// [END format_results]

switch (command) {
case 'new': {
addTask(input, function(err, taskKey) {
if (err) {
throw err;
}
if (module === require.main) {
switch (command) {
case 'new': {
addTask(input, function(err, taskKey) {
if (err) {
throw err;
}

var taskId = taskKey.path.pop();
var taskId = taskKey.path.pop();

console.log('Task %d created successfully.', taskId);
});
console.log('Task %d created successfully.', taskId);
});

break;
}
break;
}

case 'done': {
var taskId = parseInt(input, 10);
case 'done': {
var taskId = parseInt(input, 10);

markDone(taskId, function(err) {
if (err) {
throw err;
}
markDone(taskId, function(err) {
if (err) {
throw err;
}

console.log('Task %d updated successfully.', taskId);
});
console.log('Task %d updated successfully.', taskId);
});

break;
}
break;
}

case 'list': {
listTasks(function(err, tasks) {
if (err) {
throw err;
}
case 'list': {
listTasks(function(err, tasks) {
if (err) {
throw err;
}

console.log(formatTasks(tasks));
});
console.log(formatTasks(tasks));
});

break;
}
break;
}

case 'delete': {
var taskId = parseInt(input, 10);
case 'delete': {
var taskId = parseInt(input, 10);

deleteTask(taskId, function(err) {
if (err) {
throw err;
}
deleteTask(taskId, function(err) {
if (err) {
throw err;
}

console.log('Task %d deleted successfully.', taskId);
});
console.log('Task %d deleted successfully.', taskId);
});

break;
}
break;
}

default: {
// Only print usage if this file is being executed directly
if (module === require.main) {
console.log([
'Usage:',
'',
' new <description> Adds a task with a description <description>',
' done <task-id> Marks a task as done',
' list Lists all tasks by creation time',
' delete <task-id> Deletes a task'
].join('\n'));
default: {
// Only print usage if this file is being executed directly
if (module === require.main) {
console.log([
'Usage:',
'',
' new <description> Adds a task with a description <description>',
' done <task-id> Marks a task as done',
' list Lists all tasks by creation time',
' delete <task-id> Deletes a task'
].join('\n'));
}
}
}
}
Expand Down
120 changes: 0 additions & 120 deletions test/datastore/entity.test.js

This file was deleted.

36 changes: 0 additions & 36 deletions test/datastore/index.yaml

This file was deleted.

38 changes: 0 additions & 38 deletions test/datastore/indexes.test.js

This file was deleted.

48 changes: 0 additions & 48 deletions test/datastore/metadata.test.js

This file was deleted.

Loading

0 comments on commit 57d4486

Please sign in to comment.