public interface Row extends QueryPart
Note: Not all databases support row value expressions, but many row value expression operations can be simulated on all databases. See relevant row value expression method Javadocs for details.
Modifier and Type | Method and Description |
---|---|
DataType<?> |
dataType(int fieldIndex)
Get the data type for a given field index.
|
DataType<?> |
dataType(String fieldName)
Get the data type for a given field name.
|
DataType<?>[] |
dataTypes()
Get an array of data types for this row.
|
<T> Field<T> |
field(Field<T> field)
Get a specific field from this row.
|
Field<?> |
field(int fieldIndex)
Get a specific field from this row.
|
Field<?> |
field(String fieldName)
Get a specific field from this row.
|
Field<?>[] |
fields()
Get all fields from this row.
|
Field<?>[] |
fields(Field<?>... fields)
Get all fields from this row, providing some fields.
|
Field<?>[] |
fields(int... fieldIndexes)
Get all fields from this row, providing some field indexes.
|
Field<?>[] |
fields(String... fieldNames)
Get all fields from this row, providing some field names.
|
int |
indexOf(Field<?> field)
Get a field's index from this row.
|
int |
indexOf(String fieldName)
Get a field's index from this row.
|
Condition |
isNotNull()
Check if this row value expression contains no
NULL values. |
Condition |
isNull()
Check if this row value expression contains only
NULL
values. |
int |
size()
Get the degree of this row value expression.
|
Class<?> |
type(int fieldIndex)
Get the type for a given field index.
|
Class<?> |
type(String fieldName)
Get the type for a given field name.
|
Class<?>[] |
types()
Get an array of types for this row.
|
int size()
<T> Field<T> field(Field<T> field)
Usually, this will return the field itself. However, if this is a row from an aliased table, the field will be aliased accordingly.
T
- The generic field typefield
- The field to fetchField<?> field(String fieldName)
fieldName
- The field to fetchField<?> field(int fieldIndex)
fieldIndex
- The field's index of the field to fetchField<?>[] fields()
Field<?>[] fields(Field<?>... fields)
field(Field)
Field<?>[] fields(String... fieldNames)
field(String)
Field<?>[] fields(int... fieldIndexes)
field(int)
int indexOf(Field<?> field)
field
- The field to look for-1
if the field is not
contained in this Row
int indexOf(String fieldName)
fieldName
- The field name to look for-1
if the field is not
contained in this Row
Class<?>[] types()
Entries in the resulting array correspond to Field.getType()
for
the corresponding Field
in fields()
Class<?> type(int fieldIndex)
fieldIndex
- The field's index of the field's type to fetchClass<?> type(String fieldName)
fieldName
- The field's name of the field's type to fetchDataType<?>[] dataTypes()
Entries in the resulting array correspond to Field.getDataType()
for the corresponding Field
in fields()
DataType<?> dataType(int fieldIndex)
fieldIndex
- The field's index of the field's data type to fetchDataType<?> dataType(String fieldName)
fieldName
- The field's name of the field's data type to fetch@Support Condition isNull()
NULL
values.
Row NULL predicates can be simulated in those databases that do not
support such predicates natively: (A, B) IS NULL
is
equivalent to A IS NULL AND B IS NULL
@Support Condition isNotNull()
NULL
values.
Row NOT NULL predicates can be simulated in those databases that do not
support such predicates natively: (A, B) IS NOT NULL
is
equivalent to A IS NOT NULL AND B IS NOT NULL
Note that the two following predicates are NOT equivalent:
(A, B) IS NOT NULL
, which is the same as
(A IS NOT NULL) AND (B IS NOT NULL)
NOT((A, B) IS NULL)
, which is the same as
(A IS NOT NULL) OR (B IS NOT NULL)
Copyright © 2014. All Rights Reserved.