GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — datastore: accept entity object to mutation methods by stephenplusplus · Pull Request #1804 · googleapis/google-cloud-node

Conversation

@stephenplusplus

@stephenplusplus stephenplusplus commented Nov 17, 2016

Copy link
Copy Markdown
Contributor

Fixes #1803

To make get & updating entities easier:

Before

datastore.get(key, function(err, entity) {
  entity.color = 'red'

  datastore.save({
    key: entity[datastore.KEY],
    data: entity
  }, function(err) {})
})

After

datastore.get(key, function(err, entity) {
  entity.color = 'red'
  datastore.save(entity, function(err) {})
})

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@stephenplusplus
datastore: accept entity object to mutation methods
5fcd79d
@stephenplusplus stephenplusplus added the api: datastore Issues related to the Datastore API. label Nov 17, 2016
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Nov 17, 2016
@stephenplusplus stephenplusplus mentioned this pull request Nov 17, 2016
dataset.save() should work with entities using the new datastore.KEY symbol #1803
Closed
@stephenplusplus stephenplusplus assigned callmehiphop Nov 17, 2016
@callmehiphop
callmehiphop merged commit aacb8cc into googleapis:master Nov 17, 2016
@takeratta takeratta mentioned this pull request Jul 6, 2023
[Snyk] Fix for 1 vulnerabilities takeratta/google-cloud-node#2
Open
miguelvelezsa pushed a commit that referenced this pull request Jan 28, 2026
@stephenplusplus @callmehiphop
datastore: accept entity object to mutation methods (#1804)
b7e52f3
@miguelvelezsa miguelvelezsa mentioned this pull request Jan 28, 2026
migrate code from googleapis/nodejs-datastore #7053
Closed
sofisl pushed a commit that referenced this pull request Feb 5, 2026
@stephenplusplus @callmehiphop
datastore: accept entity object to mutation methods (#1804)
e6fe4ce
@sofisl sofisl mentioned this pull request Feb 5, 2026
migrate code from googleapis/nodejs-datastore #7148
Closed
4 tasks
@sofisl sofisl mentioned this pull request Feb 17, 2026
migrate code from googleapis/nodejs-datastore #7263
Merged
4 tasks
GautamSharda pushed a commit that referenced this pull request Mar 11, 2026
@release-please
chore(main): release 4.0.1 (#1804)
925a20b
🤖 I have created a release *beep* *boop*
---


## [4.0.1](https://togithub.com/googleapis/nodejs-pubsub/compare/v4.0.0...v4.0.1) (2023-08-11)


### Bug Fixes

* **deps:** Update dependency @google-cloud/paginator to v5 ([#1799](https://togithub.com/googleapis/nodejs-pubsub/issues/1799)) ([3195d21](https://togithub.com/googleapis/nodejs-pubsub/commit/3195d21bf817cf10daa86b019532c9405dc42405))
* **deps:** Update dependency @google-cloud/precise-date to v4 ([#1803](https://togithub.com/googleapis/nodejs-pubsub/issues/1803)) ([2c22d67](https://togithub.com/googleapis/nodejs-pubsub/commit/2c22d67b0fbaf3409101a830ee0c5be002ed6c7b))
* **deps:** Update dependency @google-cloud/projectify to v4 ([#1800](https://togithub.com/googleapis/nodejs-pubsub/issues/1800)) ([5787d56](https://togithub.com/googleapis/nodejs-pubsub/commit/5787d56b95d46544bf8c59fe4bc4cb374bc53d0a))
* **deps:** Update dependency @google-cloud/promisify to v4 ([#1798](https://togithub.com/googleapis/nodejs-pubsub/issues/1798)) ([093c46b](https://togithub.com/googleapis/nodejs-pubsub/commit/093c46bd0a4713ad9702bde03eaa5e8b0acedb28))

---
This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
feywind pushed a commit that referenced this pull request Mar 27, 2026
@release-please
chore(main): release 4.0.1 (#1804)
a221baa
🤖 I have created a release *beep* *boop*
---


## [4.0.1](https://togithub.com/googleapis/nodejs-pubsub/compare/v4.0.0...v4.0.1) (2023-08-11)


### Bug Fixes

* **deps:** Update dependency @google-cloud/paginator to v5 ([#1799](https://togithub.com/googleapis/nodejs-pubsub/issues/1799)) ([3195d21](https://togithub.com/googleapis/nodejs-pubsub/commit/3195d21bf817cf10daa86b019532c9405dc42405))
* **deps:** Update dependency @google-cloud/precise-date to v4 ([#1803](https://togithub.com/googleapis/nodejs-pubsub/issues/1803)) ([2c22d67](https://togithub.com/googleapis/nodejs-pubsub/commit/2c22d67b0fbaf3409101a830ee0c5be002ed6c7b))
* **deps:** Update dependency @google-cloud/projectify to v4 ([#1800](https://togithub.com/googleapis/nodejs-pubsub/issues/1800)) ([5787d56](https://togithub.com/googleapis/nodejs-pubsub/commit/5787d56b95d46544bf8c59fe4bc4cb374bc53d0a))
* **deps:** Update dependency @google-cloud/promisify to v4 ([#1798](https://togithub.com/googleapis/nodejs-pubsub/issues/1798)) ([093c46b](https://togithub.com/googleapis/nodejs-pubsub/commit/093c46bd0a4713ad9702bde03eaa5e8b0acedb28))

---
This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@callmehiphop callmehiphop

Labels

api: datastore Issues related to the Datastore API. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@stephenplusplus @callmehiphop @googlebot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.