MySQL 9.3.0
Source Code Documentation
classic_protocol::Codec< borrowable::message::client::StmtExecute< Borrowed > > Class Template Reference

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

#include <classic_protocol_codec_message.h>

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

Public Types

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

Public Member Functions

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

Static Public Member Functions

constexpr static uint8_t cmd_byte () noexcept
 
static constexpr capabilities::value_type depends_on_capabilities () noexcept
 capabilities the codec depends on. More...
 
template<class Func >
static stdx::expected< std::pair< size_t, value_type >, std::error_code > decode (const net::const_buffer &buffer, capabilities::value_type caps, Func &&metadata_lookup)
 decode a buffer into a message::client::StmtExecute. 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

template<bool Borrowed>
class classic_protocol::Codec< borrowable::message::client::StmtExecute< Borrowed > >

codec for client's Execute Statement command.

Member Typedef Documentation

◆ __base

◆ value_type

Constructor & Destructor Documentation

◆ Codec()

template<bool Borrowed>
constexpr classic_protocol::Codec< borrowable::message::client::StmtExecute< Borrowed > >::Codec ( value_type  val,
capabilities::value_type  caps 
)
inlineconstexpr

Member Function Documentation

◆ accumulate_fields()

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

◆ cmd_byte()

template<bool Borrowed>
constexpr static uint8_t classic_protocol::Codec< borrowable::message::client::StmtExecute< Borrowed > >::cmd_byte ( )
inlinestaticconstexprnoexcept

◆ decode()

template<bool Borrowed>
template<class Func >
static stdx::expected< std::pair< size_t, value_type >, std::error_code > classic_protocol::Codec< borrowable::message::client::StmtExecute< Borrowed > >::decode ( const net::const_buffer buffer,
capabilities::value_type  caps,
Func &&  metadata_lookup 
)
inlinestatic

decode a buffer into a message::client::StmtExecute.

Parameters
buffera buffer
capsprotocol capabilities
metadata_lookupcallable that expects a 'uint32_t statement_id' that returns a result that's convertible to 'stdx::expected<std::vector<ParamDef>, std::error_code>' representing the parameter-definitions of the prepared statement

decoding a StmtExecute message requires the parameter-definitions of the prepared statement. The metadata_lookup function may be called to get the parameter-definitions for the statement-id.

The function may return a parameter-definitions directly

buffers,
[](uint32_t stmt_id) { return std::vector<ParamDef>{}; });
constexpr value_type protocol_41
Definition: classic_protocol_constants.h:104
stdx::expected< std::pair< size_t, T >, std::error_code > decode(const net::const_buffer &buffer, capabilities::value_type caps)
decode a message from a buffer.
Definition: classic_protocol_codec_base.h:119

... or a stdx::expected<std::vector<ParamDef>, std::error_code> if it wants to signal that a statement-id wasn't found

buffers,
[](uint32_t stmt_id) ->
stdx::expected<std::vector<ParamDef>, std::error_code> {
bool found{true};
if (found) {
return {};
} else {
}
});
Definition: expected.h:286
std::error_code make_error_code(codec_errc e) noexcept
Definition: classic_protocol_codec_error.h:86
unexpected(E) -> unexpected< E >

◆ depends_on_capabilities()

template<bool Borrowed>
static constexpr capabilities::value_type classic_protocol::Codec< borrowable::message::client::StmtExecute< Borrowed > >::depends_on_capabilities ( )
inlinestaticconstexprnoexcept

capabilities the codec depends on.

Member Data Documentation

◆ __base

template<bool Borrowed>
friend classic_protocol::Codec< borrowable::message::client::StmtExecute< Borrowed > >::__base

◆ v_

template<bool Borrowed>
const value_type classic_protocol::Codec< borrowable::message::client::StmtExecute< Borrowed > >::v_
private

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