-
Notifications
You must be signed in to change notification settings - Fork 60
added keyset pagination serialization #1007
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: [email protected] <[email protected]>
addressing issue #1002 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left comments, please have a look.
In general, please, add comments to any public function added new together with a relevant unit-test.
Please, also fill the metadata fields on the right hand side of the PR web page. Thanks
platform/view/services/storage/driver/sql/query/pagination/keyset.go
Outdated
Show resolved
Hide resolved
platform/view/services/storage/driver/sql/query/pagination/save_load.go
Outdated
Show resolved
Hide resolved
platform/view/services/storage/driver/sql/query/pagination/save_load.go
Outdated
Show resolved
Hide resolved
platform/view/services/storage/driver/sql/query/pagination/save_load.go
Outdated
Show resolved
Hide resolved
for instance, we exercise pagination in Hayim: done |
Signed-off-by: [email protected] <[email protected]>
Signed-off-by: [email protected] <[email protected]>
Signed-off-by: [email protected] <[email protected]>
Signed-off-by: [email protected] <[email protected]>
Signed-off-by: [email protected] <[email protected]>
e6e7bec
to
a880d59
Compare
platform/view/services/storage/driver/sql/query/pagination/keyset_test.go
Outdated
Show resolved
Hide resolved
platform/view/services/storage/driver/sql/query/select/query.go
Outdated
Show resolved
Hide resolved
if err != nil { | ||
return nil, err | ||
} | ||
if strings.ToUpper(string(idFieldName[0])) != string(idFieldName[0]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does idfieldname need to be a slice?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please explain
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
idFieldName is a string, why are we comparing the first character only?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good question. I copied the initialization code from KeysetWithField
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@adecaro Not familiar enough with Go. I think the capital letter is needed to ensure the field is public.
Can we resolve this?
offset int | ||
pageSize int | ||
Offset int `json:"offset"` | ||
PageSize int `json:"pageSize"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some times you use camel case and some times snake case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@adecaro what is the style we use? I see both in the code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, we need a linter to make sure we stick to one style.
Let's fix this in another PR.
platform/view/services/storage/driver/sql/query/select/query.go
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some changes to make
Signed-off-by: [email protected] <[email protected]>
Signed-off-by: [email protected] <[email protected]>
32bc96f
to
9c85188
Compare
Signed-off-by: [email protected] <[email protected]>
@HayimShaul , I think we are essentially fine here. Let's propagate the changes to the other repos and then we merge. |
No description provided.