From bde4f5c3bddb437c5238bcb6dd2311bc57600ef1 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sun, 21 Aug 2011 16:27:34 +0200 Subject: Add odb::connection class This abstract class represents a connection to the database. One can use it to start a transaction or to execute a native statement out of a transaction. Before we had concrete connection classes in the database runtime libraries (e.g., odb::mysql::connection). Now these classes derive from odb::connection. --- odb/tracer/database.hxx | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'odb/tracer/database.hxx') diff --git a/odb/tracer/database.hxx b/odb/tracer/database.hxx index 7210681..2468583 100644 --- a/odb/tracer/database.hxx +++ b/odb/tracer/database.hxx @@ -9,8 +9,9 @@ #include #include -#include +#include +#include #include namespace odb @@ -20,14 +21,20 @@ namespace odb class LIBODB_TRACER_EXPORT database: public odb::database { public: + typedef tracer::connection connection_type; + virtual ~database (); - virtual unsigned long long - execute (const char* statement, std::size_t length); - - virtual transaction_impl* + transaction_impl* begin (); + + connection_ptr + connection (); + + protected: + virtual odb::connection* + connection_ (); }; } } -- cgit v1.1