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

fix: improper relative cursor movement #1462

Merged

Conversation

Projects
None yet
4 participants
@nicktorwald
Copy link
Contributor

commented Apr 8, 2019

Fix a wrong relative cursor movement when a new calculated index is
negative (beyond the first row). According to the java-doc, in this
case the position leaves before the first row. Current implementation
of the 'relative' method delegates the movement to the 'absolute' method
which treats a negative index with respect to the end of the result set.

Example: assume we have next result set {1, 2, *3, 4, 5, 6} and we are
on the 3rd position. Move relative to -6 which means a new index is
-3 (3 - 6). I expect the result set will be on the zero position with
before-first status but actually we are on the 4th position (3rd from the end).

fix: improper relative cursor movement
Fix a wrong relative cursor movement when a new calculated index is
negative (beyond the first row). According to the java-doc, in this
case the position leaves before the first row. Current implementation
of the 'relative' method delegates the movement to the 'absolute' method
which treats a negative index with respect to the end of the result set.
@AppVeyorBot

This comment has been minimized.

Copy link

commented Apr 8, 2019

@codecov-io

This comment has been minimized.

Copy link

commented Apr 8, 2019

Codecov Report

Merging #1462 into master will increase coverage by 0.04%.
The diff coverage is 100%.

@@             Coverage Diff              @@
##             master    #1462      +/-   ##
============================================
+ Coverage     68.74%   68.79%   +0.04%     
- Complexity     3903     3906       +3     
============================================
  Files           179      179              
  Lines         16414    16418       +4     
  Branches       2672     2673       +1     
============================================
+ Hits          11284    11294      +10     
+ Misses         3883     3879       -4     
+ Partials       1247     1245       -2

@davecramer davecramer merged commit b6ab27c into pgjdbc:master Apr 8, 2019

3 checks passed

codecov/project 68.79% (+0.04%) compared to 5e48c4d
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@nicktorwald nicktorwald deleted the nicktorwald:nicktorwald/result-set-relative branch Apr 8, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.