mysqlx.Result

class mysqlx.Result(connection=None, ids=None)

Bases: mysqlx.result.BaseResult

Allows retrieving information about non query operations performed on the database.

Parameters

connection (mysqlx.connection.Connection) – The Connection object. ids (list): A list of IDs.

append_warning(level, code, msg)

Append a warning.

Parameters
  • level (int) – The warning level.

  • code (int) – The warning code.

  • msg (str) – The warning message.

get_affected_items_count()

Returns the number of affected items for the last operation.

Returns

The number of affected items.

Return type

int

get_autoincrement_value()

Returns the last insert id auto generated.

Returns

The last insert id.

Return type

int

get_document_id()

Returns ID of the last document inserted into a collection.

Deprecated since version 8.0.12.

get_generated_ids()

Returns the generated ids.

get_generated_insert_id()

Returns the generated insert id.

Deprecated since version 8.0.12.

get_warnings()

Returns the warnings.

Returns

The list of warnings.

Return type

list

get_warnings_count()

Returns the number of warnings.

Returns

The number of warnings.

Return type

int

set_closed(flag)

Sets if resultset fetch is done.

set_generated_ids(generated_ids)

Sets the generated ids.

set_generated_insert_id(generated_id)

Sets the generated insert id.

set_rows_affected(total)

Sets the number of rows affected.