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:2693
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:2835
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:2519
stdx::expected< Result, std::error_code > process() override
Definition: classic_query_forwarder.cc:1577
stdx::expected< Result, std::error_code > classify_query()
Definition: classic_query_forwarder.cc:1983
stdx::expected< Result, std::error_code > explicit_commit_connect()
Definition: classic_query_forwarder.cc:1887
stdx::expected< Result, std::error_code > row_end()
Definition: classic_query_forwarder.cc:2844
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:1926
stdx::expected< Result, std::error_code > connected()
Definition: classic_query_forwarder.cc:2555
stdx::expected< Result, std::error_code > explicit_commit_connect_done()
Definition: classic_query_forwarder.cc:1897
stdx::expected< Result, std::error_code > load_data()
Definition: classic_query_forwarder.cc:2726
stdx::expected< Result, std::error_code > prepare_backend()
Definition: classic_query_forwarder.cc:2526
stdx::expected< Result, std::error_code > command()
Definition: classic_query_forwarder.cc:1636
TraceEvent * trace_connect_and_explicit_commit(TraceEvent *parent_span)
Definition: classic_query_forwarder.cc:1875
TraceEvent * trace_event_query_result_
Definition: classic_query_forwarder.h:141
stdx::expected< Result, std::error_code > forward()
Definition: classic_query_forwarder.cc:2599
stdx::flags< StmtClassifier > stmt_classified_
Definition: classic_query_forwarder.h:131
stdx::expected< Result, std::error_code > column_end()
Definition: classic_query_forwarder.cc:2789
stdx::expected< Result, std::error_code > error()
Definition: classic_query_forwarder.cc:3004
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:2755
stdx::expected< Result, std::error_code > forward_done()
Definition: classic_query_forwarder.cc:2680
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:2538
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:2776
stdx::expected< Result, std::error_code > explicit_commit_done()
Definition: classic_query_forwarder.cc:1946
stdx::expected< Result, std::error_code > data()
Definition: classic_query_forwarder.cc:2735
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:2800
stdx::expected< Result, std::error_code > ok()
Definition: classic_query_forwarder.cc:2927
stdx::expected< Result, std::error_code > response_done()
Definition: classic_query_forwarder.cc:3038
stdx::expected< Result, std::error_code > send_queued()
Definition: classic_query_forwarder.cc:3046
Definition: sql_parser_state.h:35
Definition: expected.h:286
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:908
Definition: trace_span.h:35