Kea 2.7.5
|
MySQL Handle Holder. More...
#include <mysql_connection.h>
Public Member Functions | |
MySqlHolder () | |
Constructor. | |
~MySqlHolder () | |
Destructor. | |
operator MYSQL * () const | |
Conversion Operator. | |
MySQL Handle Holder.
Small RAII object for safer initialization, will close the database connection upon destruction. This means that if an exception is thrown during database initialization, resources allocated to the database are guaranteed to be freed.
It makes no sense to copy an object of this class. After the copy, both objects would contain pointers to the same MySql context object. The destruction of one would invalid the context in the remaining object. For this reason, the class is declared noncopyable.
Definition at line 132 of file mysql_connection.h.
|
inline |
Constructor.
Initialize MySql and store the associated context object.
DbOpenError | Unable to initialize MySql handle. |
Definition at line 140 of file mysql_connection.h.
References isc_throw.
|
inline |
Destructor.
Frees up resources allocated by the initialization of MySql.
Definition at line 149 of file mysql_connection.h.
|
inline |
Conversion Operator.
Allows the MySqlHolder object to be passed as the context argument to mysql_xxx functions.
Definition at line 159 of file mysql_connection.h.