public interface Row
Column names used as input to getter methods are case insensitive. When a get method is called with a column name and several columns have the same name, then the value of the first matching column will be returned. The column name option is designed to be used when column names are used in the SQL query that generated the result set. Columns that are not explicitly named in the query should be referenced through column indexes.
For maximum portability, result columns within each Row
should be read in left-to-right order, and each column should be read only once.
get(Object)
without specifying a target type returns a suitable value representation. The R2DBC specification contains a mapping table that shows default mappings between database
types and Java types.
Specifying a target type, the R2DBC driver attempts to convert the value to the target type.
A row is invalidated after consumption in the mapping function
.
The number, type and characteristics of columns are described through RowMetadata
Modifier and Type | Method and Description |
---|---|
default Object |
get(Object identifier)
Returns the value for a column in this row using the default type mapping.
|
<T> T |
get(Object identifier,
Class<T> type)
Returns the value for a column in this row.
|
@Nullable <T> T get(Object identifier, Class<T> type)
T
- the type of the item being returnedidentifier
- the identifier of the column. Can be either the column index starting at 0 or column name.type
- the type of item to return. This type must be assignable to, and allows for variance.null
.IllegalArgumentException
- if identifier
or type
is null
@Nullable default Object get(Object identifier)
get(Object, Class)
passing Object
as the type in
order to allow the implementation to make the loosest possible match.identifier
- the identifier of the column. Can be either the column index starting at 0 or column name.null
.IllegalArgumentException
- if identifier
or type
is null
Copyright © 2019. All rights reserved.