Skip to content
This repository was archived by the owner on Feb 20, 2026. It is now read-only.
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
27 changes: 3 additions & 24 deletions samples/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[//]: # "This README.md file is auto-generated, all changes to this file will be lost."
[//]: # "To regenerate it, use `npm run generate-scaffolding`."
<img src="https://avatars2.githubusercontent.com/u/2810941?v=3&s=96" alt="Google Cloud Platform logo" title="Google Cloud Platform" align="right" height="96" width="96"/>

# Google Cloud Datastore: Node.js Samples
Expand Down Expand Up @@ -29,29 +31,6 @@ View the [source code][tasks_0_code].
[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-datastore&page=editor&open_in_editor=samples/tasks.js,samples/README.md)

__Usage:__ `node tasks.js --help`

```
tasks.js <command>

Commands:
tasks.js new <description> Adds a task with a description <description>.
tasks.js done <taskId> Marks the specified task as done.
tasks.js list Lists all tasks ordered by creation time.
tasks.js delete <taskId> Deletes a task.

Options:
--version Show version number [boolean]
--help Show help [boolean]

Examples:
node tasks.js new "Buy milk" Adds a task with description "Buy milk".
node tasks.js done 12345 Marks task 12345 as Done.
node tasks.js list Lists all tasks ordered by creation time
node tasks.js delete 12345 Deletes task 12345.

For more information, see https://cloud.google.com/datastore/docs
```

[tasks_0_docs]: https://cloud.google.com/datastore/docs/datastore-api-tutorial
[tasks_0_code]: tasks.js

Expand All @@ -72,5 +51,5 @@ __Usage:__ `node error.js`
[error_2_docs]: https://cloud.google.com/datastore/docs/concepts/errors
[error_2_code]: error.js

[shell_img]: //gstatic.com/cloudssh/images/open-btn.png
[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png
[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-datastore&page=editor&open_in_editor=samples/README.md
15 changes: 0 additions & 15 deletions samples/concepts.js
Original file line number Diff line number Diff line change
Expand Up @@ -817,21 +817,6 @@ class Query extends TestHelper {
return this.datastore.runQuery(query);
}

testDistinctQuery(t) {
t.plan(0);
const datastore = this.datastore;

// [START datastore_distinct_query]
const query = datastore
.createQuery('Task')
.groupBy(['category', 'priority'])
.order('category')
.order('priority');
// [END datastore_distinct_query]

return this.datastore.runQuery(query);
}

testDistinctOnQuery(t) {
t.plan(0);
const datastore = this.datastore;
Expand Down
59 changes: 0 additions & 59 deletions samples/error.js

This file was deleted.

1 change: 0 additions & 1 deletion samples/system-test/concepts.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ test.serial('performs a projection query', t => {
});
});
test.serial(`performs a keys only query`, t => query.testKeysOnlyQuery(t));
test.serial(`performs a distinct query`, t => query.testDistinctQuery(t));
test.serial(`performs a distinct on query`, t => query.testDistinctOnQuery(t));
test.serial(`performs an array value inequality query`, t =>
query.testArrayValueInequalityRange(t)
Expand Down
29 changes: 0 additions & 29 deletions samples/system-test/error.test.js

This file was deleted.

4 changes: 1 addition & 3 deletions samples/tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ function deleteTask(taskId) {
// [END datastore_delete_entity]

require(`yargs`) // eslint-disable-line
.demand(1)
.command(
`new <description>`,
`Adds a task with a description <description>.`,
Expand All @@ -178,5 +177,4 @@ require(`yargs`) // eslint-disable-line
.example(`node $0 delete 12345`, `Deletes task 12345.`)
.wrap(120)
.epilogue(`For more information, see https://cloud.google.com/datastore/docs`)
.help()
.strict().argv;
.help().argv;