public interface RowMetadata
0
-based. Column names do not necessarily reflect the column names how they are in the underlying tables but rather how columns are represented (e.g. aliased) in the
result.Modifier and Type | Method and Description |
---|---|
default boolean |
contains(String columnName)
Returns whether this object contains metadata for
columnName . |
ColumnMetadata |
getColumnMetadata(int index)
Returns the
ColumnMetadata for one column in this row. |
ColumnMetadata |
getColumnMetadata(String name)
Returns the
ColumnMetadata for one column in this row. |
List<? extends ColumnMetadata> |
getColumnMetadatas()
Returns the
ColumnMetadata for all columns in this row. |
Collection<String> |
getColumnNames()
Deprecated.
since 0.9 for removal. Use
contains(String) or getColumnMetadatas() instead. |
ColumnMetadata getColumnMetadata(int index)
ColumnMetadata
for one column in this row.index
- the column index starting at 0ColumnMetadata
for one column in this rowArrayIndexOutOfBoundsException
- if the index
is less than zero or greater than the number of available columns.ColumnMetadata getColumnMetadata(String name)
ColumnMetadata
for one column in this row.name
- the name of the column. Column names are case insensitive. When a get method contains several columns with same name, then the value of the first matching column will be returnedColumnMetadata
for one column in this rowIllegalArgumentException
- if name
is null
NoSuchElementException
- if there is no column with the name
List<? extends ColumnMetadata> getColumnMetadatas()
ColumnMetadata
for all columns in this row.ColumnMetadata
for all columns in this row@Deprecated Collection<String> getColumnNames()
contains(String)
or getColumnMetadatas()
instead.
Any attempts to modify the returned collection, whether direct or via its iterator, result in an UnsupportedOperationException
.
The iteration order of the column names depends on the actual query result.
Column names may appear multiple times if the result specifies multiple columns with the same name.
Lookups through Collection.contains(Object)
are case-insensitive.
Implementations may enhance comparison sorting rules with escape characters to enforce a particular mode of comparison
when querying for presence/absence of a column.
default boolean contains(String columnName)
columnName
.
Lookups are case-insensitive. Implementations may allow escape characters to enforce a particular mode of comparison
when querying for presence/absence of a column.true
if this object contains metadata for columnName
; false
otherwise.Copyright © 2021. All rights reserved.