diff options
Diffstat (limited to 'odb/tracer/connection.cxx')
-rw-r--r-- | odb/tracer/connection.cxx | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/odb/tracer/connection.cxx b/odb/tracer/connection.cxx new file mode 100644 index 0000000..516e36a --- /dev/null +++ b/odb/tracer/connection.cxx @@ -0,0 +1,37 @@ +// file : odb/tracer/connection.cxx +// author : Boris Kolpackov <boris@codesynthesis.com> +// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC +// license : GNU GPL v2; see accompanying LICENSE file + +#include <odb/transaction.hxx> + +#include <odb/tracer/database.hxx> +#include <odb/tracer/connection.hxx> + +namespace odb +{ + namespace tracer + { + connection:: + connection (database_type& db) + : odb::connection (db) + { + } + + unsigned long long connection:: + execute (const char*, std::size_t) + { + return 0; + } + + transaction_impl* connection:: + begin () + { + if (odb::transaction::has_current ()) + throw already_in_transaction (); + + return new transaction_impl ( + connection_ptr (inc_ref (this))); + } + } +} |