public class NativeResultset extends java.lang.Object implements Resultset
Resultset.Concurrency, Resultset.Type| Modifier and Type | Field and Description |
|---|---|
protected ColumnDefinition |
columnDefinition
The metadata for this result set
|
protected Resultset |
nextResultset |
protected int |
resultId
The id (used when profiling) to identify us
|
protected ResultsetRows |
rowData
The actual rows
|
protected java.lang.String |
serverInfo
Any info message from the server that was created while generating this result set (if 'info parsing' is enabled for the connection).
|
protected Row |
thisRow
Pointer to current row data
|
protected long |
updateCount
How many rows were affected by UPDATE/INSERT/DELETE?
|
protected long |
updateId
Value generated for AUTO_INCREMENT columns
|
| Constructor and Description |
|---|
NativeResultset() |
NativeResultset(OkPacket ok)
Create a result set for an executeUpdate statement.
|
NativeResultset(ResultsetRows rows) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearNextResultset()
We can't do this ourselves, otherwise the contract for
Statement.getMoreResults() won't work correctly.
|
ColumnDefinition |
getColumnDefinition() |
Resultset |
getNextResultset()
Returns the next ResultSet in a multi-resultset "chain", if any,
null if none exists.
|
int |
getResultId()
The id (used when profiling) to identify us
|
ResultsetRows |
getRows() |
java.lang.String |
getServerInfo()
Returns the server informational message returned from a DDL or DML
statement (if any), or null if none.
|
long |
getUpdateCount()
Returns the update count for this result set (if one exists), otherwise
-1.
|
long |
getUpdateID()
Returns the AUTO_INCREMENT value for the DDL/DML statement which created
this result set.
|
boolean |
hasRows()
Does the result set contain rows, or is it the result of a DDL or DML statement?
|
void |
initRowsWithMetadata()
Set metadata of this Resultset to ResultsetRows it contains.
|
void |
setColumnDefinition(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).
|
void |
setNextResultset(Resultset nextResultset) |
protected ColumnDefinition columnDefinition
protected ResultsetRows rowData
protected Resultset nextResultset
protected int resultId
protected long updateCount
protected long updateId
protected java.lang.String serverInfo
protected Row thisRow
public NativeResultset()
public NativeResultset(OkPacket ok)
ok - OkPacketpublic NativeResultset(ResultsetRows rows)
public void setColumnDefinition(ColumnDefinition metadata)
ResultsetsetColumnDefinition in interface Resultsetmetadata - field-level metadata for the result setpublic ColumnDefinition getColumnDefinition()
getColumnDefinition in interface Resultsetpublic boolean hasRows()
Resultsetpublic int getResultId()
ResultsetgetResultId in interface Resultsetpublic void initRowsWithMetadata()
ResultsetinitRowsWithMetadata in interface Resultsetpublic void setNextResultset(Resultset nextResultset)
setNextResultset in interface ResultsetnextResultset - Sets the next result set in the result set chain for multiple result sets.public Resultset getNextResultset()
ResultsetgetNextResultset in interface Resultsetpublic void clearNextResultset()
clearNextResultset in interface Resultsetpublic long getUpdateCount()
ResultsetgetUpdateCount in interface Resultsetpublic long getUpdateID()
ResultsetgetUpdateID in interface Resultsetpublic java.lang.String getServerInfo()
ResultsetgetServerInfo in interface Resultsetpublic ResultsetRows getRows()