mysqlx.BufferingResult

class mysqlx.BufferingResult(connection)

Bases: mysqlx.result.BaseResult

Provides base functionality for buffering result objects.

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.

property count

The total of items.

Type

int

fetch_all()

Fetch all items.

Returns

The list of items of mysqlx.DbDoc or

mysqlx.Row.

Return type

list

fetch_one()

Fetch one item.

Returns

one result item.

Return type

mysqlx.Row or mysqlx.DbDoc

get_affected_items_count()

Returns the number of affected items for the last operation.

Returns

The number of affected items.

Return type

int

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

index_of(col_name)

Returns the index of the column.

Returns

The index of the column.

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_has_data(flag)

Sets if result has data.

Parameters

flag (bool) – True if result has data.

set_has_more_results(flag)

Sets if has more results.

Parameters

flag (bool) – True if has more results.

set_rows_affected(total)

Sets the number of rows affected.