mirror of
https://github.com/rbock/sqlpp11.git
synced 2024-11-15 20:31:16 +08:00
Cleaned up start_transaction overloads
This commit is contained in:
parent
c92571862d
commit
b51714eb48
@ -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)
|
||||||
{
|
{
|
||||||
|
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user