26#ifndef ROUTING_CLASSIC_QUERY_FORWARDER_INCLUDED
27#define ROUTING_CLASSIC_QUERY_FORWARDER_INCLUDED
29#include <system_error>
38 using ForwardingProcessor::ForwardingProcessor;
79 static constexpr std::string_view
prefix() {
return "mysql/query"; }
87 const std::optional<classic_protocol::message::server::Error> &
err) {
91 std::optional<classic_protocol::message::server::Error>
failed()
const {
143 std::optional<classic_protocol::message::server::Error>
failed_;
a processor base class with helper functions.
Definition: forwarding_processor.h:38
Definition: classic_query_forwarder.h:36
stdx::expected< Result, std::error_code > response()
Definition: classic_query_forwarder.cc:2680
TraceEvent * trace_event_command_
Definition: classic_query_forwarder.h:137
std::optional< classic_protocol::message::server::Error > failed() const
Definition: classic_query_forwarder.h:91
stdx::expected< Result, std::error_code > row()
Definition: classic_query_forwarder.cc:2822
void stage(Stage stage)
Definition: classic_query_forwarder.h:83
Stage
Definition: classic_query_forwarder.h:40
@ ExplicitCommitConnectDone
stdx::expected< Result, std::error_code > switch_backend()
Definition: classic_query_forwarder.cc:2508
stdx::expected< Result, std::error_code > process() override
Definition: classic_query_forwarder.cc:1580
stdx::expected< Result, std::error_code > classify_query()
Definition: classic_query_forwarder.cc:1987
stdx::expected< Result, std::error_code > explicit_commit_connect()
Definition: classic_query_forwarder.cc:1890
stdx::expected< Result, std::error_code > row_end()
Definition: classic_query_forwarder.cc:2831
std::optional< classic_protocol::message::server::Error > failed_
Definition: classic_query_forwarder.h:143
stdx::expected< Result, std::error_code > explicit_commit()
Definition: classic_query_forwarder.cc:1930
stdx::expected< Result, std::error_code > connected()
Definition: classic_query_forwarder.cc:2541
stdx::expected< Result, std::error_code > explicit_commit_connect_done()
Definition: classic_query_forwarder.cc:1900
stdx::expected< Result, std::error_code > load_data()
Definition: classic_query_forwarder.cc:2713
stdx::expected< Result, std::error_code > prepare_backend()
Definition: classic_query_forwarder.cc:2515
stdx::expected< Result, std::error_code > command()
Definition: classic_query_forwarder.cc:1639
TraceEvent * trace_connect_and_explicit_commit(TraceEvent *parent_span)
Definition: classic_query_forwarder.cc:1878
TraceEvent * trace_event_query_result_
Definition: classic_query_forwarder.h:141
stdx::expected< Result, std::error_code > forward()
Definition: classic_query_forwarder.cc:2586
stdx::flags< StmtClassifier > stmt_classified_
Definition: classic_query_forwarder.h:131
stdx::expected< Result, std::error_code > column_end()
Definition: classic_query_forwarder.cc:2776
stdx::expected< Result, std::error_code > error()
Definition: classic_query_forwarder.cc:2991
TraceEvent * trace_event_connect_and_explicit_commit_
Definition: classic_query_forwarder.h:138
stdx::expected< Result, std::error_code > column_count()
Definition: classic_query_forwarder.cc:2742
stdx::expected< Result, std::error_code > forward_done()
Definition: classic_query_forwarder.cc:2667
static constexpr std::string_view prefix()
Definition: classic_query_forwarder.h:79
Stage stage_
Definition: classic_query_forwarder.h:133
stdx::expected< void, std::error_code > track_session_changes(net::const_buffer session_trackers, classic_protocol::capabilities::value_type caps)
stdx::expected< Result, std::error_code > connect()
Definition: classic_query_forwarder.cc:2527
SqlParserState sql_parser_state_
Definition: classic_query_forwarder.h:145
TraceEvent * trace_event_forward_command_
Definition: classic_query_forwarder.h:140
TraceEvent * trace_event_connect_and_forward_command_
Definition: classic_query_forwarder.h:139
stdx::expected< Result, std::error_code > column()
Definition: classic_query_forwarder.cc:2763
stdx::expected< Result, std::error_code > explicit_commit_done()
Definition: classic_query_forwarder.cc:1950
stdx::expected< Result, std::error_code > data()
Definition: classic_query_forwarder.cc:2722
uint64_t columns_left_
Definition: classic_query_forwarder.h:135
Stage stage() const
Definition: classic_query_forwarder.h:84
void failed(const std::optional< classic_protocol::message::server::Error > &err)
Definition: classic_query_forwarder.h:86
stdx::expected< Result, std::error_code > row_or_end()
Definition: classic_query_forwarder.cc:2787
stdx::expected< Result, std::error_code > ok()
Definition: classic_query_forwarder.cc:2914
stdx::expected< Result, std::error_code > response_done()
Definition: classic_query_forwarder.cc:3025
stdx::expected< Result, std::error_code > send_queued()
Definition: classic_query_forwarder.cc:3033
Definition: sql_parser_state.h:35
Definition: expected.h:284
a type-safe flags type.
Definition: flags.h:115
std::bitset< 32 > value_type
Definition: classic_protocol_constants.h:73
static Value err()
Create a Value object that represents an error condition.
Definition: json_binary.cc:927
Definition: trace_span.h:35