Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2024-03-26 01:02:53


Klemens Morgenstern wrote:
> > We have our own wrappers (plural), and even code based on Fusion (used
> > in tests only) that I got here, which would probably be much nicer using
> more modern C++ techniques. Integration with PFR or Describe would also be
> pluses.
>
> I thought about doing that, but it's unclear to me how. Mapping a struct to a
> table seems intuitive, but then how do I handle anything select other than `*` ?

In the usual manner? The rows of `SELECT x, y FROM ...` can be retrieved as

struct R
{
    int x;
    std::string y;
};

BOOST_DESCRIBE_STRUCT(R, (), (x, y))


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk