You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Confusing that a Transaction object can send non-transaction requests. It would be better if this logic was abstracted into something like a "APIRequest" or something.
Instead of instantiating Dataset with a transaction object, it should just be a API request creator object.
Why not have Dataset just create an ApiRequest object and return that? We can use this to create requests for all the APIs in this library (much like is done in google-api-nodejs-client. Transaction can just be designed to make transactional ApiRequests.
I don't like the fact that non-transactional calls are abstracted as method's of a pseudo transaction either. @ryanseys, could you propose an API with ApiRequest objects? I don't fully understand how it will look from the user's perspective.
Activity
stephenplusplus commentedon Sep 12, 2014
👍 it is a bit confusing at first. Maybe:
We would just need to figure out how to get jsdoc to handle this.
ryanseys commentedon Sep 12, 2014
Why not have Dataset just create an ApiRequest object and return that? We can use this to create requests for all the APIs in this library (much like is done in
google-api-nodejs-client. Transaction can just be designed to make transactional ApiRequests.stephenplusplus commentedon Sep 12, 2014
👍 assuming you mean Dataset methods (.get, .whatever) return ApiRequest objects.
Can you put together some rough code so I can better visualize how dataset/transaction would work with the new ApiRequest?
ryanseys commentedon Sep 12, 2014
Yes.
Yes. I'll try and get a rough implementation out this weekend.
ryanseys commentedon Sep 18, 2014
Are we still doing this? I held back on implementing this because I wasn't sure what others thought. @silvolu @rakyll
rakyll commentedon Sep 18, 2014
I don't like the fact that non-transactional calls are abstracted as method's of a pseudo transaction either. @ryanseys, could you propose an API with ApiRequest objects? I don't fully understand how it will look from the user's perspective.
ryanseys commentedon Sep 19, 2014
Uhh, the API should not change as far as the user is concerned. More just refactoring. Separation of responsibility.
rakyll commentedon Sep 19, 2014
SGTM.
[-]Transaction sends non-transactional requests[/-][+]datastore: Transaction sends non-transactional requests[/+]52 remaining items
Bumping version to 0.14.1 (#204)
chore: the ultimate fix for repo-tools EPERM (#204)
fix(build): migrate to main branch (#204)
Add a synth file and update CI (#204)
chore: release 1.0.2 (#204)
build: only check --engine-strict for production deps (#204)
chore: remove duplicate mocha config (#204)
chore: remove duplicate mocha config (#204)
chore: use let and const (#204)
fix: update node issue template (#204)
chore: release 2.0.2 (#205)
fix: update node issue template (#204)
chore: release 2.0.2 (#205)
Revert "feat: allow synthetic default imports when testing typescript…
chore: the ultimate fix for repo-tools EPERM (googleapis#204)