Package org.mariadb.jdbc.client.result
Class CompleteResult
java.lang.Object
org.mariadb.jdbc.client.result.Result
org.mariadb.jdbc.client.result.CompleteResult
- All Implemented Interfaces:
AutoCloseable
,ResultSet
,Wrapper
,Completion
,ServerMessage
- Direct Known Subclasses:
UpdatableResult
-
Field Summary
FieldsFields inherited from class org.mariadb.jdbc.client.result.Result
closed, context, data, dataSize, exceptionFactory, loaded, maxRows, metadataList, outputParameter, reader, resultSetType, row, rowPointer, statement
Fields inherited from interface java.sql.ResultSet
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 Summary
ConstructorsConstructorDescriptionCompleteResult
(ColumnDefinitionPacket[] metadataList, byte[][] data, Context context) CompleteResult
(Statement stmt, boolean binaryProtocol, long maxRows, ColumnDefinitionPacket[] metadataList, PacketReader reader, Context context, int resultSetType, boolean closeOnCompletion, boolean traceEnable) -
Method Summary
Modifier and TypeMethodDescriptionboolean
absolute
(int idx) void
void
void
static ResultSet
createResultSet
(String[] columnNames, DataType[] columnTypes, String[][] data, Context context) Create a result set from given data.static ResultSet
createResultSet
(String columnName, DataType columnType, String[][] data, Context context) void
boolean
first()
int
int
getRow()
boolean
boolean
isFirst()
boolean
isLast()
boolean
last()
boolean
next()
boolean
previous()
boolean
relative
(int rows) void
setFetchSize
(int rows) boolean
Methods inherited from class org.mariadb.jdbc.client.result.Result
abort, addRowData, cancelRowUpdates, checkClose, checkNotForwardOnly, clearWarnings, close, deleteRow, findColumn, getArray, getArray, getAsciiStream, getAsciiStream, getBigDecimal, getBigDecimal, getBigDecimal, getBigDecimal, getBigInteger, getBigInteger, getBinaryStream, getBinaryStream, getBlob, getBlob, getBoolean, getBoolean, getByte, getByte, getBytes, getBytes, getCharacterStream, getCharacterStream, getClob, getClob, getConcurrency, getCurrentRowData, getCursorName, getDate, getDate, getDate, getDate, getDouble, getDouble, getFetchDirection, 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, getType, getUnicodeStream, getUnicodeStream, getURL, getURL, getWarnings, insertRow, isBeforeFirst, isClosed, isOutputParameter, isWrapperFor, loaded, moveToCurrentRow, moveToInsertRow, readNext, refreshRow, rowDeleted, rowInserted, rowUpdated, setFetchDirection, setStatement, skipRemaining, 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, updateObject, updateObject, updateObject, updateObject, updateRef, updateRef, updateRow, updateRowData, updateRowId, updateRowId, updateShort, updateShort, updateSQLXML, updateSQLXML, updateString, updateString, updateTime, updateTime, updateTimestamp, updateTimestamp, useAliasAsName, wasNull
-
Field Details
-
BEFORE_FIRST_POS
protected static final int BEFORE_FIRST_POS- See Also:
-
-
Constructor Details
-
CompleteResult
public CompleteResult(Statement stmt, boolean binaryProtocol, long maxRows, ColumnDefinitionPacket[] metadataList, PacketReader reader, Context context, int resultSetType, boolean closeOnCompletion, boolean traceEnable) throws IOException, SQLException - Throws:
IOException
SQLException
-
CompleteResult
-
-
Method Details
-
createResultSet
-
createResultSet
public static ResultSet createResultSet(String[] columnNames, DataType[] columnTypes, String[][] data, Context context) Create a result set from given data. Useful for creating "fake" resultSets for DatabaseMetaData, (one example is MariaDbDatabaseMetaData.getTypeInfo())- Parameters:
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 MariaDB text protocol, except boolean (BIT(1)) values that are represented as "1" or "0" stringscontext
- connection context- Returns:
- resultset
-
next
- Specified by:
next
in interfaceResultSet
- Specified by:
next
in classResult
- Throws:
SQLException
-
streaming
public boolean streaming() -
fetchRemaining
public void fetchRemaining()- Specified by:
fetchRemaining
in classResult
-
closeFromStmtClose
- Overrides:
closeFromStmtClose
in classResult
-
isAfterLast
- Specified by:
isAfterLast
in interfaceResultSet
- Specified by:
isAfterLast
in classResult
- Throws:
SQLException
-
isFirst
- Specified by:
isFirst
in interfaceResultSet
- Specified by:
isFirst
in classResult
- Throws:
SQLException
-
isLast
- Specified by:
isLast
in interfaceResultSet
- Specified by:
isLast
in classResult
- Throws:
SQLException
-
beforeFirst
- Specified by:
beforeFirst
in interfaceResultSet
- Specified by:
beforeFirst
in classResult
- Throws:
SQLException
-
afterLast
- Specified by:
afterLast
in interfaceResultSet
- Specified by:
afterLast
in classResult
- Throws:
SQLException
-
first
- Specified by:
first
in interfaceResultSet
- Specified by:
first
in classResult
- Throws:
SQLException
-
last
- Specified by:
last
in interfaceResultSet
- Specified by:
last
in classResult
- Throws:
SQLException
-
getRow
- Specified by:
getRow
in interfaceResultSet
- Specified by:
getRow
in classResult
- Throws:
SQLException
-
absolute
- Specified by:
absolute
in interfaceResultSet
- Specified by:
absolute
in classResult
- Throws:
SQLException
-
relative
- Specified by:
relative
in interfaceResultSet
- Specified by:
relative
in classResult
- Throws:
SQLException
-
previous
- Specified by:
previous
in interfaceResultSet
- Specified by:
previous
in classResult
- Throws:
SQLException
-
getFetchSize
- Throws:
SQLException
-
setFetchSize
- Throws:
SQLException
-