Provide explicit handles to extract DatabaseError exceptions properties. Before this patch, one could extract Tarantool error code only through internal args property.
Unfortunately, current exceptions API is inconsistent. Code uses DatabaseError(code, message), NetworkError(message) and
NetworkError(exc), while NetworkError is a child class of DatabaseError.
This patch shouldn't break current behavior.
Part of #206
iproto: support feature discovery
Since version 2.10.0 Tarantool supports feature discovery [1]. Client can send the schema version and supported features and receive server-side schema version and supported features information to tune its behavior.
After this patch, the request would be send on connect. Connector will use protocol version that is minimal of connector version (now it's 4) and server version. Feature would be enabled if both client and server supports it (for now client does not support any features from the list). Unknown request type error response is expected for pre-2.10.0 versions. In this case, protocol version would be None and no features would be enabled.
code-health: update request type constant name
Modern Tarantool documentation uses IPROTO_REQUEST_TYPE name for request type instead of IPROTO_CODE [1].
Part of #206
code-health: use hexadecimal codes for requests
Modern Tarantool documentation uses hexadecimal codes for request codes [1].
Part of #206
code-health: expose DatabaseError properties
Provide explicit handles to extract DatabaseError exceptions properties. Before this patch, one could extract Tarantool error code only through internal
args
property.Unfortunately, current exceptions API is inconsistent. Code uses
DatabaseError(code, message)
,NetworkError(message)
andNetworkError(exc)
, while NetworkError is a child class of DatabaseError.This patch shouldn't break current behavior.
Part of #206
iproto: support feature discovery
Since version 2.10.0 Tarantool supports feature discovery [1]. Client can send the schema version and supported features and receive server-side schema version and supported features information to tune its behavior.
After this patch, the request would be send on
connect
. Connector will use protocol version that is minimal of connector version (now it's 4) and server version. Feature would be enabled if both client and server supports it (for now client does not support any features from the list). Unknown request type error response is expected for pre-2.10.0 versions. In this case, protocol version would beNone
and no features would be enabled.Closes #206