public interface ResultSet extends AutoClosable:
Cursor over SQL query results.
Typed reads use methods such as getString(...), getInt(...), and getDouble(...).
import klyn.databases.sql
rows = statement.query("select * from users")
while rows.next():
print(rows.getString("name"))| Modifier and Type | Member | Description |
|---|---|---|
| public readonly property | afterLastafterLast as Boolean |
True after the last row. |
| public readonly property | beforeFirstbeforeFirst as Boolean |
True before the first row. |
| public readonly property | closedclosed as Boolean |
True when the cursor is closed. |
| public readonly property | concurrencyconcurrency as ResultSetConcurrency |
Update/read-only concurrency mode. |
| public property | fetchDirectionfetchDirection as FetchDirection |
Preferred fetch direction. |
| public property | fetchSizefetchSize as Int |
Preferred fetch size. |
| public readonly property | holdabilityholdability as ResultSetHoldability |
Cursor holdability mode. |
| public readonly property | lastReadWasNulllastReadWasNull as Boolean |
True when the last typed read returned SQL `NULL`. |
| public readonly property | metadatametadata as ResultSetMetaData |
Metadata attached to this cursor. |
| public readonly property | resultSetTyperesultSetType as ResultSetType |
Cursor scrollability mode. |
| public readonly property | rowNumberrowNumber as Int |
Current 1-based row number, or `0` outside a row. |
| public readonly property | statementstatement as Statement |
Parent statement. |
| public readonly property | warningwarning as SQLWarning |
Current warning chain. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | absoluteabsolute(rowNumber as Int) as Boolean throws SQLException |
Moves to one absolute row number. |
| public | clearWarningsclearWarnings() as Void |
Clears the warning chain. |
| public | firstfirst() as Boolean throws SQLException |
Moves to the first row. |
| public | getBooleangetBoolean(column as Object) as Boolean throws SQLException |
Reads one column as `Boolean`. |
| public | getDateTimegetDateTime(column as Object) as DateTime throws SQLException |
Reads one column as `DateTime`. |
| public | getDoublegetDouble(column as Object) as Double throws SQLException |
Reads one column as `Double`. |
| public | getIntgetInt(column as Object) as Int throws SQLException |
Reads one column as `Int`. |
| public | getLonggetLong(column as Object) as Long throws SQLException |
Reads one column as `Long`. |
| public | getObjectgetObject(column as Object) as Object throws SQLException |
Reads one raw/object column value by index or label. |
| public | getStringgetString(column as Object) as String throws SQLException |
Reads one column as text. |
| public | lastlast() as Boolean throws SQLException |
Moves to the last row. |
| public | moveAfterLastmoveAfterLast() as Void throws SQLException |
Moves the cursor after the last row. |
| public | moveBeforeFirstmoveBeforeFirst() as Void throws SQLException |
Moves the cursor before the first row. |
| public | nextnext() as Boolean throws SQLException |
Moves to the next row. |
| public | previousprevious() as Boolean throws SQLException |
Moves to the previous row. |
| public | relativerelative(offset as Int) as Boolean throws SQLException |
Moves relatively from the current row. |
| public | wasNullwasNull() as Boolean throws SQLException |
True when the last `getXxx(. |