libpqxx 7.0.2: Small new features.
Here's a new libpqxx release. It's versioned like a bugfix update, but actually it adds a few small features:
- New
query_value
method makes it easy to query a single value, and convert it to a given type in one go. - You can now iterate a
stream_from
stream. This may become very important. - More callable types qualify as transactors, thanks to
std::invoke
.
Why is iterating streams important? Because I'm currently testing a whole new way of querying data based on it. We're talking about streaming typed data straight from a database query.
If this pans out, expect a 7.1 release very soon. Early testing suggests that the new trick will be faster, easier to read, type-safe, and convenient. Of course there's a cost: your query may fail halfway through, after you've already begun processing data; and if it does, you'll just need to discard the entire connection and start over. Is that worth it? You will still have the choice to work either way.