From 5daaa1a6d9c8f5d3a4ad3d7009df564bc6506424 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sat, 6 Nov 2010 18:00:43 +0200 Subject: Add support for container persistence Generalize statements that were used for persisting objects to work for both objects and containers. Implement a cache for container statements. --- odb/mysql/connection.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'odb/mysql/connection.cxx') diff --git a/odb/mysql/connection.cxx b/odb/mysql/connection.cxx index 3c17869..0b38d35 100644 --- a/odb/mysql/connection.cxx +++ b/odb/mysql/connection.cxx @@ -3,11 +3,12 @@ // copyright : Copyright (c) 2005-2010 Code Synthesis Tools CC // license : GNU GPL v2; see accompanying LICENSE file -#include // std::bad_alloc +#include // std::bad_alloc #include #include #include +#include using namespace std; @@ -17,7 +18,9 @@ namespace odb { connection:: connection (database& db) - : handle_ (&mysql_), active_ (0), statement_cache_ (*this) + : handle_ (&mysql_), + active_ (0), + statement_cache_ (new statement_cache_type (*this)) { if (mysql_init (handle_) == 0) throw bad_alloc (); -- cgit v1.1