aboutsummaryrefslogtreecommitdiff
path: root/odb/sqlite/connection.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-03-24 14:02:16 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-03-24 14:02:16 +0200
commit7939f7972cf22ee9a74518978e4f7d4d77535e09 (patch)
treeb211e2f455ef717482370fc262a63a5f7bfeb77f /odb/sqlite/connection.hxx
parent01e70d9a1d49bcb126adc45f85168aa7c9cbad19 (diff)
Add support for clearing connection from active and uncached statements
Diffstat (limited to 'odb/sqlite/connection.hxx')
-rw-r--r--odb/sqlite/connection.hxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/odb/sqlite/connection.hxx b/odb/sqlite/connection.hxx
index 0df08b3..5390609 100644
--- a/odb/sqlite/connection.hxx
+++ b/odb/sqlite/connection.hxx
@@ -23,6 +23,7 @@ namespace odb
{
namespace sqlite
{
+ class statement;
class statement_cache;
class LIBODB_SQLITE_EXPORT connection: public details::shared_base
@@ -55,14 +56,27 @@ namespace odb
return *statement_cache_;
}
+ public:
+ // Reset active and finalize uncached statements.
+ //
+ void
+ clear ();
+
private:
connection (const connection&);
connection& operator= (const connection&);
private:
+ friend class statement;
+
database_type& db_;
sqlite3* handle_;
+ // Linked list of active and uncached statements currently associated
+ // with this connection.
+ //
+ statement* statements_;
+
std::auto_ptr<statement_cache_type> statement_cache_;
};
}