diff options
Diffstat (limited to 'odb/pgsql/object-statements.hxx')
-rw-r--r-- | odb/pgsql/object-statements.hxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/odb/pgsql/object-statements.hxx b/odb/pgsql/object-statements.hxx index 32ea24b..ca5aecd 100644 --- a/odb/pgsql/object-statements.hxx +++ b/odb/pgsql/object-statements.hxx @@ -74,6 +74,22 @@ namespace odb { } + struct auto_unlock + { + // Unlocks the statement on construction and re-locks it on + // destruction. + // + auto_unlock (object_statements_base&); + ~auto_unlock (); + + private: + auto_unlock (const auto_unlock&); + auto_unlock& operator= (const auto_unlock&); + + private: + object_statements_base& s_; + }; + protected: connection_type& conn_; bool locked_; |