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

Add a 'Batch': collects non-transactional saves / deletes. #509

Merged
merged 2 commits into from
Jan 8, 2015
Merged

Add a 'Batch': collects non-transactional saves / deletes. #509

merged 2 commits into from
Jan 8, 2015

Conversation

tseaver
Copy link
Contributor

@tseaver tseaver commented Jan 8, 2015

Closes #421.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 90a20d1 on tseaver:421-dataset_batch_put_delete into * on GoogleCloudPlatform:master*.

@tseaver
Copy link
Contributor Author

tseaver commented Jan 8, 2015

Batch largely patterend after Transaction: we could maybe even derive Transation from batch.

Note that I dropped the "update auto_id keys" bits on the floor: we can add them if they are important for the usecase.

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 65621f3 on tseaver:421-dataset_batch_put_delete into f577b30 on GoogleCloudPlatform:master.

properties = dict(entity)
exclude = tuple(entity.exclude_from_indexes)

self.connection.save_entity(

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@dhermes
Copy link
Contributor

dhermes commented Jan 8, 2015

It's pleasantly surprising how simple the tweaks to Connection were!

I have some other ideas floating around that relate to this (including #495). Could we jump on a video chat tomorrow (January 8) AM to discuss?


I was initially thrown off by the Batch concept since I am used to a strict distinction of ndb.put_multi and ndb.delete_multi. However, Mutation is happy to accommodate all.

raise ValueError('A batch must have a connection and '
'a dataset ID set.')

self._id = None

This comment was marked as spam.

This comment was marked as spam.

@dhermes
Copy link
Contributor

dhermes commented Jan 8, 2015

LGTM save for removing self._id (a remnant of Transaction).

I'll write up a bug outlining a "migration" path based off #495

@tseaver
Copy link
Contributor Author

tseaver commented Jan 8, 2015

I have changes stashed which add the "insert_auto_id*" fixups to Batch. Should I push them, or defer to another PR?

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling cf6873b on tseaver:421-dataset_batch_put_delete into f577b30 on GoogleCloudPlatform:master.

@dhermes dhermes mentioned this pull request Jan 8, 2015
8 tasks
@dhermes
Copy link
Contributor

dhermes commented Jan 8, 2015

Let's defer to another PR so we can ask Patrick about it without lots of distracting other code.

tseaver added a commit that referenced this pull request Jan 8, 2015
Add a 'Batch': collects non-transactional saves / deletes.
@tseaver tseaver merged commit 3a448f3 into googleapis:master Jan 8, 2015
@tseaver tseaver deleted the 421-dataset_batch_put_delete branch January 8, 2015 18:17
@dhermes dhermes added the api: datastore Issues related to the Datastore API. label Dec 31, 2015
atulep pushed a commit that referenced this pull request Apr 3, 2023
…est (#509)

* feat: Add support for BatchRecognize

Deprecate the `update_config_request` field in the `OperationMetadata` message, which was never used and is output only.

PiperOrigin-RevId: 517976288

Source-Link: googleapis/googleapis@7ee7867

Source-Link: googleapis/googleapis-gen@04050e1
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDQwNTBlMTVlN2E0MDlmOWQ0MjFmNjNkYmZkZjM3ZWFjNzJhM2MxNCJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* docs: fix the resource name format in comment for CreatePhraseSetRequest

PiperOrigin-RevId: 518025142

Source-Link: googleapis/googleapis@e354eef

Source-Link: googleapis/googleapis-gen@f3e2685
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjNlMjY4NTBlYjU0NWYzN2U0MWEzZGE3MTQyNmQxMzIwMmVhZTAxMyJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
atulep pushed a commit that referenced this pull request Apr 6, 2023
…est (#509)

* feat: Add support for BatchRecognize

Deprecate the `update_config_request` field in the `OperationMetadata` message, which was never used and is output only.

PiperOrigin-RevId: 517976288

Source-Link: googleapis/googleapis@7ee7867

Source-Link: googleapis/googleapis-gen@04050e1
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDQwNTBlMTVlN2E0MDlmOWQ0MjFmNjNkYmZkZjM3ZWFjNzJhM2MxNCJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* docs: fix the resource name format in comment for CreatePhraseSetRequest

PiperOrigin-RevId: 518025142

Source-Link: googleapis/googleapis@e354eef

Source-Link: googleapis/googleapis-gen@f3e2685
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjNlMjY4NTBlYjU0NWYzN2U0MWEzZGE3MTQyNmQxMzIwMmVhZTAxMyJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
atulep pushed a commit that referenced this pull request Apr 6, 2023
…est (#509)

* feat: Add support for BatchRecognize

Deprecate the `update_config_request` field in the `OperationMetadata` message, which was never used and is output only.

PiperOrigin-RevId: 517976288

Source-Link: googleapis/googleapis@7ee7867

Source-Link: googleapis/googleapis-gen@04050e1
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDQwNTBlMTVlN2E0MDlmOWQ0MjFmNjNkYmZkZjM3ZWFjNzJhM2MxNCJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* docs: fix the resource name format in comment for CreatePhraseSetRequest

PiperOrigin-RevId: 518025142

Source-Link: googleapis/googleapis@e354eef

Source-Link: googleapis/googleapis-gen@f3e2685
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjNlMjY4NTBlYjU0NWYzN2U0MWEzZGE3MTQyNmQxMzIwMmVhZTAxMyJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
atulep pushed a commit that referenced this pull request Apr 18, 2023
…est (#509)

* feat: Add support for BatchRecognize

Deprecate the `update_config_request` field in the `OperationMetadata` message, which was never used and is output only.

PiperOrigin-RevId: 517976288

Source-Link: googleapis/googleapis@7ee7867

Source-Link: googleapis/googleapis-gen@04050e1
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDQwNTBlMTVlN2E0MDlmOWQ0MjFmNjNkYmZkZjM3ZWFjNzJhM2MxNCJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* docs: fix the resource name format in comment for CreatePhraseSetRequest

PiperOrigin-RevId: 518025142

Source-Link: googleapis/googleapis@e354eef

Source-Link: googleapis/googleapis-gen@f3e2685
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjNlMjY4NTBlYjU0NWYzN2U0MWEzZGE3MTQyNmQxMzIwMmVhZTAxMyJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
vchudnov-g pushed a commit that referenced this pull request Sep 20, 2023
* fix!: correct broken ConversationModelEvaluation resource pattern

PiperOrigin-RevId: 442646533

Source-Link: googleapis/googleapis@b62c562

Source-Link: googleapis/googleapis-gen@f5c157c
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjVjMTU3YzY4MTE1ODQ3ZDc4ZWI4NDEyNzM0Y2I4MmU3ZDU1MTViNCJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
parthea pushed a commit that referenced this pull request Sep 22, 2023
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Sep 22, 2023
* chore: Update gapic-generator-python to v1.11.4

PiperOrigin-RevId: 547897126

Source-Link: googleapis/googleapis@c09c75e

Source-Link: googleapis/googleapis-gen@45e0ec4
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNDVlMGVjNDM0MzUxN2NkMGFhNjZiNWNhNjQyMzJhMTgwMmMyZjk0NSJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Oct 21, 2023
add code line to set metric label in addition to resource label.
make the code sample align with similar samples in other languages.
parthea pushed a commit that referenced this pull request Oct 21, 2023
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Oct 21, 2023
Source-Link: googleapis/synthtool@dede53f
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:fac304457974bb530cc5396abd4ab25d26a469cd3bc97cbfb18c8d4324c584eb

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Oct 22, 2023
…est (#509)

* feat: Add support for BatchRecognize

Deprecate the `update_config_request` field in the `OperationMetadata` message, which was never used and is output only.

PiperOrigin-RevId: 517976288

Source-Link: googleapis/googleapis@7ee7867

Source-Link: googleapis/googleapis-gen@04050e1
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDQwNTBlMTVlN2E0MDlmOWQ0MjFmNjNkYmZkZjM3ZWFjNzJhM2MxNCJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* docs: fix the resource name format in comment for CreatePhraseSetRequest

PiperOrigin-RevId: 518025142

Source-Link: googleapis/googleapis@e354eef

Source-Link: googleapis/googleapis-gen@f3e2685
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjNlMjY4NTBlYjU0NWYzN2U0MWEzZGE3MTQyNmQxMzIwMmVhZTAxMyJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: datastore Issues related to the Datastore API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Batch dataset.put and dataset.delete.
3 participants