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

test: Add a test to ensure that snapshot reads works for runQuery #1139

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

danieljbruce
Copy link
Contributor

This PR ensures that snapshot reads works for both aggregate queries and regular queries. A refactor is needed so that both types of queries can use the code that parses the readTime option.

Introducing getSharedOptionsOnly allows us to use that function in two different places to avoid a repeated block of code.

# Conflicts:
#	src/request.ts
The future refactor must implement the TODOs so that there is less repeated code in the codebase. Also, this commit implements snapshot reads for queries and adds a test for the snapshot reads.

# Conflicts:
#	src/request.ts
#	system-test/datastore.ts
@danieljbruce danieljbruce requested review from a team as code owners August 18, 2023 13:55
@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: datastore Issues related to the googleapis/nodejs-datastore API. labels Aug 18, 2023
…into snapshot-reads-other-pr

# Conflicts:
#	src/request.ts
#	system-test/datastore.ts
@product-auto-label product-auto-label bot added size: xs Pull request size is extra small. and removed size: m Pull request size is medium. labels Sep 7, 2023
@danieljbruce danieljbruce changed the title feat: Snapshot reads other pr test: Snapshot reads other pr Sep 7, 2023
@danieljbruce
Copy link
Contributor Author

With the refactor now done in the sum/avg PR, this PR just involves adding a test to ensure that runQuery works for snapshot reads.

@danieljbruce danieljbruce changed the title test: Snapshot reads other pr test: Add a test to ensure that snapshot reads works for runQuery Sep 7, 2023
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 googleapis/nodejs-datastore API. size: xs Pull request size is extra small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant