codec for client's Execute Statement command.
template<class ConstBufferSequence , class Func >
decode a sequence of buffers into a message::client::ExecuteStmt.
- Parameters
-
buffers | sequence of buffers |
caps | protocol capabilities |
param_count_lookup | callable that expects a 'uint32_t statement_id' that returns and integer that's convertible to 'stdx::expected<uint16_t, std::error_code>' representing the parameter count of the prepared statement |
decoding a ExecuteStmt message requires a parameter count of the prepared statement. The param_count_lookup function may be called to get the param count for the statement-id.
The function may return a param-count directly
buffers,
[](uint32_t stmt_id) { return 1; });
constexpr value_type protocol_41
Definition: classic_protocol_constants.h:103
stdx::expected< std::pair< size_t, T >, std::error_code > decode(const ConstBufferSequence &buffers, capabilities::value_type caps)
decode a message from a buffer sequence.
Definition: classic_protocol_codec_base.h:117
... or a stdx::expected<uint16_t, std::error_code> if it wants to signal that a statement-id wasn't found
buffers,
bool found{true};
if (found) {
return 1;
} else {
}
});
Definition: expected.h:943
std::error_code make_error_code(codec_errc e) noexcept
Definition: classic_protocol_codec_error.h:85
constexpr auto make_unexpected(E &&e) -> unexpected< std::decay_t< E > >
Definition: expected.h:124