refactored result that an overload for void doesn't need to exist
This commit is contained in:
@@ -37,7 +37,8 @@ void QueryFixture::check_table_not_exists(const std::string &table_name) const {
|
||||
}
|
||||
|
||||
void QueryFixture::drop_table_if_exists(const std::string &table_name) const {
|
||||
const auto result = db.exists(table_name).and_then([&table_name, this](const bool exists) {
|
||||
const auto result = db.exists(table_name)
|
||||
.and_then([&table_name, this](const bool exists) -> utils::result<bool, utils::error> {
|
||||
if (exists) {
|
||||
auto res = query::drop()
|
||||
.table(table_name)
|
||||
|
||||
Reference in New Issue
Block a user