BLasan commented on pull request #1598:
URL: https://github.com/apache/fineract/pull/1598#issuecomment-771681068


   > Hi @BLasan - thanks for attempting this, but resolving this issue is a bit 
more complicated than just removing the offending lines as the calls to 
rs.previous() are there for a reason:
   > 
   > Currently the called function takes the ResultSet and extracts data until 
it finds a row that doesn't belong with the others. Then it reverses the cursor 
by 1 row with rs.previous(). That way when the control returns to the calling 
function, the cursor is set so that the calling function gets the first row of 
the next group by calling rs.next().
   > 
   > If we just remove the rs.previous(), then calling rs.next() in the calling 
function will give us the _second_ row of the next group, as we have already 
consumed the first row within the called function.
   > 
   > So one way to solve this would be to "flatten" the functions so that all 
work with the ResultSet is in same function - so that there is no need to pass 
rs.previous(). But to ensure that the "flattening" doesn't change the 
behaviour, it would be good to first have a test case which checks the 
functionality. Then when we refactor the function, we can ensure we haven't 
broken the functionality.
   > 
   > Hope this helps...
   
   Hi. Please refer this. As far as know, initially it does not point to the 
first row of the selected data. This will give a clear idea
   https://www.tutorialspoint.com/java-resultset-next-method-with-example


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to