connection info in connection pool progress
This commit is contained in:
@@ -459,10 +459,10 @@ TEST_CASE_METHOD(QueryFixture, "Select statement with many to many relationship"
|
||||
{ 9, 3 }
|
||||
};
|
||||
|
||||
for (const auto &ri: recipe_ingredients) {
|
||||
for (const auto & [recipe_id, ingredient_id]: recipe_ingredients) {
|
||||
res = query::insert()
|
||||
.into("recipe_ingredients", column_generator::generate(repo, "recipe_ingredients", true))
|
||||
.values({ri.first, ri.second})
|
||||
.values({recipe_id, ingredient_id})
|
||||
.execute(db);
|
||||
REQUIRE(res.is_ok());
|
||||
REQUIRE(*res == 1);
|
||||
|
||||
@@ -11,9 +11,8 @@ sql::connection_impl *test_backend_service::create(const sql::connection_info &i
|
||||
return noop_connections_.insert(std::make_unique<test_connection>(info)).first->get();
|
||||
}
|
||||
|
||||
void test_backend_service::destroy(sql::connection_impl *impl)
|
||||
{
|
||||
auto it = std::find_if(noop_connections_.begin(), noop_connections_.end(), [impl](const auto &item) {
|
||||
void test_backend_service::destroy(sql::connection_impl *impl) {
|
||||
const auto it = std::find_if(noop_connections_.begin(), noop_connections_.end(), [impl](const auto &item) {
|
||||
return impl == item.get();
|
||||
});
|
||||
if (it != noop_connections_.end()) {
|
||||
@@ -21,8 +20,7 @@ void test_backend_service::destroy(sql::connection_impl *impl)
|
||||
}
|
||||
}
|
||||
|
||||
const sql::dialect *test_backend_service::dialect() const
|
||||
{
|
||||
const sql::dialect *test_backend_service::dialect() const {
|
||||
static sql::dialect dialect_ = sql::dialect_builder::builder()
|
||||
.create()
|
||||
.build();
|
||||
|
||||
@@ -19,6 +19,7 @@ test_connection::test_connection(const sql::connection_info &info)
|
||||
|
||||
utils::result<void, utils::error> test_connection::open() {
|
||||
is_open_ = true;
|
||||
const auto user = info().user;
|
||||
return utils::ok<void>();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user