Closed emmenlau closed 3 years ago
That depends on what traits you are using. In general there are now the following class templates and type aliases:
basic_connection_pool< Traits >
connection_pool
(aka basic_connection_pool< parameter_text_traits >
)bconnection_pool
(aka basic_connection_pool< parameter_binary_traits >
)basic_connection< Traits >
connection
(aka basic_connection< parameter_text_traits >
)bconnection
(aka basic_connection< parameter_binary_traits >
)transaction< Traits >
This is a result of implementing #18. The preferred style of using transactions (and mostly everything else) is therefore, as you noticed, simply using auto
.
Also note that the above, e.g. the recent changes, only affect the handling of the parameters. There are currently no traits for treating the results in similar ways. This is even more work and there are a few problem due to the libqp API and I currently have no time to work on that. And yes, I need to update the documentation.
For future reference: The changes I described in my previous comment have been reverted. Please refer to the documentation for a proper description of the API.
I've just updated to latest master branch, and found that the following code does not compile anymore:
It seems that the transaction class now uses template arguments. I've checked the docs, but its not explicitly mentioned, and in the code I find now mostly this kind of usage:
const auto tr = conn->transaction();
.Could you kindly help what the template arguments for transaction are?