MySQL Shell API 8.0.40
Unified development interface for MySQL Products
Methods | Properties | List of all members
SqlResult Class Reference

Allows browsing through the result information after performing an operation on the database done through Session.sql More...

Methods

bool hasData ()
 Returns true if the last statement execution has a result set.
 
Integer getAutoIncrementValue ()
 Returns the identifier for the last record inserted. More...
 
Integer getAffectedRowCount ()
 Returns the number of rows affected by the executed query. More...
 
Bool nextDataSet ()
 Prepares the SqlResult to start reading data from the next Result (if many results were returned). More...
 
Bool nextResult ()
 Prepares the SqlResult to start reading data from the next Result (if many results were returned). More...
 
- Methods inherited from RowResult
Row fetchOne ()
 Retrieves the next Row on the RowResult. More...
 
Dictionary fetchOneObject ()
 Retrieves the next Row on the result and returns it as an object. More...
 
List fetchAll ()
 Returns a list of DbDoc objects which contains an element for every unread document. More...
 
Integer getColumnCount ()
 Retrieves the number of columns on the current result. More...
 
List getColumnNames ()
 Gets the columns on the current result. More...
 
List getColumns ()
 Gets the column metadata for the columns on the active result. More...
 
- Methods inherited from BaseResult
Integer getAffectedItemsCount ()
 The the number of affected items for the last operation. More...
 
Integer getWarningsCount ()
 The number of warnings produced by the last statement execution. More...
 
Integer getWarningCount ()
 The number of warnings produced by the last statement execution. More...
 
List getWarnings ()
 Retrieves the warnings generated by the executed operation. More...
 
String getExecutionTime ()
 Retrieves a string value indicating the execution time of the executed operation.
 

Properties

Integer autoIncrementValue
 Same as getAutoIncrementValue()
 
Integer affectedRowCount
 Same as getAffectedRowCount() More...
 
- Properties inherited from RowResult
Integer columnCount
 Same as getColumnCount()
 
List columnNames
 Same as getColumnNames()
 
List columns
 Same as getColumns()
 
- Properties inherited from BaseResult
Integer affectedItemsCount
 Same as getAffectedItemsCount()
 
Integer warningCount
 Same as getWarningCount() More...
 
Integer warningsCount
 Same as getWarningsCount()
 
List warnings
 Same as getWarnings()
 
String executionTime
 Same as getExecutionTime()
 

Detailed Description

Allows browsing through the result information after performing an operation on the database done through Session.sql

Member Function Documentation

◆ getAutoIncrementValue()

Integer getAutoIncrementValue ( )

Returns the identifier for the last record inserted.

Note that this value will only be set if the executed statement inserted a record in the database and an ID was automatically generated.

◆ getAffectedRowCount()

Integer getAffectedRowCount ( )

Returns the number of rows affected by the executed query.

Attention
This function will be removed in a future release, use the getAffectedItemsCount function instead.

◆ nextDataSet()

Bool nextDataSet ( )

Prepares the SqlResult to start reading data from the next Result (if many results were returned).

Returns
A boolean value indicating whether there is another result or not.
Attention
This function will be removed in a future release, use the nextResult function instead.

◆ nextResult()

Bool nextResult ( )

Prepares the SqlResult to start reading data from the next Result (if many results were returned).

Returns
A boolean value indicating whether there is another result or not.

Member Data Documentation

◆ affectedRowCount

Integer affectedRowCount

Same as getAffectedRowCount()

Attention
This property will be removed in a future release, use the affectedItemsCount property instead.