MySQL Shell API 8.0.40
Unified development interface for MySQL Products
|
Allows retrieving information about non query operations performed on the database. More...
Methods | |
Integer | getAffectedItemCount () |
The the number of affected items for the last operation. More... | |
Integer | getAutoIncrementValue () |
The last insert id auto generated (from an insert operation) More... | |
List | getGeneratedIds () |
Returns the list of document ids generated on the server. 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 | affectedItemCount |
Same as getAffectedItemCount() More... | |
Integer | autoIncrementValue |
Same as getAutoIncrementValue() | |
List | generatedIds |
Same as getGeneratedIds() | |
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() | |
Allows retrieving information about non query operations performed on the database.
An instance of this class will be returned on the CRUD operations that change the content of the database:
Other functions on the Session class also return an instance of this class:
Integer getAffectedItemCount | ( | ) |
The the number of affected items for the last operation.
This is the value of the C API mysql_affected_rows(), see https://dev.mysql.com/doc/refman/en/mysql-affected-rows.html
Integer getAutoIncrementValue | ( | ) |
The last insert id auto generated (from an insert operation)
For more details, see https://dev.mysql.com/doc/refman/en/information-functions.html#function_last-insert-id
Note that this value will be available only when the result is for a Table.insert operation.
List getGeneratedIds | ( | ) |
Returns the list of document ids generated on the server.
When adding documents into a collection, it is required that an ID is associated to the document, if a document is added without an '_id' field, an error will be generated.
At MySQL 8.0.11 if the documents being added do not have an '_id' field, the server will automatically generate an ID and assign it to the document.
This function returns a list of the IDs that were generated for the server to satisfy this requirement.
Integer affectedItemCount |
Same as getAffectedItemCount()