Top Fields Constructors Methods
com.mysql.cj.protocol.a.result

public Class NativeResultset

extends Object
implements Resultset
Class Inheritance
All Implemented Interfaces
com.mysql.cj.protocol.Resultset, com.mysql.cj.protocol.ProtocolEntity
Known Direct Subclasses
com.mysql.cj.jdbc.result.ResultSetImpl
Imports
java.util.HashMap, java.util.concurrent.locks.Lock, .ReentrantLock, com.mysql.cj.protocol.ColumnDefinition, .Resultset, .ResultsetRows, com.mysql.cj.result.DefaultColumnDefinition, .Field, .Row

Field Summary

Modifier and TypeField and Description
protected ColumnDefinition
columnDefinition

The metadata for this result set

protected final Lock
protected Resultset
protected int
resultId

The id (used when profiling) to identify us

protected ResultsetRows
rowData

The actual rows

protected 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 Summary

AccessConstructor and Description
public
public
NativeResultset(OkPacket ok)

Create a result set for an executeUpdate statement.

public

Method Summary

Modifier and TypeMethod and Description
public void
clearNextResultset()

Implements com.mysql.cj.protocol.Resultset.clearNextResultset.

Clears the reference to the next result set in a multi-result set "chain".

public ColumnDefinition
public Resultset

Returns:

the nextResultSet, if any, null if none exists.
getNextResultset
()

Implements com.mysql.cj.protocol.Resultset.getNextResultset.

Returns the next ResultSet in a multi-resultset "chain", if any, null if none exists.

public int
getResultId()

Implements com.mysql.cj.protocol.Resultset.getResultId.

The id (used when profiling) to identify us

public ResultsetRows
public String
getServerInfo()

Implements com.mysql.cj.protocol.Resultset.getServerInfo.

Returns the server informational message returned from a DDL or DML statement (if any), or null if none.

public long
getUpdateCount()

Implements com.mysql.cj.protocol.Resultset.getUpdateCount.

Returns the update count for this result set (if one exists), otherwise -1.

public long
getUpdateID()

Implements com.mysql.cj.protocol.Resultset.getUpdateID.

Returns the AUTO_INCREMENT value for the DDL/DML statement which created this result set.

public boolean
hasRows()

Implements com.mysql.cj.protocol.Resultset.hasRows.

Does the result set contain rows, or is it the result of a DDL or DML statement?

public void
initRowsWithMetadata()

Implements com.mysql.cj.protocol.Resultset.initRowsWithMetadata.

Set metadata of this Resultset to ResultsetRows it contains.

public void
setColumnDefinition(ColumnDefinition
field-level metadata for the result set
metadata
)

Implements com.mysql.cj.protocol.Resultset.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).

public void
setNextResultset(Resultset
Sets the next result set in the result set chain for multiple result sets.
nextResultset
)

Implements com.mysql.cj.protocol.Resultset.setNextResultset.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

columnDefinitionback to summary
protected ColumnDefinition columnDefinition

The metadata for this result set

lockback to summary
protected final Lock lock
nextResultsetback to summary
protected Resultset nextResultset
resultIdback to summary
protected int resultId

The id (used when profiling) to identify us

rowDataback to summary
protected ResultsetRows rowData

The actual rows

serverInfoback to summary
protected String serverInfo

Any info message from the server that was created while generating this result set (if 'info parsing' is enabled for the connection).

thisRowback to summary
protected Row thisRow

Pointer to current row data

updateCountback to summary
protected long updateCount

How many rows were affected by UPDATE/INSERT/DELETE?

updateIdback to summary
protected long updateId

Value generated for AUTO_INCREMENT columns

Constructor Detail

NativeResultsetback to summary
public NativeResultset()
NativeResultsetback to summary
public NativeResultset(OkPacket ok)

Create a result set for an executeUpdate statement.

Parameters
ok:OkPacket

OkPacket

NativeResultsetback to summary
public NativeResultset(ResultsetRows rows)

Method Detail

clearNextResultsetback to summary
public void clearNextResultset()

Implements com.mysql.cj.protocol.Resultset.clearNextResultset.

Doc from com.mysql.cj.protocol.Resultset.clearNextResultset.

Clears the reference to the next result set in a multi-result set "chain".

Annotations
@Override
getColumnDefinitionback to summary
public ColumnDefinition getColumnDefinition()

Implements com.mysql.cj.protocol.Resultset.getColumnDefinition.

Annotations
@Override
getNextResultsetback to summary
public Resultset getNextResultset()

Implements com.mysql.cj.protocol.Resultset.getNextResultset.

Doc from com.mysql.cj.protocol.Resultset.getNextResultset.

Returns the next ResultSet in a multi-resultset "chain", if any, null if none exists.

Returns:Resultset

the nextResultSet, if any, null if none exists.

Annotations
@Override
getResultIdback to summary
public int getResultId()

Implements com.mysql.cj.protocol.Resultset.getResultId.

Doc from com.mysql.cj.protocol.Resultset.getResultId.

The id (used when profiling) to identify us

Returns:int

result id

Annotations
@Override
getRowsback to summary
public ResultsetRows getRows()

Implements com.mysql.cj.protocol.Resultset.getRows.

Annotations
@Override
getServerInfoback to summary
public String getServerInfo()

Implements com.mysql.cj.protocol.Resultset.getServerInfo.

Doc from com.mysql.cj.protocol.Resultset.getServerInfo.

Returns the server informational message returned from a DDL or DML statement (if any), or null if none.

Returns:String

the server informational message

Annotations
@Override
getUpdateCountback to summary
public long getUpdateCount()

Implements com.mysql.cj.protocol.Resultset.getUpdateCount.

Doc from com.mysql.cj.protocol.Resultset.getUpdateCount.

Returns the update count for this result set (if one exists), otherwise -1.

Returns:long

return the update count for this result set (if one exists), otherwise -1.

Annotations
@Override
getUpdateIDback to summary
public long getUpdateID()

Implements com.mysql.cj.protocol.Resultset.getUpdateID.

Doc from com.mysql.cj.protocol.Resultset.getUpdateID.

Returns the AUTO_INCREMENT value for the DDL/DML statement which created this result set.

Returns:long

the AUTO_INCREMENT value for the DDL/DML statement which created this result set.

Annotations
@Override
hasRowsback to summary
public boolean hasRows()

Implements com.mysql.cj.protocol.Resultset.hasRows.

Doc from com.mysql.cj.protocol.Resultset.hasRows.

Does the result set contain rows, or is it the result of a DDL or DML statement?

Returns:boolean

true if result set contains rows

Annotations
@Override
initRowsWithMetadataback to summary
public void initRowsWithMetadata()

Implements com.mysql.cj.protocol.Resultset.initRowsWithMetadata.

Doc from com.mysql.cj.protocol.Resultset.initRowsWithMetadata.

Set metadata of this Resultset to ResultsetRows it contains.

Annotations
@Override
setColumnDefinitionback to summary
public void setColumnDefinition(ColumnDefinition metadata)

Implements com.mysql.cj.protocol.Resultset.setColumnDefinition.

Doc from com.mysql.cj.protocol.Resultset.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:ColumnDefinition

field-level metadata for the result set

Annotations
@Override
setNextResultsetback to summary
public void setNextResultset(Resultset nextResultset)

Implements com.mysql.cj.protocol.Resultset.setNextResultset.

Parameters
nextResultset:Resultset

Doc from com.mysql.cj.protocol.Resultset.setNextResultset.

Sets the next result set in the result set chain for multiple result sets.

Annotations
@Override