Skip to content

Conversation

@MeanSquaredError
Copy link
Contributor

While investigating the issue reported in #97, I came across unrelated issues in the connection_pool example. Basically the code in the example was not ported from sqlpp11 to sqlpp23, so it failed to compile. This PR fixes two minor issues:

  • The example code was trying to use sqlpp::compat::make_unique, replaced it with std::make_unique.
  • The connector config had its debug property set to false, which is no longer valid in sqlpp23, so I just removed the offending line, since logging is disabled by default, anyway.

Additionally the example CMakeLists.txt was not adding sqlpp23::core (or its alias sqlpp23::sqlpp23) as target dependencies. While it was not preventing the compile, I added the dependency explicitly.

After the changes, the example compiles correctly with the installed sqlpp23.

On a side note: I've been thinking for a while that this connection pool example should really be moved to the tests directory, in the recipes subdirectory, pretty much like the optimistic locking and the other recipes. However I've been postponing that move, because it will just make worse the AppVeyor issue.

@rbock
Copy link
Owner

rbock commented Jan 31, 2026

Thanks for cleaning this up!

I think it is OK to move this to the recipes. The AppVeyor timeout pressure seems a bit relaxed after I combined a couple of test files a while ago.

@rbock rbock merged commit 4335893 into rbock:main Jan 31, 2026
1 check passed
@MeanSquaredError
Copy link
Contributor Author

I think it is OK to move this to the recipes.

OK, great! In the next few days I will prepare the PR. As usual the biggest challenge is writing the accompanying text documentation that explains what is going on in the code :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants