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
Sorry if this isn't right, I only noticed it through inspection.
It looks like Transaction extends from DatastoreRequest, which means it gets a runQuery method. However, it doesn't look like it overrides it. This means a user who thinks they are running a query in the transaction is actually going to get inconsistent results.
Activity
stephenplusplus commentedon Oct 6, 2015
I think it will work as intended. When the API request is made, it goes through this method: https://github.com/GoogleCloudPlatform/gcloud-node/blob/69046d383af6bf67a316739c66650601228abc8a/lib/datastore/request.js#L759:
this.idis set to the transaction ID when using a Transaction object.pcostell commentedon Oct 6, 2015
That's if the method is 'lookup'. But what if the method is 'runQuery'?
stephenplusplus commentedon Oct 6, 2015
Ah, woops. So I think we just need
this.id && (method === 'lookup' || method === 'runQuery').feat: add eslintignore for sameple generated code (#1302) (#905)
chore(deps): update actions/checkout digest to b4ffde6 (#905)
chore(deps): update actions/checkout digest to b4ffde6 (#905)
chore(deps): update actions/checkout digest to b4ffde6 (#905)
chore(deps): update actions/checkout digest to b4ffde6 (#905)
chore(deps): update actions/checkout digest to b4ffde6 (#905)
chore(deps): update actions/checkout digest to b4ffde6 (#905)
docs(badges): tweak badge to use new preview/stable language (#1314) (#…
chore(deps): update actions/checkout digest to b4ffde6 (#905)
chore(deps): update actions/checkout digest to b4ffde6 (#905)
docs(badges): tweak badge to use new preview/stable language (#1314) (#…
docs(badges): tweak badge to use new preview/stable language (#1314) (#…
test: modernize mocha config (#905)
fix(signed-url): replace encodeURIComponent with custom encoding func…
fix(deps): upgrade @google-cloud/common (#905)
fix(signed-url): replace encodeURIComponent with custom encoding func…