public class ClickHouseResultSet extends AbstractResultSet
| Modifier and Type | Field and Description |
|---|---|
protected ByteFragment |
nextLine |
protected int |
rowNumber |
protected ByteFragment[] |
values |
CLOSE_CURSORS_AT_COMMIT, CONCUR_READ_ONLY, CONCUR_UPDATABLE, FETCH_FORWARD, FETCH_REVERSE, FETCH_UNKNOWN, HOLD_CURSORS_OVER_COMMIT, TYPE_FORWARD_ONLY, TYPE_SCROLL_INSENSITIVE, TYPE_SCROLL_SENSITIVE| Constructor and Description |
|---|
ClickHouseResultSet(InputStream is,
int bufferSize,
String db,
String table,
boolean usesWithTotals,
ClickHouseStatement statement,
TimeZone timeZone,
ClickHouseProperties properties) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
int |
findColumn(String column) |
Array |
getArray(int columnIndex) |
Array |
getArray(String column) |
BigDecimal |
getBigDecimal(int columnIndex) |
BigDecimal |
getBigDecimal(int columnIndex,
int scale) |
BigDecimal |
getBigDecimal(String columnLabel) |
BigDecimal |
getBigDecimal(String columnLabel,
int scale) |
BigInteger |
getBigInteger(int columnIndex) |
BigInteger |
getBigInteger(String columnLabel) |
boolean |
getBoolean(int colNum) |
boolean |
getBoolean(String column) |
byte |
getByte(int colNum) |
byte |
getByte(String column) |
byte[] |
getBytes(int colNum) |
byte[] |
getBytes(String column) |
String[] |
getColumnNames() |
Date |
getDate(int columnIndex) |
Date |
getDate(int columnIndex,
Calendar calendar) |
Date |
getDate(String columnLabel) |
String |
getDb() |
double |
getDouble(int columnIndex) |
double |
getDouble(String columnLabel) |
float |
getFloat(int columnIndex) |
float |
getFloat(String columnLabel) |
int |
getInt(int colNum) |
int |
getInt(String column) |
long |
getLong(int colNum) |
long |
getLong(String column) |
long[] |
getLongArray(int colNum)
Deprecated.
prefer to use regular JDBC API
|
long[] |
getLongArray(String column)
Parse the value in current row at column with label
column as an array
of long |
ResultSetMetaData |
getMetaData() |
Object |
getObject(int columnIndex) |
<T> T |
getObject(int columnIndex,
Class<T> type) |
Object |
getObject(String columnLabel) |
<T> T |
getObject(String columnLabel,
Class<T> type) |
int |
getRow() |
short |
getShort(int colNum) |
short |
getShort(String column) |
Statement |
getStatement() |
String |
getString(int colNum) |
String |
getString(String column) |
String |
getTable() |
Time |
getTime(int columnIndex) |
Time |
getTime(int columnIndex,
Calendar calendar) |
Time |
getTime(String columnLabel) |
Timestamp |
getTimestamp(int columnIndex) |
Timestamp |
getTimestamp(int columnIndex,
Calendar cal) |
Timestamp |
getTimestamp(String column) |
Timestamp |
getTimestamp(String column,
Calendar cal) |
Long |
getTimestampAsLong(int colNum)
Deprecated.
prefer to use regular JDBC API methods, e.g.
getTimestamp(int) or getObject(int, Class)
using Instant |
Long |
getTimestampAsLong(int colNum,
TimeZone timeZone)
Deprecated.
prefer to use regular JDBC API method
|
void |
getTotals() |
int |
getType() |
ByteFragment[] |
getValues()
Deprecated.
prefer to use regular JDBC API to retrieve the results
|
protected boolean |
hasNext()
Check if there is another row.
|
boolean |
isAfterLast() |
boolean |
isBeforeFirst() |
boolean |
isClosed() |
boolean |
isFirst() |
boolean |
isLast() |
boolean |
next() |
void |
setFetchDirection(int direction) |
void |
setFetchSize(int rows) |
void |
setMaxRows(int maxRows) |
String |
toString() |
boolean |
wasNull() |
absolute, afterLast, beforeFirst, cancelRowUpdates, clearWarnings, deleteRow, first, getAsciiStream, getAsciiStream, getBinaryStream, getBinaryStream, getBlob, getBlob, getCharacterStream, getCharacterStream, getClob, getClob, getConcurrency, getCursorName, getDate, getFetchDirection, getFetchSize, getHoldability, getNCharacterStream, getNCharacterStream, getNClob, getNClob, getNString, getNString, getObject, getObject, getRef, getRef, getRowId, getRowId, getSQLXML, getSQLXML, getTime, getUnicodeStream, getUnicodeStream, getURL, getURL, getWarnings, insertRow, isWrapperFor, last, moveToCurrentRow, moveToInsertRow, previous, refreshRow, relative, rowDeleted, rowInserted, rowUpdated, unwrap, updateArray, updateArray, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateBigDecimal, updateBigDecimal, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBlob, updateBlob, updateBlob, updateBlob, updateBlob, updateBlob, updateBoolean, updateBoolean, updateByte, updateByte, updateBytes, updateBytes, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateClob, updateClob, updateClob, updateClob, updateClob, updateClob, updateDate, updateDate, updateDouble, updateDouble, updateFloat, updateFloat, updateInt, updateInt, updateLong, updateLong, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNString, updateNString, updateNull, updateNull, updateObject, updateObject, updateObject, updateObject, updateRef, updateRef, updateRow, updateRowId, updateRowId, updateShort, updateShort, updateSQLXML, updateSQLXML, updateString, updateString, updateTime, updateTime, updateTimestamp, updateTimestampclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitupdateObject, updateObject, updateObject, updateObjectprotected ByteFragment[] values
protected ByteFragment nextLine
protected int rowNumber
public ClickHouseResultSet(InputStream is, int bufferSize, String db, String table, boolean usesWithTotals, ClickHouseStatement statement, TimeZone timeZone, ClickHouseProperties properties) throws IOException
IOExceptionprotected boolean hasNext()
throws SQLException
true if this result set has another row after the current
cursor position, false elseSQLException - if something goes wrongpublic boolean isBeforeFirst()
throws SQLException
isBeforeFirst in interface ResultSetisBeforeFirst in class AbstractResultSetSQLExceptionpublic boolean isAfterLast()
throws SQLException
isAfterLast in interface ResultSetisAfterLast in class AbstractResultSetSQLExceptionpublic boolean isFirst()
throws SQLException
isFirst in interface ResultSetisFirst in class AbstractResultSetSQLExceptionpublic boolean isLast()
throws SQLException
isLast in interface ResultSetisLast in class AbstractResultSetSQLExceptionpublic boolean next()
throws SQLException
next in interface ResultSetnext in class AbstractResultSetSQLExceptionpublic void close()
throws SQLException
close in interface AutoCloseableclose in interface ResultSetclose in class AbstractResultSetSQLExceptionpublic boolean isClosed()
throws SQLException
isClosed in interface ResultSetisClosed in class AbstractResultSetSQLExceptionpublic void getTotals()
throws SQLException
SQLExceptionpublic ResultSetMetaData getMetaData() throws SQLException
getMetaData in interface ResultSetgetMetaData in class AbstractResultSetSQLExceptionpublic boolean wasNull()
throws SQLException
wasNull in interface ResultSetwasNull in class AbstractResultSetSQLExceptionpublic int getInt(String column) throws SQLException
getInt in interface ResultSetgetInt in class AbstractResultSetSQLExceptionpublic boolean getBoolean(String column) throws SQLException
getBoolean in interface ResultSetgetBoolean in class AbstractResultSetSQLExceptionpublic long getLong(String column) throws SQLException
getLong in interface ResultSetgetLong in class AbstractResultSetSQLExceptionpublic String getString(String column) throws SQLException
getString in interface ResultSetgetString in class AbstractResultSetSQLExceptionpublic byte[] getBytes(String column) throws SQLException
getBytes in interface ResultSetgetBytes in class AbstractResultSetSQLExceptionpublic Timestamp getTimestamp(String column) throws SQLException
getTimestamp in interface ResultSetgetTimestamp in class AbstractResultSetSQLExceptionpublic Timestamp getTimestamp(int columnIndex) throws SQLException
getTimestamp in interface ResultSetgetTimestamp in class AbstractResultSetSQLExceptionpublic Timestamp getTimestamp(String column, Calendar cal) throws SQLException
getTimestamp in interface ResultSetgetTimestamp in class AbstractResultSetSQLExceptionpublic Timestamp getTimestamp(int columnIndex, Calendar cal) throws SQLException
getTimestamp in interface ResultSetgetTimestamp in class AbstractResultSetSQLExceptionpublic short getShort(String column) throws SQLException
getShort in interface ResultSetgetShort in class AbstractResultSetSQLExceptionpublic byte getByte(String column) throws SQLException
getByte in interface ResultSetgetByte in class AbstractResultSetSQLExceptionpublic long[] getLongArray(String column) throws SQLException
AbstractResultSetcolumn as an array
of longgetLongArray in class AbstractResultSetcolumn - the label, name, alias of the columnSQLException - if the value cannot be interpreted as long[]public Array getArray(int columnIndex) throws SQLException
getArray in interface ResultSetgetArray in class AbstractResultSetSQLExceptionpublic Array getArray(String column) throws SQLException
getArray in interface ResultSetgetArray in class AbstractResultSetSQLExceptionpublic double getDouble(String columnLabel) throws SQLException
getDouble in interface ResultSetgetDouble in class AbstractResultSetSQLExceptionpublic float getFloat(String columnLabel) throws SQLException
getFloat in interface ResultSetgetFloat in class AbstractResultSetSQLExceptionpublic Date getDate(String columnLabel) throws SQLException
getDate in interface ResultSetgetDate in class AbstractResultSetSQLExceptionpublic Time getTime(String columnLabel) throws SQLException
getTime in interface ResultSetgetTime in class AbstractResultSetSQLExceptionpublic Object getObject(String columnLabel) throws SQLException
getObject in interface ResultSetgetObject in class AbstractResultSetSQLExceptionpublic String getString(int colNum) throws SQLException
getString in interface ResultSetgetString in class AbstractResultSetSQLExceptionpublic int getInt(int colNum)
throws SQLException
getInt in interface ResultSetgetInt in class AbstractResultSetSQLExceptionpublic boolean getBoolean(int colNum)
throws SQLException
getBoolean in interface ResultSetgetBoolean in class AbstractResultSetSQLExceptionpublic long getLong(int colNum)
throws SQLException
getLong in interface ResultSetgetLong in class AbstractResultSetSQLExceptionpublic byte[] getBytes(int colNum)
getBytes in interface ResultSetgetBytes in class AbstractResultSet@Deprecated public Long getTimestampAsLong(int colNum)
getTimestamp(int) or getObject(int, Class)
using InstantcolNum - column number@Deprecated public Long getTimestampAsLong(int colNum, TimeZone timeZone)
colNum - the column numbertimeZone - time zone to use when parsing date / date time valuespublic short getShort(int colNum)
throws SQLException
getShort in interface ResultSetgetShort in class AbstractResultSetSQLExceptionpublic byte getByte(int colNum)
getByte in interface ResultSetgetByte in class AbstractResultSet@Deprecated public long[] getLongArray(int colNum) throws SQLException
colNum as an array
of longcolNum - column numberSQLException - if the value cannot be interpreted as long[]public float getFloat(int columnIndex)
throws SQLException
getFloat in interface ResultSetgetFloat in class AbstractResultSetSQLExceptionpublic double getDouble(int columnIndex)
throws SQLException
getDouble in interface ResultSetgetDouble in class AbstractResultSetSQLExceptionpublic Statement getStatement()
getStatement in interface ResultSetgetStatement in class AbstractResultSetpublic Date getDate(int columnIndex) throws SQLException
getDate in interface ResultSetgetDate in class AbstractResultSetSQLExceptionpublic Date getDate(int columnIndex, Calendar calendar) throws SQLException
getDate in interface ResultSetgetDate in class AbstractResultSetSQLExceptionpublic Time getTime(int columnIndex) throws SQLException
getTime in interface ResultSetgetTime in class AbstractResultSetSQLExceptionpublic Time getTime(int columnIndex, Calendar calendar) throws SQLException
getTime in interface ResultSetgetTime in class AbstractResultSetSQLExceptionpublic Object getObject(int columnIndex) throws SQLException
getObject in interface ResultSetgetObject in class AbstractResultSetSQLExceptionpublic int getType()
throws SQLException
getType in interface ResultSetgetType in class AbstractResultSetSQLExceptionpublic int getRow()
throws SQLException
SQLExceptionpublic String getDb()
public String getTable()
public void setMaxRows(int maxRows)
public int findColumn(String column) throws SQLException
findColumn in interface ResultSetfindColumn in class AbstractResultSetSQLExceptionpublic <T> T getObject(int columnIndex,
Class<T> type)
throws SQLException
SQLExceptionpublic <T> T getObject(String columnLabel, Class<T> type) throws SQLException
SQLException@Deprecated public ByteFragment[] getValues()
ByteFragmentspublic BigDecimal getBigDecimal(String columnLabel) throws SQLException
getBigDecimal in interface ResultSetgetBigDecimal in class AbstractResultSetSQLExceptionpublic BigDecimal getBigDecimal(int columnIndex) throws SQLException
getBigDecimal in interface ResultSetgetBigDecimal in class AbstractResultSetSQLExceptionpublic BigDecimal getBigDecimal(String columnLabel, int scale) throws SQLException
getBigDecimal in interface ResultSetgetBigDecimal in class AbstractResultSetSQLExceptionpublic BigDecimal getBigDecimal(int columnIndex, int scale) throws SQLException
getBigDecimal in interface ResultSetgetBigDecimal in class AbstractResultSetSQLExceptionpublic BigInteger getBigInteger(String columnLabel) throws SQLException
SQLExceptionpublic BigInteger getBigInteger(int columnIndex) throws SQLException
SQLExceptionpublic String[] getColumnNames()
public void setFetchDirection(int direction)
throws SQLException
setFetchDirection in interface ResultSetsetFetchDirection in class AbstractResultSetSQLExceptionpublic void setFetchSize(int rows)
throws SQLException
setFetchSize in interface ResultSetsetFetchSize in class AbstractResultSetSQLExceptionCopyright © 2015–2021 ClickHouse. All rights reserved.