Fix the connection pool example #98
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
sqlpp::compat::make_unique, replaced it with std::make_unique.debugproperty set tofalse, 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 aliassqlpp23::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.