Interface JdbcClient.Row
- Enclosing interface:
JdbcClient
public static interface JdbcClient.Row
Restricted view of the current result row.
The row may be read only by the thread executing the current
JdbcClient.RowMapper.map(Row) callback. It must not be passed to another
thread and is no longer valid after the callback returns.
-
Method Summary
Modifier and TypeMethodDescription<T> TReads a value that must not benullby the column index, starting at one.<T> TReads a value that must not benullby column label.<T> Optional<T> Reads a nullable value by a column index that starts at one.<T> Optional<T> Reads a nullable value by column label.
-
Method Details
-
optional
Reads a nullable value by a column index that starts at one.- Type Parameters:
T- scalar type- Parameters:
index- column index, starting at onetype- requested scalar type- Returns:
- optional value
- Throws:
DataException- if the column cannot be readNullPointerException- if the type isnullIllegalArgumentException- if the index or type is invalidIllegalStateException- if the row is no longer active or the caller is not the callback thread
-
optional
Reads a nullable value by column label.- Type Parameters:
T- scalar type- Parameters:
label- column labeltype- requested scalar type- Returns:
- optional value
- Throws:
DataException- if the label is absent or ambiguous, or the column cannot be readNullPointerException- if the label or type isnullIllegalArgumentException- if the label or type is invalidIllegalStateException- if the row is no longer active or the caller is not the callback thread
-
get
Reads a value that must not benullby the column index, starting at one.- Type Parameters:
T- scalar type- Parameters:
index- column index, starting at onetype- requested scalar type- Returns:
- value that is not
null - Throws:
DataException- if the column contains SQLNULLor cannot be readNullPointerException- if the type isnullIllegalArgumentException- if the index or type is invalidIllegalStateException- if the row is no longer active or the caller is not the callback thread
-
get
Reads a value that must not benullby column label.- Type Parameters:
T- scalar type- Parameters:
label- column labeltype- requested scalar type- Returns:
- value that is not
null - Throws:
DataException- if the label is absent or ambiguous, the column contains SQLNULL, or the column cannot be readNullPointerException- if the label or type isnullIllegalArgumentException- if the label or type is invalidIllegalStateException- if the row is no longer active or the caller is not the callback thread
-