MySQL 8.4.2
Source Code Documentation
anonymous_namespace{router_require.cc}::SelectUserAttributesHandler Class Reference

capture the user-attributes. More...

Inheritance diagram for anonymous_namespace{router_require.cc}::SelectUserAttributesHandler:
[legend]

Public Member Functions

 SelectUserAttributesHandler (RouterRequireFetcher::Result &result)
 
void on_column_count (uint64_t count) override
 
void on_row (const classic_protocol::message::server::Row &row) override
 
void on_row_end (const classic_protocol::message::server::Eof &msg) override
 
void on_error (const classic_protocol::message::server::Error &err) override
 
void failed (classic_protocol::message::server::Error msg)
 
const classic_protocol::message::server::Errorfailed ()
 
- Public Member Functions inherited from QuerySender::Handler
virtual ~Handler ()=default
 
virtual void on_column (const classic_protocol::message::server::ColumnMeta &column)
 
virtual void on_ok (const classic_protocol::message::server::Ok &ok)
 

Static Public Member Functions

static std::optional< RouterRequire::Attributesparse_router_require (std::string_view json_doc)
 

Private Attributes

uint64_t row_count_ {}
 
classic_protocol::message::server::Error err_ {}
 
std::string user_attrs_
 
RouterRequireFetcher::Resultresult_
 

Static Private Attributes

static constexpr const uint16_t kTooManyRows {1234}
 
static constexpr const uint16_t kTooManyColumns {1234}
 
static constexpr const uint16_t kAccessDenied {1045}
 

Detailed Description

capture the user-attributes.

Expects a resultset similar to that of:

SELECT attribute
FROM information_schema.user_attributes
WHERE CONCAT(user, '@', host) = CURRENT_USER()
char * user
Definition: mysqladmin.cc:66
const char * host
Definition: mysqladmin.cc:65
const std::string SELECT("SELECT")
Name of the static privileges.
@ WHERE
Definition: sql_yacc.h:687
@ FROM
Definition: sql_yacc.h:250
@ CURRENT_USER
Definition: sql_yacc.h:157
  • 1 columns (column-names are ignored)
  • 1 row

Constructor & Destructor Documentation

◆ SelectUserAttributesHandler()

anonymous_namespace{router_require.cc}::SelectUserAttributesHandler::SelectUserAttributesHandler ( RouterRequireFetcher::Result result)
inlineexplicit

Member Function Documentation

◆ failed() [1/2]

const classic_protocol::message::server::Error & anonymous_namespace{router_require.cc}::SelectUserAttributesHandler::failed ( )
inline

◆ failed() [2/2]

void anonymous_namespace{router_require.cc}::SelectUserAttributesHandler::failed ( classic_protocol::message::server::Error  msg)
inline

◆ on_column_count()

void anonymous_namespace{router_require.cc}::SelectUserAttributesHandler::on_column_count ( uint64_t  count)
inlineoverridevirtual

Reimplemented from QuerySender::Handler.

◆ on_error()

void anonymous_namespace{router_require.cc}::SelectUserAttributesHandler::on_error ( const classic_protocol::message::server::Error err)
inlineoverridevirtual

Reimplemented from QuerySender::Handler.

◆ on_row()

void anonymous_namespace{router_require.cc}::SelectUserAttributesHandler::on_row ( const classic_protocol::message::server::Row row)
inlineoverridevirtual

Reimplemented from QuerySender::Handler.

◆ on_row_end()

void anonymous_namespace{router_require.cc}::SelectUserAttributesHandler::on_row_end ( const classic_protocol::message::server::Eof msg)
inlineoverridevirtual

Reimplemented from QuerySender::Handler.

◆ parse_router_require()

static std::optional< RouterRequire::Attributes > anonymous_namespace{router_require.cc}::SelectUserAttributesHandler::parse_router_require ( std::string_view  json_doc)
inlinestatic

Member Data Documentation

◆ err_

classic_protocol::message::server::Error anonymous_namespace{router_require.cc}::SelectUserAttributesHandler::err_ {}
private

◆ kAccessDenied

constexpr const uint16_t anonymous_namespace{router_require.cc}::SelectUserAttributesHandler::kAccessDenied {1045}
staticconstexprprivate

◆ kTooManyColumns

constexpr const uint16_t anonymous_namespace{router_require.cc}::SelectUserAttributesHandler::kTooManyColumns {1234}
staticconstexprprivate

◆ kTooManyRows

constexpr const uint16_t anonymous_namespace{router_require.cc}::SelectUserAttributesHandler::kTooManyRows {1234}
staticconstexprprivate

◆ result_

RouterRequireFetcher::Result& anonymous_namespace{router_require.cc}::SelectUserAttributesHandler::result_
private

◆ row_count_

uint64_t anonymous_namespace{router_require.cc}::SelectUserAttributesHandler::row_count_ {}
private

◆ user_attrs_

std::string anonymous_namespace{router_require.cc}::SelectUserAttributesHandler::user_attrs_
private

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