Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove datastore v1beta3 samples from master. #32

Merged
merged 1 commit into from
Nov 19, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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