Skip to content

Commit

Permalink
Fixed next function
Browse files Browse the repository at this point in the history
  • Loading branch information
takapi327 committed Jan 31, 2025
1 parent 7addd2c commit c611abc
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ private[ldbc] case class ResultSetImpl(

def next(): Boolean =
if isClosed then raiseError(ResultSetImpl.CLOSED_MESSAGE)
else if currentCursor < recordSize then
currentRow = Some(records(currentCursor))
currentCursor += 1
true
else if currentCursor <= recordSize then
currentRow = records.lift(currentCursor)
currentCursor = currentCursor + 1
currentRow.isDefined
else
currentRow = None
currentCursor = currentCursor + 1
false

override def close(): Unit = isClosed = true
Expand Down

0 comments on commit c611abc

Please sign in to comment.