On Tue, 7 Apr 2020 at 20:43, Ruben Perez via Boost
On Fri, 3 Apr 2020 at 21:04, Mateusz Loskot via Boost
wrote: On Fri, 3 Apr 2020 at 20:41, Jeff Garland via Boost
wrote: FYI, I mentioned SOCI in https://lists.boost.org/Archives/boost/2020/03/248307.php
Apologies, that is true. I have had a quick look into SOCI, and I think the aim is quite different than in MySQL-Asio. SOCI has an impressive support for a lot of backends but does not support (to my knowledge) asynchronous operations (it actually employs the official MySQL C library, which does not implement it).
Yes, correct, it does not offer async operations.
My aim was not to provide a universal DB connector, but to provide an implementation interoperable with Boost.Asio that supports the universal async model (callbacks, coroutines and futures).
It's an interesting approach.
There is actually this mailing thread about async operations in SOCI: https://sourceforge.net/p/soci/mailman/message/20352440/. It mentions here that implementing async functionality in SOCI is difficult because the underlying backends don't support it (including the MySQL one).
SOCI approach is a mediator as a functional common denominator where SQL text is the only differentiating aspect visible to a user. The role of SQL text in SOCI is also what distinguishes it from approaches like Roland Bock's sqlpp11.
Another, thin, approach to binding some types can be found in https://github.com/nanodbc/nanodbc
I see this supports async operations, but not with Asio (seems more C-like).
It is just a very thin wrapper for ODBC API. Best regards, -- Mateusz Loskot, http://mateusz.loskot.net