Package com.mysql.cj.protocol
Interface Resultset
- All Superinterfaces:
ProtocolEntity
- All Known Subinterfaces:
ResultSetInternalMethods
- All Known Implementing Classes:
NativeResultset,ResultSetImpl,UpdatableResultSet
public interface Resultset extends ProtocolEntity
Represents protocol specific result set,
eg., for native protocol, a ProtocolText::Resultset or ProtocolBinary::Resultset entity.
See:
http://dev.mysql.com/doc/internals/en/com-query-response.html#packet-ProtocolText::Resultset
http://dev.mysql.com/doc/internals/en/binary-protocol-resultset.html
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classResultset.Concurrencystatic classResultset.Type -
Method Summary
Modifier and Type Method Description voidclearNextResultset()Clears the reference to the next result set in a multi-result set "chain".ColumnDefinitiongetColumnDefinition()ResultsetgetNextResultset()Returns the next ResultSet in a multi-resultset "chain", if any, null if none exists.intgetResultId()The id (used when profiling) to identify usResultsetRowsgetRows()java.lang.StringgetServerInfo()Returns the server informational message returned from a DDL or DML statement (if any), or null if none.longgetUpdateCount()Returns the update count for this result set (if one exists), otherwise -1.longgetUpdateID()Returns the AUTO_INCREMENT value for the DDL/DML statement which created this result set.booleanhasRows()Does the result set contain rows, or is it the result of a DDL or DML statement?voidinitRowsWithMetadata()Set metadata of this Resultset to ResultsetRows it contains.voidsetColumnDefinition(ColumnDefinition metadata)Sometimes the driver doesn't have metadata before consuming the result set rows (because it's cached), or need to coerce the metadata returned by queries into that required by the particular specification (eg metadata returned by metadata queries into that required by the JDBC specification).voidsetNextResultset(Resultset nextResultset)
-
Method Details
-
setColumnDefinition
Sometimes the driver doesn't have metadata before consuming the result set rows (because it's cached), or need to coerce the metadata returned by queries into that required by the particular specification (eg metadata returned by metadata queries into that required by the JDBC specification). So it can call this to set it after the fact.- Parameters:
metadata- field-level metadata for the result set
-
getColumnDefinition
ColumnDefinition getColumnDefinition() -
hasRows
boolean hasRows()Does the result set contain rows, or is it the result of a DDL or DML statement?- Returns:
- true if result set contains rows
-
getRows
ResultsetRows getRows() -
initRowsWithMetadata
void initRowsWithMetadata()Set metadata of this Resultset to ResultsetRows it contains. -
getResultId
int getResultId()The id (used when profiling) to identify us- Returns:
- result id
-
setNextResultset
- Parameters:
nextResultset- Sets the next result set in the result set chain for multiple result sets.
-
getNextResultset
Resultset getNextResultset()Returns the next ResultSet in a multi-resultset "chain", if any, null if none exists.- Returns:
- the next Resultset
-
clearNextResultset
void clearNextResultset()Clears the reference to the next result set in a multi-result set "chain". -
getUpdateCount
long getUpdateCount()Returns the update count for this result set (if one exists), otherwise -1.- Returns:
- return the update count for this result set (if one exists), otherwise -1.
-
getUpdateID
long getUpdateID()Returns the AUTO_INCREMENT value for the DDL/DML statement which created this result set.- Returns:
- the AUTO_INCREMENT value for the DDL/DML statement which created this result set.
-
getServerInfo
java.lang.String getServerInfo()Returns the server informational message returned from a DDL or DML statement (if any), or null if none.- Returns:
- the server informational message
-