summaryrefslogtreecommitdiff
path: root/odb/mysql/statement.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-08-30 16:10:02 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-08-30 16:10:02 +0200
commit3f64781802deb7f910a37e3998cfc358b65e24e9 (patch)
treea233fb0387c35149cc5d72965db730b531822580 /odb/mysql/statement.hxx
parent19109c06566ecc1b2a42820145c784d12ad26b27 (diff)
Implement uniform handle management across all databases
Also use the auto_handle template instead of the raw handle in connection, statement, and result classes. This removes a lot of brittle "exception safety guarantee" code that we had in those classes.
Diffstat (limited to 'odb/mysql/statement.hxx')
-rw-r--r--odb/mysql/statement.hxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/odb/mysql/statement.hxx b/odb/mysql/statement.hxx
index 06df6bc..7cc1e1f 100644
--- a/odb/mysql/statement.hxx
+++ b/odb/mysql/statement.hxx
@@ -12,12 +12,12 @@
#include <cstddef> // std::size_t
#include <odb/forward.hxx>
+#include <odb/details/shared-ptr.hxx>
#include <odb/mysql/mysql.hxx>
#include <odb/mysql/version.hxx>
#include <odb/mysql/binding.hxx>
-
-#include <odb/details/shared-ptr.hxx>
+#include <odb/mysql/auto-handle.hxx>
#include <odb/mysql/details/export.hxx>
@@ -44,7 +44,7 @@ namespace odb
protected:
connection& conn_;
- MYSQL_STMT* stmt_;
+ auto_handle<MYSQL_STMT> stmt_;
};
class LIBODB_MYSQL_EXPORT select_statement: public statement