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

datastore: add query.run #1280

Merged
merged 4 commits into from
May 5, 2016
Merged

Conversation

stephenplusplus
Copy link
Contributor

@stephenplusplus stephenplusplus commented May 3, 2016

Fixes #1266

To Dos

  • Docs
  • Tests
    • System
    • Unit

Previously, a query has only been created through {module:datastore#createQuery}. But since adding run on the Query object, we need a reference to the parent object. The only thing that made this a bit tricky was running a query inside of a transaction. That's why this PR has to introduce {module:transaction#createQuery}.

@stephenplusplus stephenplusplus added api: datastore Issues related to the Datastore API. don't merge labels May 3, 2016
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label May 3, 2016
@stephenplusplus
Copy link
Contributor Author

@callmehiphop ptal!

* var query = datastore.createQuery('Person')
* .hasAncestor(datastore.key(['Person', 1234]))
* .hasAncestor(datastore.key(['Person', 'Dave']))

This comment was marked as spam.

@stephenplusplus
Copy link
Contributor Author

Fixed the docs issue + realized query.run didn't take an options, which is required for setting the consistency.

@coveralls
Copy link

coveralls commented May 5, 2016

Coverage Status

Coverage remained the same at 100.0% when pulling acdb279 on stephenplusplus:spp--1266 into 243b52d on GoogleCloudPlatform:master.

@callmehiphop callmehiphop merged commit f4e431f into googleapis:master May 5, 2016
@callmehiphop
Copy link
Contributor

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: datastore Issues related to the Datastore API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants