ResultSet
interface in package klyn.databases.sql

    public interface ResultSet extends AutoClosable:

AutoClosable
└ ResultSet

Cursor over SQL query results.

Typed reads use methods such as `getString(...)`, `getInt(...)`, and `getDouble(...)`.

    import klyn.databases.sql

    rows = statement.executeQuery("select * from users")
    while rows.next():
    print(rows.getString("name"))

Properties

Modifier and Type | Member | Description
--- | --- | ---
public readonly property | afterLast `afterLast as Boolean` | True after the last row.
public readonly property | beforeFirst `beforeFirst as Boolean` | True before the first row.
public readonly property | closed `closed as Boolean` | True when the cursor is closed.
public readonly property | concurrency `concurrency as ResultSetConcurrency` | Update/read-only concurrency mode.
public property | fetchDirection `fetchDirection as FetchDirection` | Preferred fetch direction.
public property | fetchSize `fetchSize as Int` | Preferred fetch size.
public readonly property | holdability `holdability as ResultSetHoldability` | Cursor holdability mode.
public readonly property | lastReadWasNull `lastReadWasNull as Boolean` | True when the last typed read returned SQL `NULL`.
public readonly property | metadata `metadata as ResultSetMetaData` | Metadata attached to this cursor.
public readonly property | resultSetType `resultSetType as ResultSetType` | Cursor scrollability mode.
public readonly property | rowNumber `rowNumber as Int` | Current 1-based row number, or `0` outside a row.
public readonly property | statement `statement as Statement` | Parent statement.
public readonly property | warning `warning as SQLWarning` | Current warning chain.

Methods

Modifier and Type | Member | Description
--- | --- | ---
public | absolute `absolute(rowNumber as Int) as Boolean throws SQLException` | Moves to one absolute row number.
public | clearWarnings `clearWarnings() as Void` | Clears the warning chain.
public | first `first() as Boolean throws SQLException` | Moves to the first row.
public | getBoolean `getBoolean(column as Object) as Boolean throws SQLException` | Reads one column as `Boolean`.
public | getDateTime `getDateTime(column as Object) as DateTime throws SQLException` | Reads one column as `DateTime`.
public | getDouble `getDouble(column as Object) as Double throws SQLException` | Reads one column as `Double`.
public | getInt `getInt(column as Object) as Int throws SQLException` | Reads one column as `Int`.
public | getLong `getLong(column as Object) as Long throws SQLException` | Reads one column as `Long`.
public | getObject `getObject(column as Object) as Object throws SQLException` | Reads one raw/object column value by index or label.
public | getString `getString(column as Object) as String throws SQLException` | Reads one column as text.
public | last `last() as Boolean throws SQLException` | Moves to the last row.
public | moveAfterLast `moveAfterLast() as Void throws SQLException` | Moves the cursor after the last row.
public | moveBeforeFirst `moveBeforeFirst() as Void throws SQLException` | Moves the cursor before the first row.
public | next `next() as Boolean throws SQLException` | Moves to the next row.
public | previous `previous() as Boolean throws SQLException` | Moves to the previous row.
public | relative `relative(offset as Int) as Boolean throws SQLException` | Moves relatively from the current row.
public | wasNull `wasNull() as Boolean throws SQLException` | True when the last `getXxx(...)` read returned SQL `NULL`.

Inherited Methods
method Inherited Methods from AutoClosable: close