0
0
mirror of https://github.com/rbock/sqlpp11.git synced 2024-11-16 04:47:18 +08:00

Cleaned up start_transaction overloads

This commit is contained in:
Volker Aßmann 2017-06-01 23:18:15 +02:00
parent c92571862d
commit b51714eb48
2 changed files with 2 additions and 9 deletions

View File

@ -100,18 +100,11 @@ namespace sqlpp
}; };
template <typename Db> template <typename Db>
transaction_t<Db> start_transaction(Db& db, bool report_unfinished_transaction) transaction_t<Db> start_transaction(Db& db, bool report_unfinished_transaction = report_auto_rollback)
{ {
return {db, report_unfinished_transaction}; return {db, report_unfinished_transaction};
} }
template <typename Db>
transaction_t<Db> start_transaction(Db& db, bool report_unfinished_transaction = report_auto_rollback,
isolation_level isolation = isolation_level::undefined)
{
return {db, report_unfinished_transaction, isolation};
}
template <typename Db> template <typename Db>
transaction_t<Db> start_transaction(Db& db, isolation_level isolation, bool report_unfinished_transaction = report_auto_rollback) transaction_t<Db> start_transaction(Db& db, isolation_level isolation, bool report_unfinished_transaction = report_auto_rollback)
{ {

View File

@ -183,7 +183,7 @@ int Select(int, char* [])
for_each_field(row, to_cerr{}); 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; std::cout << (db._current_isolation_level == sqlpp::isolation_level::read_committed) << std::endl;
return 0; return 0;