MySQL Shell API 9.0.0
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...
 
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...
 
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()
 
- 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 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.

◆ 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.