|
| MySQLConnection (const MySQLConnection &)=delete |
|
| MySQLConnection (const MySQLConnection &&)=delete |
|
MySQLConnection & | operator= (const MySQLConnection &)=delete |
|
MySQLConnection & | operator= (const MySQLConnection &&)=delete |
|
| operator MYSQL * () |
|
void | open_url (const std::string &url) |
|
void | open_test () |
|
std::string | escape (const char *str) |
| Escape a C string.
|
|
std::string | escape (const std::string &str) |
| Escape a string.
|
|
std::string | escape (const std::vector< uint8_t > &str) |
| Escape a byte buffer.
|
|
void | exec_no_data_nothrow (const char *query) noexcept |
| Run a query throwing no exceptions, warning on stderr if it is not successful or if it gives a nonempty result.
|
|
void | exec_no_data (const char *query) |
|
void | exec_no_data (const std::string &query) |
|
mysql::Result | exec_store (const char *query) |
|
mysql::Result | exec_store (const std::string &query) |
|
void | exec_use (const char *query, std::function< void(const mysql::Row &)> dest) |
|
void | exec_use (const std::string &query, std::function< void(const mysql::Row &)> dest) |
|
std::unique_ptr< Transaction > | transaction (bool readonly=false) override |
| Begin a transaction.
|
|
bool | has_table (const std::string &name) override |
| Check if the database contains a table.
|
|
std::string | get_setting (const std::string &key) override |
| Get a value from the settings table.
|
|
void | set_setting (const std::string &key, const std::string &value) override |
| Set a value in the settings table.
|
|
void | drop_settings () override |
| Drop the settings table.
|
|
void | execute (const std::string &query) override |
| Execute a query without reading its results.
|
|
void | explain (const std::string &query, FILE *out) override |
| Format and print the EXPLAIN output for the query to the given file.
|
|
void | drop_table_if_exists (const char *name) |
| Delete a table in the database if it exists, otherwise do nothing.
|
|
int | get_last_insert_id () |
| Return LAST_INSERT_ID or LAST_INSER_ROWID or whatever is appropriate for the current database, if supported.
|
|
const std::string & | get_url () const |
|
virtual std::unique_ptr< Transaction > | transaction (bool readonly=false)=0 |
| Begin a transaction.
|
|
virtual bool | has_table (const std::string &name)=0 |
| Check if the database contains a table.
|
|
virtual std::string | get_setting (const std::string &key)=0 |
| Get a value from the settings table.
|
|
virtual void | set_setting (const std::string &key, const std::string &value)=0 |
| Set a value in the settings table.
|
|
virtual void | drop_settings ()=0 |
| Drop the settings table.
|
|
virtual void | add_datetime (Querybuf &qb, const Datetime &dt) const |
| Format a datetime and add it to the querybuf.
|
|
virtual void | execute (const std::string &query)=0 |
| Execute a query without reading its results.
|
|
virtual void | explain (const std::string &query, FILE *out)=0 |
| Format and print the EXPLAIN output for the query to the given file.
|
|