On Wed, Mar 10, 2021 at 4:35 PM Richard Hodges via Boost < boost@lists.boost.org> wrote:
On Wed, 10 Mar 2021 at 16:16, Niall Douglas via Boost < boost@lists.boost.org>
I am not warm on the use of variants in this situation. In almost all applications, "1", 1 and true all mean the same thing.
I couldn't disagree more. This is not Javascript land, this is strongly-typed C++. A low-level DB network protocol implementation should provide a 100% accurate view of the data returned by the DB. Your "1", 1, true "equivalence" above can be made on top of an low-level fully accurate type system. That's not to say I'm against the variant approach, IFF the original type returned by the DB can still be known. I.e. I must be able to recast (in my own code, independently of Ruben's API) that 64-bit int into the appropriate 1, 2, 4, or 8 byte integer if I need to. Which implies there's a way to get that DB-original type. But we're getting ahead of ourselves here, no? I support a review of proposed Boost.MySQL. Even though, as stated in the past, I only care of Boost.PostgreSQL myself, unfortunately... --DD