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

feat: query limit support #343

Merged
merged 21 commits into from
Jun 10, 2022
Merged

Conversation

hongalex
Copy link
Collaborator

@hongalex hongalex commented Jun 9, 2022

What type of PR is this?
/kind feat

What this PR does / Why we need it:
Adds the ability to limit the number of records returned by QueryRecords

Which issue(s) this PR fixes:
Updates #341
Fixes #339

Special notes for your reviewer:

Also refactors the argument of QueryRecords to take in the QueryRecordRequest struct rather than individual parameters

@hongalex hongalex requested a review from yuryu June 10, 2022 22:19
@@ -360,6 +360,9 @@ message QueryRecordsRequest {
// List of sort orders to return records. These SortOrders are applied
// in sequence.
repeated SortOrder sort_orders = 5;

// the limit of the number of records to return.
int64 limit = 6;
Copy link
Member

@yuryu yuryu Jun 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think int32 makes more sense here because you're casting limit to int later, which could be 32 bits on some platforms. Also I don't think we'd ever use a limit bigger than 2 billion.

@hongalex hongalex merged commit 3d3ed5e into googleforgames:main Jun 10, 2022
@hongalex hongalex deleted the feat-query-limit branch June 10, 2022 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

refactor QueryRecords argument list
2 participants