11 #ifndef _MARIADB_CONNECTION_HPP_ 12 #define _MARIADB_CONNECTION_HPP_ 173 bool consistent_snapshot =
true);
transaction_ref create_transaction(isolation::level level=isolation::repeatable_read, bool consistent_snapshot=true)
Create a transaction.
bool set_schema(const std::string &schema)
Sets the schema (database name).
std::shared_ptr< transaction > transaction_ref
std::shared_ptr< result_set > result_set_ref
std::shared_ptr< account > account_ref
Class representing a SQL transaction having automatic rollback functionality.
void disconnect()
Disconnects from the database.
result_set_ref query(const std::string &query)
Execute a query with an result (if no result is returned, the result_set will be empty).
Class used to store account and connection information used by mariadb::connection when connecting...
Class used to represent a MariaDB savepoint having automatic rollback functionality.
u64 insert(const std::string &query)
Execute a query (usually, but not limited to INSERT) with interest for the last row id...
virtual ~connection()
Destroys connection and automatically disconnects.
bool connected() const
Indicates whether the connection is active.
account_ref account() const
Gets the account associated with this connection.
bool connect()
Actually connects to the database using given account, sets SSL and additional options as well as aut...
Class representing a prepared statement with binding functionality.
static connection_ref create(const account_ref &account)
Creates a new connection using the given account.
bool set_auto_commit(bool auto_commit)
Sets the auto_commit setting.
Wraps a Database connection.
u64 execute(const std::string &query)
Execute a query without interest in a result.
bool set_charset(const std::string &value)
Sets the charset.
bool auto_commit() const
Gets the status of the auto_commit setting.
std::shared_ptr< connection > connection_ref
connection(const account_ref &account)
Private constructor used to create a connection with the given account.
const std::string & charset() const
Gets the charset associated with this connection.
Class used to store query and statement results.
std::shared_ptr< statement > statement_ref
const std::string & schema() const
Gets the schema (database name)
statement_ref create_statement(const std::string &query)
Create a prepared statement.