From b51714eb48b7412f0d89aa38aa35212e5bfda0bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Volker=20A=C3=9Fmann?= Date: Thu, 1 Jun 2017 23:18:15 +0200 Subject: [PATCH] Cleaned up start_transaction overloads --- include/sqlpp11/transaction.h | 9 +-------- tests/Select.cpp | 2 +- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/include/sqlpp11/transaction.h b/include/sqlpp11/transaction.h index 0ca3073f..30580a26 100644 --- a/include/sqlpp11/transaction.h +++ b/include/sqlpp11/transaction.h @@ -100,18 +100,11 @@ namespace sqlpp }; template - transaction_t start_transaction(Db& db, bool report_unfinished_transaction) + transaction_t start_transaction(Db& db, bool report_unfinished_transaction = report_auto_rollback) { return {db, report_unfinished_transaction}; } - template - transaction_t start_transaction(Db& db, bool report_unfinished_transaction = report_auto_rollback, - isolation_level isolation = isolation_level::undefined) - { - return {db, report_unfinished_transaction, isolation}; - } - template transaction_t start_transaction(Db& db, isolation_level isolation, bool report_unfinished_transaction = report_auto_rollback) { diff --git a/tests/Select.cpp b/tests/Select.cpp index da5a63eb..78b1daca 100644 --- a/tests/Select.cpp +++ b/tests/Select.cpp @@ -183,7 +183,7 @@ int Select(int, char* []) for_each_field(row, to_cerr{}); } - auto transaction = start_transaction(db, sqlpp::report_auto_rollback, sqlpp::isolation_level::read_committed); + auto transaction = start_transaction(db, sqlpp::isolation_level::read_committed); std::cout << (db._current_isolation_level == sqlpp::isolation_level::read_committed) << std::endl; return 0;