nodejs-bigtable icon indicating copy to clipboard operation
nodejs-bigtable copied to clipboard

Support multiple mutations to one row

Open teststaybaka opened this issue 1 year ago • 0 comments

Is your feature request related to a problem? Please describe.

I checked all examples and documentations but it seems I can't increment multiple columns and at the same time set other columns. I know that mutating one row is transactional which is what I'm trying to leverage.

The Java client's library seems more versatile as documented in https://cloud.google.com/bigtable/docs/aggregates#add-examples.

Checking the code, it seems this part https://github.com/googleapis/nodejs-bigtable/blob/e6bdb8297baf2267876a884e02835a4d009dad6e/src/mutation.ts#L430 suggest that only "insert" and "delete" mutations are supported.

The Row.increment() was using the ReadModifyWriteRow RPC but MutateRow RPC appears to be more versatile.

Describe the solution you'd like

Instead of setting method in Mutation class, nesting another SubMutation (tentative) class with method to mimic the Mutation proto https://cloud.google.com/bigtable/docs/reference/data/rpc/google.bigtable.v2#mutation.

teststaybaka avatar Oct 29 '24 05:10 teststaybaka