diff --git a/doc/native_protocol_v4.spec b/doc/native_protocol_v4.spec index 8beb77b6b1..dd0623398f 100644 --- a/doc/native_protocol_v4.spec +++ b/doc/native_protocol_v4.spec @@ -120,15 +120,17 @@ Table of Contents information. If a response frame has the tracing flag set, its body contains a tracing ID. The tracing ID is a [uuid] and is the first thing in - the frame body. The rest of the body will then be the usual body - corresponding to the response opcode. + the frame body. 0x04: Custom payload flag. For a request or response frame, this indicates that a generic key-value custom payload for a custom QueryHandler implementation is present in the frame. Such a custom payload is simply ignored by the default QueryHandler implementation. Currently, only QUERY, PREPARE, EXECUTE and BATCH requests support payload. - Type of custom payload is [bytes map] (see below). + Type of custom payload is [bytes map] (see below). If either or both + of the tracing and warning flags are set, the custom payload will follow + those indicated elements in the frame body. If neither are set, the custom + payload will be the first value in the frame body. 0x08: Warning flag. The response contains warnings which were generated by the server to go along with this response. If a response frame has the warning flag set, its body will contain the @@ -249,6 +251,15 @@ Table of Contents 4. Messages + Dependant on the flags specified in the header, the layout of the message body must be: + [][][] + where: + - is a UUID tracing ID, present if this is a request message and the Tracing flag is set. + - is a string list of warnings (if this is a request message and the Warning flag is set. + - is bytes map for the serialised custom payload present if this is one of the message types + which support custom payloads (QUERY, PREPARE, EXECUTE and BATCH) and the Custom payload flag is set. + - as defined below through sections 4 and 5. + 4.1. Requests Note that outside of their normal responses (described below), all requests