MySQL Shell API 8.0.37
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_data_set ()
 Prepares the SqlResult to start reading data from the next Result (if many results were returned). More...
 
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...
 
int get_affected_row_count ()
 Returns the number of rows affected by the executed query. 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...
 
int get_warning_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()
 
int affected_row_count
 Same as get_affected_row_count() More...
 
- 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 warning_count
 Same as get_warning_count() More...
 
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_data_set()

bool next_data_set ( )

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 next_result function instead.

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

◆ get_affected_row_count()

int get_affected_row_count ( )

Returns the number of rows affected by the executed query.

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

Member Data Documentation

◆ affected_row_count

int affected_row_count

Same as get_affected_row_count()

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