Class MySQL

Inheritance Relationships

Base Type

  • public std::enable_shared_from_this< MySQL >

Class Documentation

class core::mysql::MySQL : public std::enable_shared_from_this<MySQL>

Public Functions

MySQL(boost::asio::io_service &service)
~MySQL()
void Connect(const std::string &host, const std::string &username, const std::string &password, unsigned int port)
void Reconnect(unsigned int seconds = 0)
std::string GetError(AMY_SYSTEM_NS::error_code &ec)
std::string EscapeString(const std::string &str)
void EnableAutocommit()
void DisableAutocommit()
boost::system::error_code Commit()
boost::system::error_code Rollback()
Statement CreateStatement(const std::string &statement)
void ExecuteQuery(const std::string &statement, const std::function<void(const MySQLError &error, std::shared_ptr<ResultSet>)> &cb)
void ExecuteMultiQuery(const std::string &statement, const std::function<void(const MySQLError &error, std::shared_ptr<std::vector<std::shared_ptr<ResultSet>>>)> cb)
std::shared_ptr<ResultSet> ExecuteQuerySync(const std::string &statement)
void Execute(const std::string &statement)
void ExecuteSync(const std::string &statement)
void ExecuteScalar(const std::string &statement, const std::function<void(const MySQLError &error, std::string)> &cb)
std::string ExecuteScalarSync(const std::string &statement)

Protected Attributes

amy::connector _connector