class Response

class tarantool.response.Response(conn, response)

Represents a single response from the server in compliance with the Tarantool protocol. Responsible for data encapsulation (i.e. received list of tuples) and parses binary packet received from the server.

Create an instance of Response using data received from the server.

__init__() itself reads data from the socket, parses response body and sets appropriate instance attributes.

Parameters:body (array of bytes) – body of the response
body
Type:dict

Required field in the server response. Contains raw response body.

code
Type:int

Required field in the server response. Contains response type id.

count(item)
data
Type:object

Required field in the server response. Contains list of tuples of SELECT, REPLACE and DELETE requests and arbitrary data for CALL.

index(*args)
return_code
Type:int

Required field in the server response. Value of return_code can be 0 if request was sucessfull or contains an error code. If return_code is non-zero than return_message contains an error message.

return_message
Type:str

The error message returned by the server in case of return_code is non-zero.

rowcount
Type:int

Number of rows affected or returned by a query.

schema_version
Type:int

Current schema version of request.

strerror
Type:str

It may be ER_OK if request was successful, or contain error code string.

sync
Type:int

Required field in the server response. Contains response header IPROTO_SYNC.