MCPcopy Index your code
hub / github.com/apache/groovy / moveCursor

Method moveCursor

subprojects/groovy-sql/src/main/java/groovy/sql/Sql.java:1548–1559  ·  view source on GitHub ↗
(ResultSet results, int offset)

Source from the content-addressed store, hash-verified

1546 }
1547
1548 private static boolean moveCursor(ResultSet results, int offset) throws SQLException {
1549 boolean cursorAtRow = true;
1550 if (results.getType() == ResultSet.TYPE_FORWARD_ONLY) {
1551 int i = 1;
1552 while (i++ < offset && cursorAtRow) {
1553 cursorAtRow = results.next();
1554 }
1555 } else if (offset > 1) {
1556 cursorAtRow = results.absolute(offset - 1);
1557 }
1558 return cursorAtRow;
1559 }
1560
1561 /**
1562 * Performs the given SQL query calling the given <code>rowClosure</code> with each row of the result set starting at

Callers 2

eachRowMethod · 0.95
asListMethod · 0.95

Calls 2

getTypeMethod · 0.65
nextMethod · 0.45

Tested by

no test coverage detected