{"id":18533057,"url":"https://github.com/googleapis/nodejs-datastore","last_synced_at":"2025-05-14T15:10:08.504Z","repository":{"id":38186525,"uuid":"98463536","full_name":"googleapis/nodejs-datastore","owner":"googleapis","description":"Node.js client for Google Cloud Datastore: a highly-scalable NoSQL database for your web and mobile applications.","archived":false,"fork":false,"pushed_at":"2025-04-09T23:15:55.000Z","size":5635,"stargazers_count":219,"open_issues_count":42,"forks_count":107,"subscribers_count":49,"default_branch":"main","last_synced_at":"2025-04-10T00:25:12.100Z","etag":null,"topics":["datastore","nodejs","nosql"],"latest_commit_sha":null,"homepage":"https://cloud.google.com/datastore/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/googleapis.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-07-26T20:32:42.000Z","updated_at":"2025-04-09T23:15:37.000Z","dependencies_parsed_at":"2024-01-24T16:27:42.775Z","dependency_job_id":"88f85510-eaa8-489b-9127-1140c2c69952","html_url":"https://github.com/googleapis/nodejs-datastore","commit_stats":{"total_commits":791,"total_committers":73,"mean_commits":"10.835616438356164","dds":0.8874841972187105,"last_synced_commit":"9ada6d8807e142cd43295ad86712938d895cf0b1"},"previous_names":[],"tags_count":100,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googleapis%2Fnodejs-datastore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googleapis%2Fnodejs-datastore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googleapis%2Fnodejs-datastore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googleapis%2Fnodejs-datastore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/googleapis","download_url":"https://codeload.github.com/googleapis/nodejs-datastore/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248631668,"owners_count":21136554,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["datastore","nodejs","nosql"],"created_at":"2024-11-06T19:09:00.655Z","updated_at":"2025-04-12T20:38:45.397Z","avatar_url":"https://github.com/googleapis.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[//]: # \"This README.md file is auto-generated, all changes to this file will be lost.\"\n[//]: # \"To regenerate it, use `python -m synthtool`.\"\n\u003cimg src=\"https://avatars2.githubusercontent.com/u/2810941?v=3\u0026s=96\" alt=\"Google Cloud Platform logo\" title=\"Google Cloud Platform\" align=\"right\" height=\"96\" width=\"96\"/\u003e\n\n# [Google Cloud Datastore: Node.js Client](https://github.com/googleapis/nodejs-datastore)\n\n[![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages)\n[![npm version](https://img.shields.io/npm/v/@google-cloud/datastore.svg)](https://www.npmjs.org/package/@google-cloud/datastore)\n\n\n\n\nCloud Datastore Client Library for Node.js\n\n\nA comprehensive list of changes in each version may be found in\n[the CHANGELOG](https://github.com/googleapis/nodejs-datastore/blob/main/CHANGELOG.md).\n\n* [Google Cloud Datastore Node.js Client API Reference][client-docs]\n* [Google Cloud Datastore Documentation][product-docs]\n* [github.com/googleapis/nodejs-datastore](https://github.com/googleapis/nodejs-datastore)\n\nRead more about the client libraries for Cloud APIs, including the older\nGoogle APIs Client Libraries, in [Client Libraries Explained][explained].\n\n[explained]: https://cloud.google.com/apis/docs/client-libraries-explained\n\n**Table of contents:**\n\n\n* [Quickstart](#quickstart)\n  * [Before you begin](#before-you-begin)\n  * [Installing the client library](#installing-the-client-library)\n  * [Using the client library](#using-the-client-library)\n* [Samples](#samples)\n* [Versioning](#versioning)\n* [Contributing](#contributing)\n* [License](#license)\n\n## Quickstart\n\n### Before you begin\n\n1.  [Select or create a Cloud Platform project][projects].\n1.  [Enable the Google Cloud Datastore API][enable_api].\n1.  [Set up authentication][auth] so you can access the\n    API from your local workstation.\n\n### Installing the client library\n\n```bash\nnpm install @google-cloud/datastore\n```\n\n\n### Using the client library\n\n```javascript\n// Imports the Google Cloud client library\nconst {Datastore} = require('@google-cloud/datastore');\n\n// Creates a client\nconst datastore = new Datastore();\n\nasync function quickstart() {\n  // The kind for the new entity\n  const kind = 'Task';\n\n  // The name/ID for the new entity\n  const name = 'sampletask1';\n\n  // The Cloud Datastore key for the new entity\n  const taskKey = datastore.key([kind, name]);\n\n  // Prepares the new entity\n  const task = {\n    key: taskKey,\n    data: {\n      description: 'Buy milk',\n    },\n  };\n\n  // Saves the entity\n  await datastore.save(task);\n  console.log(`Saved ${task.key.name}: ${task.data.description}`);\n}\nquickstart();\n\n```\n### Troubleshooting\n#### Emulator returning `DEADLINE_EXCEEDED`, `java.lang.OutOfMemoryError`\n*Reference Issue: [#95](https://github.com/googleapis/nodejs-datastore/issues/95)*\n\nWhen using the emulator, you may experience errors such as \"DEADLINE_EXCEEDED\" within your application, corresponding to an error in the emulator: \"java.lang.OutOfMemoryError\". These errors are unique to the emulator environment and will not persist in production.\n\nA workaround is available, provided by [@ohmpatel1997](https://github.com/ohmpatel1997) [here](https://github.com/googleapis/nodejs-datastore/issues/95#issuecomment-554387312).\n\n\n## Samples\n\nSamples are in the [`samples/`](https://github.com/googleapis/nodejs-datastore/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample.\n\n| Sample                      | Source Code                       | Try it |\n| --------------------------- | --------------------------------- | ------ |\n| Concepts | [source code](https://github.com/googleapis/nodejs-datastore/blob/main/samples/concepts.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-datastore\u0026page=editor\u0026open_in_editor=samples/concepts.js,samples/README.md) |\n| Error | [source code](https://github.com/googleapis/nodejs-datastore/blob/main/samples/error.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-datastore\u0026page=editor\u0026open_in_editor=samples/error.js,samples/README.md) |\n| Export | [source code](https://github.com/googleapis/nodejs-datastore/blob/main/samples/export.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-datastore\u0026page=editor\u0026open_in_editor=samples/export.js,samples/README.md) |\n| Import | [source code](https://github.com/googleapis/nodejs-datastore/blob/main/samples/import.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-datastore\u0026page=editor\u0026open_in_editor=samples/import.js,samples/README.md) |\n| Indexes.get | [source code](https://github.com/googleapis/nodejs-datastore/blob/main/samples/indexes.get.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-datastore\u0026page=editor\u0026open_in_editor=samples/indexes.get.js,samples/README.md) |\n| Indexes.list | [source code](https://github.com/googleapis/nodejs-datastore/blob/main/samples/indexes.list.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-datastore\u0026page=editor\u0026open_in_editor=samples/indexes.list.js,samples/README.md) |\n| Create a union between two filters | [source code](https://github.com/googleapis/nodejs-datastore/blob/main/samples/queryFilterOr.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-datastore\u0026page=editor\u0026open_in_editor=samples/queryFilterOr.js,samples/README.md) |\n| Run query explain (regular query) | [source code](https://github.com/googleapis/nodejs-datastore/blob/main/samples/queryProfileExplain.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-datastore\u0026page=editor\u0026open_in_editor=samples/queryProfileExplain.js,samples/README.md) |\n| Run query explain (aggregate query) | [source code](https://github.com/googleapis/nodejs-datastore/blob/main/samples/queryProfileExplainAggregation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-datastore\u0026page=editor\u0026open_in_editor=samples/queryProfileExplainAggregation.js,samples/README.md) |\n| Run query explain analyze (regular query) | [source code](https://github.com/googleapis/nodejs-datastore/blob/main/samples/queryProfileExplainAnalyze.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-datastore\u0026page=editor\u0026open_in_editor=samples/queryProfileExplainAnalyze.js,samples/README.md) |\n| Run query explain analyze (aggregate query) | [source code](https://github.com/googleapis/nodejs-datastore/blob/main/samples/queryProfileExplainAnalyzeAggregation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-datastore\u0026page=editor\u0026open_in_editor=samples/queryProfileExplainAnalyzeAggregation.js,samples/README.md) |\n| Quickstart | [source code](https://github.com/googleapis/nodejs-datastore/blob/main/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-datastore\u0026page=editor\u0026open_in_editor=samples/quickstart.js,samples/README.md) |\n| Add Task | [source code](https://github.com/googleapis/nodejs-datastore/blob/main/samples/tasks.add.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-datastore\u0026page=editor\u0026open_in_editor=samples/tasks.add.js,samples/README.md) |\n| Delete Task | [source code](https://github.com/googleapis/nodejs-datastore/blob/main/samples/tasks.delete.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-datastore\u0026page=editor\u0026open_in_editor=samples/tasks.delete.js,samples/README.md) |\n| Legacy Samples | [source code](https://github.com/googleapis/nodejs-datastore/blob/main/samples/tasks.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-datastore\u0026page=editor\u0026open_in_editor=samples/tasks.js,samples/README.md) |\n| List Tasks | [source code](https://github.com/googleapis/nodejs-datastore/blob/main/samples/tasks.list.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-datastore\u0026page=editor\u0026open_in_editor=samples/tasks.list.js,samples/README.md) |\n| Update Task | [source code](https://github.com/googleapis/nodejs-datastore/blob/main/samples/tasks.markdone.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-datastore\u0026page=editor\u0026open_in_editor=samples/tasks.markdone.js,samples/README.md) |\n\n\n\nThe [Google Cloud Datastore Node.js Client API Reference][client-docs] documentation\nalso contains samples.\n\n## Supported Node.js Versions\n\nOur client libraries follow the [Node.js release schedule](https://github.com/nodejs/release#release-schedule).\nLibraries are compatible with all current _active_ and _maintenance_ versions of\nNode.js.\nIf you are using an end-of-life version of Node.js, we recommend that you update\nas soon as possible to an actively supported LTS version.\n\nGoogle's client libraries support legacy versions of Node.js runtimes on a\nbest-efforts basis with the following warnings:\n\n* Legacy versions are not tested in continuous integration.\n* Some security patches and features cannot be backported.\n* Dependencies cannot be kept up-to-date.\n\nClient libraries targeting some end-of-life versions of Node.js are available, and\ncan be installed through npm [dist-tags](https://docs.npmjs.com/cli/dist-tag).\nThe dist-tags follow the naming convention `legacy-(version)`.\nFor example, `npm install @google-cloud/datastore@legacy-8` installs client libraries\nfor versions compatible with Node.js 8.\n\n## Versioning\n\nThis library follows [Semantic Versioning](http://semver.org/).\n\n\n\nThis library is considered to be **stable**. The code surface will not change in backwards-incompatible ways\nunless absolutely necessary (e.g. because of critical security issues) or with\nan extensive deprecation period. Issues and requests against **stable** libraries\nare addressed with the highest priority.\n\n\n\n\n\n\nMore Information: [Google Cloud Platform Launch Stages][launch_stages]\n\n[launch_stages]: https://cloud.google.com/terms/launch-stages\n\n## Contributing\n\nContributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-datastore/blob/main/CONTRIBUTING.md).\n\nPlease note that this `README.md`, the `samples/README.md`,\nand a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`)\nare generated from a central template. To edit one of these files, make an edit\nto its templates in\n[directory](https://github.com/googleapis/synthtool).\n\n## License\n\nApache Version 2.0\n\nSee [LICENSE](https://github.com/googleapis/nodejs-datastore/blob/main/LICENSE)\n\n[client-docs]: https://cloud.google.com/nodejs/docs/reference/datastore/latest\n[product-docs]: https://cloud.google.com/datastore/docs\n[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png\n[projects]: https://console.cloud.google.com/project\n[billing]: https://support.google.com/cloud/answer/6293499#enable-billing\n[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=datastore.googleapis.com\n[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogleapis%2Fnodejs-datastore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoogleapis%2Fnodejs-datastore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogleapis%2Fnodejs-datastore/lists"}