ResultSet
interfacein packageklyn.databases.sql
public interface ResultSet extends AutoClosable:
Cursor over SQL query results, inspired by `java.sql.ResultSet`.
Typed reads follow the JDBC-style `getXxx(...)` surface.
import klyn.databases.sql
rows = statement.query("select * from users")
while rows.next():
print(rows.getString("name"))
Properties
| Modifier and Type |
Member |
Description |
| public readonly property |
afterLast |
True after the last row. |
| public readonly property |
beforeFirst |
True before the first row. |
| public readonly property |
closed |
True when the cursor is closed. |
| public readonly property |
concurrency |
Update/read-only concurrency mode. |
| public property |
fetchDirection |
Preferred fetch direction. |
| public property |
fetchSize |
Preferred fetch size. |
| public readonly property |
holdability |
Cursor holdability mode. |
| public readonly property |
lastReadWasNull |
True when the last typed read returned SQL `NULL`. |
| public readonly property |
metadata |
Metadata attached to this cursor. |
| public readonly property |
resultSetType |
Cursor scrollability mode. |
| public readonly property |
rowNumber |
Current 1-based row number, or `0` outside a row. |
| public readonly property |
statement |
Parent statement. |
| public readonly property |
warning |
Current warning chain. |
Methods
| Modifier and Type |
Member |
Description |
| public |
absolute |
Moves to one absolute row number. |
| public |
clearWarnings clearWarnings() as Void
|
Clears the warning chain. |
| public |
first |
Moves to the first row. |
| public |
getBoolean |
Reads one column as `Boolean`. |
| public |
getDouble |
Reads one column as `Double`. |
| public |
getInt |
Reads one column as `Int`. |
| public |
getLong |
Reads one column as `Long`. |
| public |
getObject |
Reads one raw/object column value by index or label. |
| public |
getString |
Reads one column as text. |
| public |
last |
Moves to the last row. |
| public |
moveAfterLast |
Moves the cursor after the last row. |
| public |
moveBeforeFirst |
Moves the cursor before the first row. |
| public |
next |
Moves to the next row. |
| public |
previous |
Moves to the previous row. |
| public |
relative |
Moves relatively from the current row. |
| public |
wasNull |
True when the last `getXxx(. |