MySQL Shell API 9.1.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 next_result ()
 Prepares the SqlResult to start reading data from the next Result (if many results were returned). More...
 
int get_auto_increment_value ()
 Returns the identifier for the last record inserted. More...
 
bool has_data ()
 Returns true if the last statement execution has a result set.
 
- Methods inherited from RowResult
Row fetch_one ()
 Retrieves the next Row on the RowResult. More...
 
dict fetch_one_object ()
 Retrieves the next Row on the result and returns it as an object. More...
 
list fetch_all ()
 Returns a list of DbDoc objects which contains an element for every unread document. More...
 
int get_column_count ()
 Retrieves the number of columns on the current result. More...
 
list get_column_names ()
 Gets the columns on the current result. More...
 
list get_columns ()
 Gets the column metadata for the columns on the active result. More...
 
- Methods inherited from BaseResult
int get_affected_items_count ()
 The the number of affected items for the last operation. More...
 
int get_warnings_count ()
 The number of warnings produced by the last statement execution. More...
 
list get_warnings ()
 Retrieves the warnings generated by the executed operation. More...
 
str get_execution_time ()
 Retrieves a string value indicating the execution time of the executed operation.
 

Properties

int auto_increment_value
 Same as get_auto_increment_value()
 
- Properties inherited from RowResult
int column_count
 Same as get_column_count()
 
list column_names
 Same as get_column_names()
 
list columns
 Same as get_columns()
 
- Properties inherited from BaseResult
int affected_items_count
 Same as get_affected_items_count()
 
int warnings_count
 Same as get_warnings_count()
 
list warnings
 Same as get_warnings()
 
str execution_time
 Same as get_execution_time()
 

Detailed Description

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

Member Function Documentation

◆ next_result()

bool next_result ( )

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.

◆ get_auto_increment_value()

int get_auto_increment_value ( )

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.