MySQL 8.0.32
Source Code Documentation
classic_protocol::Codec< message::client::StmtExecute > Class Reference

codec for client's Execute Statement command. More...

#include <classic_protocol_codec_message.h>

Inheritance diagram for classic_protocol::Codec< message::client::StmtExecute >:
[legend]

Public Types

using value_type = message::client::StmtExecute
 
using __base = impl::EncodeBase< Codec< value_type > >
 

Public Member Functions

 Codec (value_type v, capabilities::value_type caps)
 
- Public Member Functions inherited from classic_protocol::impl::EncodeBase< Codec< message::client::StmtExecute > >
constexpr EncodeBase (capabilities::value_type caps)
 
constexpr size_t size () const noexcept
 
stdx::expected< size_t, std::error_code > encode (const net::mutable_buffer &buffer) const
 
constexpr capabilities::value_type caps () const noexcept
 

Static Public Member Functions

constexpr static uint8_t cmd_byte () noexcept
 
template<class ConstBufferSequence , class Func >
static stdx::expected< std::pair< size_t, value_type >, std::error_code > decode (const ConstBufferSequence &buffers, capabilities::value_type caps, Func &&param_count_lookup)
 decode a sequence of buffers into a message::client::ExecuteStmt. More...
 

Public Attributes

friend __base
 

Private Member Functions

template<class Accumulator >
auto accumulate_fields (Accumulator &&accu) const
 

Private Attributes

const value_type v_
 

Detailed Description

codec for client's Execute Statement command.

Member Typedef Documentation

◆ __base

◆ value_type

Constructor & Destructor Documentation

◆ Codec()

Member Function Documentation

◆ accumulate_fields()

template<class Accumulator >
auto classic_protocol::Codec< message::client::StmtExecute >::accumulate_fields ( Accumulator &&  accu) const
inlineprivate

◆ cmd_byte()

constexpr static uint8_t classic_protocol::Codec< message::client::StmtExecute >::cmd_byte ( )
inlinestaticconstexprnoexcept

◆ decode()

template<class ConstBufferSequence , class Func >
static stdx::expected< std::pair< size_t, value_type >, std::error_code > classic_protocol::Codec< message::client::StmtExecute >::decode ( const ConstBufferSequence &  buffers,
capabilities::value_type  caps,
Func &&  param_count_lookup 
)
inlinestatic

decode a sequence of buffers into a message::client::ExecuteStmt.

Parameters
bufferssequence of buffers
capsprotocol capabilities
param_count_lookupcallable 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

Member Data Documentation

◆ __base

◆ v_


The documentation for this class was generated from the following file: