static class JdbcUtils.ObjectArrayRowBuilder extends Object implements Function0<Object[]>
ResultSet.getObject(int) for every column,
or getXxx if the result type is a primitive xxx,
and returns an array of objects for each row.| Modifier and Type | Field and Description |
|---|---|
private int |
columnCount |
private org.apache.calcite.avatica.ColumnMetaData.Rep[] |
reps |
private ResultSet |
resultSet |
private int[] |
types |
| Constructor and Description |
|---|
ObjectArrayRowBuilder(ResultSet resultSet,
org.apache.calcite.avatica.ColumnMetaData.Rep[] reps,
int[] types) |
| Modifier and Type | Method and Description |
|---|---|
Object[] |
apply() |
static Function1<ResultSet,Function0<Object[]>> |
factory(List<Pair<org.apache.calcite.avatica.ColumnMetaData.Rep,Integer>> list) |
private static Date |
shift(Date v) |
private static Time |
shift(Time v) |
private static Timestamp |
shift(Timestamp v) |
private Object |
value(int i)
Gets a value from a given column in a JDBC result set.
|
private final ResultSet resultSet
private final int columnCount
private final org.apache.calcite.avatica.ColumnMetaData.Rep[] reps
private final int[] types
ObjectArrayRowBuilder(ResultSet resultSet, org.apache.calcite.avatica.ColumnMetaData.Rep[] reps, int[] types) throws SQLException
SQLExceptionpublic static Function1<ResultSet,Function0<Object[]>> factory(List<Pair<org.apache.calcite.avatica.ColumnMetaData.Rep,Integer>> list)
private Object value(int i) throws SQLException
i - Ordinal of column (1-based, per JDBC)SQLExceptionCopyright © 2012–2018 The Apache Software Foundation. All rights reserved.