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

Batch mutations size #4423

Closed
gremi64 opened this issue Feb 1, 2019 · 1 comment
Closed

Batch mutations size #4423

gremi64 opened this issue Feb 1, 2019 · 1 comment
Assignees
Labels
api: firestore Issues related to the Firestore API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@gremi64
Copy link

gremi64 commented Feb 1, 2019

Hi,
I'm currently using "batchWrite" and i was surprised to see that it's not currently possible to access the mutations_list's size. As it's limited to 500 mutations, we should be able to know the size :)

Environment details

  • OS: W10
  • Java version: 1.8_191
  • google-cloud-java version(s): 0.79.0-beta

Steps to reproduce

N/A

Stacktrace

N/A

Code snippet

var batch: WriteBatch = this.firestore.batch()
// batch.getMutationsSize() ?

External references such as API reference guides used

https://cloud.google.com/firestore/docs/manage-data/transactions#batched-writes

Any additional information below

I'll provide a simple pull request to do it, but i'm pretty sure you don't need me on this ;)
[EDIT] pull request provided

Regards,
Gremi

@gremi64
Copy link
Author

gremi64 commented Feb 1, 2019

I don't know how, but i manage to close this issue...

@gremi64 gremi64 reopened this Feb 1, 2019
@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Feb 2, 2019
@kolea2 kolea2 added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. api: firestore Issues related to the Firestore API. and removed triage me I really want to be triaged. labels Feb 5, 2019
sduskis pushed a commit that referenced this issue Feb 8, 2019
* Fixes #4423

Getter over mutations size
Allow knowing the size of the list. For exemple, the batch size is limited to 500 mutations

* Fixes #4423 - Getter on mutations size

Allow knowing the size of the list. For exemple, the batch size is limited to 500 mutations

Fixes #4423

* Correction format code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: firestore Issues related to the Firestore API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

3 participants