MySQL  8.0.17
Source Code Documentation
server_mock Namespace Reference

Classes

struct  AsyncNotice
 
class  AuthFast
 
class  AuthSwitch
 
struct  column_info_type
 Struct for keeping column specific data. More...
 
class  DuktapeRuntimeError
 
class  DuktapeStatementReader
 
struct  ErrorResponse
 
class  Greeting
 
struct  HandshakeResponse
 
class  MySQLProtocolDecoder
 Responsible for decoding classic MySQL protocol packets. More...
 
class  MySQLProtocolEncoder
 
class  MySQLServerMock
 Main class. More...
 
class  MySQLServerMockSession
 
class  MySQLServerMockSessionClassic
 
class  MySQLServerMockSessionX
 
class  MySQLServerSharedGlobals
 
struct  OkResponse
 
class  QueriesJsonReader
 Responsible for reading the json file with the expected statements and simplifying the data structures used by RapidJSON into vectors. More...
 
struct  Response
 
struct  ResultsetResponse
 Keeps result data for single SQL statement that returns resultset. More...
 
class  ScopeGuard
 dismissable scope guard. More...
 
class  StatementReaderBase
 
class  StatementReaderFactory
 
class  StatementResponse
 Keeps single SQL statement data. More...
 
struct  Work
 
class  XProtocolDecoder
 
class  XProtocolEncoder
 

Typedefs

using byte = uint8_t
 
using RowValueType = std::vector< std::pair< bool, std::string > >
 Vector for keeping has_value|string representation of the values of the single row (ordered by column) More...
 

Enumerations

enum  MySQLColumnType {
  MySQLColumnType::DECIMAL = 0x00, MySQLColumnType::TINY = 0x01, MySQLColumnType::SHORT = 0x02, MySQLColumnType::LONG = 0x03,
  MySQLColumnType::FLOAT = 0x04, MySQLColumnType::DOUBLE = 0x05, MySQLColumnType::NULL_ = 0x06, MySQLColumnType::TIMESTAMP = 0x07,
  MySQLColumnType::LONGLONG = 0x08, MySQLColumnType::INT24 = 0x09, MySQLColumnType::DATE = 0x0a, MySQLColumnType::TIME = 0x0b,
  MySQLColumnType::DATETIME = 0x0c, MySQLColumnType::YEAR = 0x0d, MySQLColumnType::NEWDATE = 0x0e, MySQLColumnType::VARCHAR = 0x0f,
  MySQLColumnType::BIT = 0x10, MySQLColumnType::NEWDECIMAL = 0xf7, MySQLColumnType::ENUM = 0xf7, MySQLColumnType::SET = 0xf8,
  MySQLColumnType::TINY_BLOB = 0xf9, MySQLColumnType::MEDIUM_BLOB = 0xfa, MySQLColumnType::LONG_BLOB = 0xfb, MySQLColumnType::BLOB = 0xfc,
  MySQLColumnType::VAR_STRING = 0xfd, MySQLColumnType::STRING = 0xfe, MySQLColumnType::GEOMETRY = 0xff
}
 Supported MySQL Coumn types. More...
 

Functions

static std::string duk_get_type_names (duk_context *ctx, duk_idx_t ndx)
 
duk_int_t duk_peval_file (duk_context *ctx, const char *path)
 
static duk_int_t process_get_shared (duk_context *ctx)
 
static duk_int_t process_set_shared (duk_context *ctx)
 
static void check_stmts_section (duk_context *ctx)
 
static bool check_notices_section (duk_context *ctx)
 
static void check_handshake_section (duk_context *ctx)
 
static void debug_trace_result (const ResultsetResponse *resultset)
 
MySQLColumnType column_type_from_string (const std::string &type)
 
void non_blocking (socket_t handle_, bool mode) noexcept
 

Variables

constexpr char kAuthCachingSha2Password [] = "caching_sha2_password"
 
constexpr char kAuthNativePassword [] = "mysql_native_password"
 
const uint16_t MYSQL_PARSE_ERROR = 1064
 

Typedef Documentation

◆ byte

typedef uint8_t server_mock::byte

◆ RowValueType

using server_mock::RowValueType = typedef std::vector<std::pair<bool, std::string> >

Vector for keeping has_value|string representation of the values of the single row (ordered by column)

Enumeration Type Documentation

◆ MySQLColumnType

Supported MySQL Coumn types.

Enumerator
DECIMAL 
TINY 
SHORT 
LONG 
FLOAT 
DOUBLE 
NULL_ 
TIMESTAMP 
LONGLONG 
INT24 
DATE 
TIME 
DATETIME 
YEAR 
NEWDATE 
VARCHAR 
BIT 
NEWDECIMAL 
ENUM 
SET 
TINY_BLOB 
MEDIUM_BLOB 
LONG_BLOB 
BLOB 
VAR_STRING 
STRING 
GEOMETRY 

Function Documentation

◆ check_handshake_section()

static void server_mock::check_handshake_section ( duk_context *  ctx)
static

◆ check_notices_section()

static bool server_mock::check_notices_section ( duk_context *  ctx)
static

◆ check_stmts_section()

static void server_mock::check_stmts_section ( duk_context *  ctx)
static

◆ column_type_from_string()

MySQLColumnType server_mock::column_type_from_string ( const std::string &  type)

◆ debug_trace_result()

static void server_mock::debug_trace_result ( const ResultsetResponse resultset)
static

◆ duk_get_type_names()

static std::string server_mock::duk_get_type_names ( duk_context *  ctx,
duk_idx_t  ndx 
)
static

◆ duk_peval_file()

duk_int_t server_mock::duk_peval_file ( duk_context *  ctx,
const char *  path 
)

◆ non_blocking()

void server_mock::non_blocking ( socket_t  handle_,
bool  mode 
)
noexcept

◆ process_get_shared()

static duk_int_t server_mock::process_get_shared ( duk_context *  ctx)
static

◆ process_set_shared()

static duk_int_t server_mock::process_set_shared ( duk_context *  ctx)
static

Variable Documentation

◆ kAuthCachingSha2Password

constexpr char server_mock::kAuthCachingSha2Password = "caching_sha2_password"

◆ kAuthNativePassword

constexpr char server_mock::kAuthNativePassword = "mysql_native_password"

◆ MYSQL_PARSE_ERROR

const uint16_t server_mock::MYSQL_PARSE_ERROR = 1064