| Modifier and Type | Field and Description |
|---|---|
private static String |
BIGDECIMAL_CLASS_NAME |
private static String |
DATE_CLASS_NAME |
private int |
defaultPrecision |
private int |
defaultScale |
private static String |
DOUBLE_CLASS_NAME |
private static String |
FLOAT_CLASS_NAME |
private static String |
INT_CLASS_NAME |
private static int |
JDBC_DEFAULT_PRECISION_VALUE |
private static int |
JDBC_DEFAULT_SCALE_VALUE |
private static org.slf4j.Logger |
logger |
private static String |
LONG_CLASS_NAME |
private boolean |
moreRows |
private ResultSet |
rs |
private Set<String> |
rsColumnNames |
private RecordSchema |
schema |
private static String |
STRING_CLASS_NAME |
| Constructor and Description |
|---|
ResultSetRecordSet(ResultSet rs,
RecordSchema readerSchema) |
ResultSetRecordSet(ResultSet rs,
RecordSchema readerSchema,
int defaultPrecision,
int defaultScale) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected Record |
createRecord(ResultSet rs) |
private RecordSchema |
createSchema(ResultSet rs,
RecordSchema readerSchema) |
private static DataType |
getArrayBaseType(Array array) |
private DataType |
getDataType(int sqlType,
ResultSet rs,
int columnIndex,
RecordSchema readerSchema) |
private static RecordFieldType |
getFieldType(int sqlType,
String valueClassName) |
protected ResultSet |
getResultSet() |
RecordSchema |
getSchema() |
protected boolean |
hasMoreRows() |
Record |
next() |
private Object |
normalizeValue(Object value) |
protected void |
setMoreRows(boolean moreRows) |
private static final org.slf4j.Logger logger
private static final int JDBC_DEFAULT_PRECISION_VALUE
private static final int JDBC_DEFAULT_SCALE_VALUE
private final ResultSet rs
private final RecordSchema schema
private final int defaultPrecision
private final int defaultScale
private boolean moreRows
private static final String STRING_CLASS_NAME
private static final String INT_CLASS_NAME
private static final String LONG_CLASS_NAME
private static final String DATE_CLASS_NAME
private static final String DOUBLE_CLASS_NAME
private static final String FLOAT_CLASS_NAME
private static final String BIGDECIMAL_CLASS_NAME
public ResultSetRecordSet(ResultSet rs, RecordSchema readerSchema) throws SQLException
SQLExceptionpublic ResultSetRecordSet(ResultSet rs, RecordSchema readerSchema, int defaultPrecision, int defaultScale) throws SQLException
SQLExceptionpublic RecordSchema getSchema()
getSchema in interface RecordSetRecordSchema that applies to the records in this RecordSetprotected ResultSet getResultSet()
protected boolean hasMoreRows()
protected void setMoreRows(boolean moreRows)
public Record next() throws IOException
next in interface RecordSetRecord in the set or null if there are no more recordsIOExceptionpublic void close()
close in interface Closeableclose in interface AutoCloseableprotected Record createRecord(ResultSet rs) throws SQLException
SQLExceptionprivate Object normalizeValue(Object value) throws SQLException
SQLExceptionprivate RecordSchema createSchema(ResultSet rs, RecordSchema readerSchema) throws SQLException
SQLExceptionprivate DataType getDataType(int sqlType, ResultSet rs, int columnIndex, RecordSchema readerSchema) throws SQLException
SQLExceptionprivate static DataType getArrayBaseType(Array array) throws SQLException
SQLExceptionprivate static RecordFieldType getFieldType(int sqlType, String valueClassName)
Copyright © 2021 Apache NiFi Project. All rights reserved.