aboutsummaryrefslogtreecommitdiff
path: root/odb/mysql/connection.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'odb/mysql/connection.hxx')
-rw-r--r--odb/mysql/connection.hxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/odb/mysql/connection.hxx b/odb/mysql/connection.hxx
index 16d3438..89103c7 100644
--- a/odb/mysql/connection.hxx
+++ b/odb/mysql/connection.hxx
@@ -94,6 +94,15 @@ namespace odb
free_stmt_handles ();
}
+ // Cancel and clear the active statement, if any.
+ //
+ void
+ clear ()
+ {
+ if (active_ != 0)
+ clear_ ();
+ }
+
public:
MYSQL_STMT*
alloc_stmt_handle ();
@@ -109,6 +118,9 @@ namespace odb
void
free_stmt_handles ();
+ void
+ clear_ ();
+
private:
database_type& db_;
bool failed_;