From a22d1206d3317a1afad35e93c21a566d3952d986 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 20 Jul 2010 11:03:51 +0200 Subject: Get rid of the session mechanism for now Add low-level API instead. --- odb/mysql/database.cxx | 15 +-------------- odb/mysql/database.hxx | 3 --- odb/mysql/transaction-impl.cxx | 10 ---------- odb/mysql/transaction-impl.hxx | 1 - 4 files changed, 1 insertion(+), 28 deletions(-) diff --git a/odb/mysql/database.cxx b/odb/mysql/database.cxx index 7902bcf..8ad4bd3 100644 --- a/odb/mysql/database.cxx +++ b/odb/mysql/database.cxx @@ -3,7 +3,6 @@ // copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC // license : GNU GPL v2; see accompanying LICENSE file -#include #include #include @@ -156,19 +155,7 @@ namespace odb if (odb::transaction::has_current ()) throw already_in_transaction (); - if (session::has_current ()) - return new transaction_impl (*this, session::current ()); - else - return new transaction_impl (*this); - } - - transaction_impl* database:: - begin_transaction (session& s) - { - if (odb::transaction::has_current ()) - throw already_in_transaction (); - - return new transaction_impl (*this, s); + return new transaction_impl (*this); } } } diff --git a/odb/mysql/database.hxx b/odb/mysql/database.hxx index be939a7..4263baa 100644 --- a/odb/mysql/database.hxx +++ b/odb/mysql/database.hxx @@ -129,9 +129,6 @@ namespace odb virtual transaction_impl* begin_transaction (); - virtual transaction_impl* - begin_transaction (session&); - public: shared_ptr connection (); diff --git a/odb/mysql/transaction-impl.cxx b/odb/mysql/transaction-impl.cxx index fde19de..7b47c30 100644 --- a/odb/mysql/transaction-impl.cxx +++ b/odb/mysql/transaction-impl.cxx @@ -25,16 +25,6 @@ namespace odb } transaction_impl:: - transaction_impl (database_type& db, session_type& s) - : odb::transaction_impl (db, s), connection_ (db.connection ()) - { - MYSQL* h (connection_->handle ()); - - if (mysql_real_query (h, "begin", 5) != 0) - throw database_exception (h); - } - - transaction_impl:: ~transaction_impl () { } diff --git a/odb/mysql/transaction-impl.hxx b/odb/mysql/transaction-impl.hxx index 1e611b8..9ac826f 100644 --- a/odb/mysql/transaction-impl.hxx +++ b/odb/mysql/transaction-impl.hxx @@ -25,7 +25,6 @@ namespace odb typedef mysql::connection connection_type; transaction_impl (database_type&); - transaction_impl (database_type&, session_type&); virtual ~transaction_impl (); -- cgit v1.1