|
Boost : |
From: Ruben Perez (rubenperez038_at_[hidden])
Date: 2022-05-18 10:16:30
> clearly all Basic types
>
> TEXT NULL <-> std::optional<std::string>
> BasicType NULL <-> std::optional<BasicType>
When we do https://github.com/anarthal/mysql/issues/60
we will have those mappings. Nullable types correspond to
optionals, surely. We will allow boost::optional, too.
> > I can see something like fetch_copy, as a generalization of
> > resultset::read_many.
> > Other users have also brought it up.
> > https://github.com/anarthal/mysql/issues/58 tracks it.
> > It can be extended to work with tuples or structs.
>
> don't forget the ability to read cursor/stream based and allow breaking
> the read beforehand
>
> therefor im having this callable lambda that allows to end reading based
> on runtime decision
The trouble here is that when calling connection::query, MySQL sends
all the results beforehand. So you will have to read those packets even
if you want to discard them; otherwise, you won't be able to use the
connection further.
Prepared statements allow fetching a limited number of rows, using
cursors. This is not implemented yet, and is tracked by
https://github.com/anarthal/mysql/issues/20. Even in this case,
you have to manually ask the server "I want 5 rows", and you will
have to read those 5 rows before going further.
Regards,
Ruben.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk