-
Notifications
You must be signed in to change notification settings - Fork 59
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
Delete data on row.js mutation calls #207
Conversation
Codecov Report
@@ Coverage Diff @@
## master #207 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 10 10
Lines 1260 1266 +6
=====================================
+ Hits 1260 1266 +6
Continue to review full report at Codecov.
|
There are two cases where |
Also, 'create', 'delete', and 'save' methods all need the same logic. |
@theacodes, we have an object in row.js that's the result of a read from Cloud Bigtable, but also can perform additional mutations against the Cloud Bigtable service. At this point, we either have to cleanup the read state when mutations are performed, or we have to design a different solution. We're hoping to reach Beta soon, so we have to decide what to do ASAP. |
I lean on @JustinBeckwith and @kinwa91 along with the maintainers of this repo to pick what's idiomatic in Node.js |
@JustinBeckwith and @kinwa91 do you have any guidance about this PR? |
Apologies - I don't entirely understand the question. Can you elaborate? |
Issue #149 / #151 is caused by an "active record" idiom employed in We can fix this in the following ways, and we need to figure out which one is the best (idiomatic, and least painful for the user) approach :
We opted for option 2 in this PR, but one of the other options may be "better." We're looking for guidance on direction. |
This is familiar to the bucket.getFiles(function(err, files) {
files[0].metadata // metadata record
})
I would advise a user that The issue in #151 is definitely a bug-- instead of extending the local cache of "data", can we just overwrite |
@stephenplusplus, it's not possible to keep |
In read, data is now set to the resulting row's data. In mutation methods, clearing the map instead of deleting it.
Fixes #151 (it's a good idea to open an issue first for discussion)