public class MariaSelectResultSet extends AbstractSelectResultSet
Modifier and Type | Field and Description |
---|---|
boolean |
callableResult |
protected int |
columnInformationLength |
static MariaSelectResultSet |
EMPTY |
protected int |
fetchSize |
protected MariaSelectResultSet |
moreResult |
protected List<ValueObject[]> |
resultSet |
protected int |
resultSetScrollType |
cal, columnNameMap, columnsInformation, isClosed, lastGetWasNull, options, protocol, rowPointer, statement
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 |
---|
MariaSelectResultSet(ColumnInformation[] columnInformation,
List<ValueObject[]> resultSet,
Protocol protocol,
int resultSetScrollType)
Create filled resultset.
|
MariaSelectResultSet(ColumnInformation[] columnInformation,
Statement statement,
Protocol protocol,
ReadPacketFetcher fetcher,
boolean binaryProtocol,
int resultSetScrollType,
int fetchSize,
boolean callableResult)
Create Streaming resultset.
|
Modifier and Type | Method and Description |
---|---|
boolean |
absolute(int row) |
void |
afterLast() |
void |
beforeFirst() |
void |
clearWarnings() |
void |
close()
Close resultset.
|
static ResultSet |
createGeneratedData(long[] data,
Protocol protocol,
boolean findColumnReturnsOne)
Create a result set from given data.
|
static MariaSelectResultSet |
createResult(Statement statement,
ResultSetPacket packet,
ReadPacketFetcher packetFetcher,
Protocol protocol,
boolean binaryProtocol,
int resultSetScrollType,
int fetchSize,
boolean canBeCallableResult)
Create streaming resultset.
|
static ResultSet |
createResultSet(String[] columnNames,
MariaDbType[] columnTypes,
String[][] data,
Protocol protocol)
Create a result set from given data.
|
boolean |
first() |
int |
getConcurrency() |
int |
getFetchDirection() |
int |
getFetchSize() |
MariaSelectResultSet |
getMoreResult() |
int |
getRow() |
int |
getType() |
protected ValueObject |
getValueObject(int position) |
SQLWarning |
getWarnings() |
void |
initFetch()
Initialize and fetch first value.
|
boolean |
isAfterLast() |
boolean |
isBeforeFirst() |
boolean |
isBinaryProtocol() |
boolean |
isCallableResult() |
boolean |
isFirst() |
boolean |
isLast() |
boolean |
last() |
boolean |
next() |
boolean |
previous() |
boolean |
readNextValue(List<ValueObject[]> values)
Read next value.
|
boolean |
relative(int rows) |
void |
setCallableResult(boolean callableResult) |
void |
setFetchDirection(int direction) |
void |
setFetchSize(int fetchSize) |
void |
setMoreResult(MariaSelectResultSet moreResult) |
cancelRowUpdates, deleteRow, findColumn, getArray, getArray, getAsciiStream, getAsciiStream, getBigDecimal, getBigDecimal, getBigDecimal, getBigDecimal, getBinaryStream, getBinaryStream, getBlob, getBlob, getBoolean, getBoolean, getByte, getByte, getBytes, getBytes, getCharacterStream, getCharacterStream, getClob, getClob, getCursorName, getDate, getDate, getDate, getDate, getDouble, getDouble, getFloat, getFloat, getHoldability, getInt, getInt, getLong, getLong, getMetaData, getNCharacterStream, getNCharacterStream, getNClob, getNClob, getNString, getNString, getObject, getObject, getObject, getObject, getObject, getObject, getRef, getRef, getRowId, getRowId, getShort, getShort, getSQLXML, getSQLXML, getStatement, getString, getString, getTime, getTime, getTime, getTime, getTimestamp, getTimestamp, getTimestamp, getTimestamp, getUnicodeStream, getUnicodeStream, getURL, getURL, insertRow, isClosed, isWrapperFor, moveToCurrentRow, moveToInsertRow, refreshRow, rowDeleted, rowInserted, rowUpdated, setReturnTableAlias, setStatement, 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, updateTimestamp, wasNull
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
updateObject, updateObject, updateObject, updateObject
public static final MariaSelectResultSet EMPTY
protected int columnInformationLength
protected List<ValueObject[]> resultSet
protected int fetchSize
protected int resultSetScrollType
protected MariaSelectResultSet moreResult
public boolean callableResult
public MariaSelectResultSet(ColumnInformation[] columnInformation, Statement statement, Protocol protocol, ReadPacketFetcher fetcher, boolean binaryProtocol, int resultSetScrollType, int fetchSize, boolean callableResult)
columnInformation
- column informationstatement
- statementprotocol
- current protocolfetcher
- stream fetcherbinaryProtocol
- is binary protocol ?resultSetScrollType
- one of the following ResultSet
constants: ResultSet.TYPE_FORWARD_ONLY
,
ResultSet.TYPE_SCROLL_INSENSITIVE
, or ResultSet.TYPE_SCROLL_SENSITIVE
fetchSize
- current fetch sizecallableResult
- is it a callableResultpublic MariaSelectResultSet(ColumnInformation[] columnInformation, List<ValueObject[]> resultSet, Protocol protocol, int resultSetScrollType)
columnInformation
- column informationresultSet
- resultsetprotocol
- current protocolresultSetScrollType
- one of the following ResultSet
constants: ResultSet.TYPE_FORWARD_ONLY
,
ResultSet.TYPE_SCROLL_INSENSITIVE
, or ResultSet.TYPE_SCROLL_SENSITIVE
public static ResultSet createGeneratedData(long[] data, Protocol protocol, boolean findColumnReturnsOne)
data
- - each element of this array represents a complete row in the ResultSet. Each value is given in its string representation, as in
MySQL text protocol, except boolean (BIT(1)) values that are represented as "1" or "0" stringsprotocol
- protocolfindColumnReturnsOne
- - special parameter, used only in generated key result setspublic static ResultSet createResultSet(String[] columnNames, MariaDbType[] columnTypes, String[][] data, Protocol protocol)
columnNames
- - string array of column namescolumnTypes
- - column typesdata
- - each element of this array represents a complete row in the ResultSet. Each value is given in its string representation, as in
MySQL text protocol, except boolean (BIT(1)) values that are represented as "1" or "0" stringsprotocol
- protocolpublic static MariaSelectResultSet createResult(Statement statement, ResultSetPacket packet, ReadPacketFetcher packetFetcher, Protocol protocol, boolean binaryProtocol, int resultSetScrollType, int fetchSize, boolean canBeCallableResult) throws IOException, QueryException
statement
- current statementpacket
- the result set stream from the serverpacketFetcher
- packetfetcherprotocol
- current protocolbinaryProtocol
- is the mysql protocol binaryresultSetScrollType
- one of the following ResultSet
constants: ResultSet.TYPE_FORWARD_ONLY
,
ResultSet.TYPE_SCROLL_INSENSITIVE
, or ResultSet.TYPE_SCROLL_SENSITIVE
fetchSize
- current fetch sizecanBeCallableResult
- is this resultset can be an callable output result ? (permit to avoid read the oef ok packet)IOException
- when something goes wrong while reading/writing from the serverQueryException
- if there is an actual active result on the current connectionpublic void initFetch() throws IOException, QueryException
IOException
- exceptionQueryException
- exceptionpublic boolean isBinaryProtocol()
isBinaryProtocol
in class AbstractSelectResultSet
public boolean readNextValue(List<ValueObject[]> values) throws IOException, QueryException
values
- valuesIOException
- exceptionQueryException
- exceptionpublic void close() throws SQLException
close
in interface AutoCloseable
close
in interface ResultSet
close
in class AbstractSelectResultSet
SQLException
public boolean next() throws SQLException
next
in interface ResultSet
next
in class AbstractSelectResultSet
SQLException
protected ValueObject getValueObject(int position) throws SQLException
getValueObject
in class AbstractSelectResultSet
SQLException
public SQLWarning getWarnings() throws SQLException
getWarnings
in interface ResultSet
getWarnings
in class AbstractSelectResultSet
SQLException
public void clearWarnings() throws SQLException
clearWarnings
in interface ResultSet
clearWarnings
in class AbstractSelectResultSet
SQLException
public boolean isBeforeFirst() throws SQLException
isBeforeFirst
in interface ResultSet
isBeforeFirst
in class AbstractSelectResultSet
SQLException
public boolean isAfterLast() throws SQLException
isAfterLast
in interface ResultSet
isAfterLast
in class AbstractSelectResultSet
SQLException
public boolean isFirst() throws SQLException
isFirst
in interface ResultSet
isFirst
in class AbstractSelectResultSet
SQLException
public boolean isLast() throws SQLException
isLast
in interface ResultSet
isLast
in class AbstractSelectResultSet
SQLException
public void beforeFirst() throws SQLException
beforeFirst
in interface ResultSet
beforeFirst
in class AbstractSelectResultSet
SQLException
public void afterLast() throws SQLException
afterLast
in interface ResultSet
afterLast
in class AbstractSelectResultSet
SQLException
public boolean first() throws SQLException
first
in interface ResultSet
first
in class AbstractSelectResultSet
SQLException
public boolean last() throws SQLException
last
in interface ResultSet
last
in class AbstractSelectResultSet
SQLException
public int getRow() throws SQLException
getRow
in interface ResultSet
getRow
in class AbstractSelectResultSet
SQLException
public boolean absolute(int row) throws SQLException
absolute
in interface ResultSet
absolute
in class AbstractSelectResultSet
SQLException
public boolean relative(int rows) throws SQLException
relative
in interface ResultSet
relative
in class AbstractSelectResultSet
SQLException
public boolean previous() throws SQLException
previous
in interface ResultSet
previous
in class AbstractSelectResultSet
SQLException
public int getFetchDirection() throws SQLException
getFetchDirection
in interface ResultSet
getFetchDirection
in class AbstractSelectResultSet
SQLException
public void setFetchDirection(int direction) throws SQLException
setFetchDirection
in interface ResultSet
setFetchDirection
in class AbstractSelectResultSet
SQLException
public int getFetchSize() throws SQLException
getFetchSize
in interface ResultSet
getFetchSize
in class AbstractSelectResultSet
SQLException
public void setFetchSize(int fetchSize) throws SQLException
setFetchSize
in interface ResultSet
setFetchSize
in class AbstractSelectResultSet
SQLException
public int getType() throws SQLException
getType
in interface ResultSet
getType
in class AbstractSelectResultSet
SQLException
public int getConcurrency() throws SQLException
getConcurrency
in interface ResultSet
getConcurrency
in class AbstractSelectResultSet
SQLException
public MariaSelectResultSet getMoreResult()
public void setMoreResult(MariaSelectResultSet moreResult)
public boolean isCallableResult()
public void setCallableResult(boolean callableResult)
Copyright © 2016. All rights reserved.