|
Orbit Framework
An ultra-modern, asynchronous, cross-platform C++ Web Framework.
|
An asynchronous MySQL client using coroutines and a network Proactor. More...
#include <MysqlClient.hpp>
Classes | |
| struct | Config |
| Configuration options for the MySQL client. More... | |
| struct | ConnectAwaiter |
| struct | QueryAwaiter |
Public Member Functions | |
| MysqlClient (network::Proactor &proactor, const Config &config) | |
| Constructs a new MysqlClient. | |
| ~MysqlClient () | |
| MysqlClient (const MysqlClient &)=delete | |
| MysqlClient & | operator= (const MysqlClient &)=delete |
| ConnectAwaiter | connect_async () |
| Connects to the MySQL database asynchronously. | |
| QueryAwaiter | query_async (std::string query) |
| Executes a query asynchronously. | |
| void | close () |
| Closes the MySQL connection. | |
| network::Proactor & | get_proactor () |
| Gets the associated network proactor. | |
| MYSQL * | get_mysql () |
| Gets the underlying MySQL connection object. | |
An asynchronous MySQL client using coroutines and a network Proactor.
| database::MysqlClient::MysqlClient | ( | network::Proactor & | proactor, |
| const Config & | config | ||
| ) |
Constructs a new MysqlClient.
| proactor | The network Proactor to use for async events. |
| config | The configuration settings for the MySQL connection. |
| database::MysqlClient::~MysqlClient | ( | ) |
|
delete |
| void database::MysqlClient::close | ( | ) |
Closes the MySQL connection.
| MysqlClient::ConnectAwaiter database::MysqlClient::connect_async | ( | ) |
Connects to the MySQL database asynchronously.
|
inline |
Gets the underlying MySQL connection object.
|
inline |
Gets the associated network proactor.
|
delete |
| MysqlClient::QueryAwaiter database::MysqlClient::query_async | ( | std::string | query | ) |
Executes a query asynchronously.
| query | The SQL query string. |