SOCI/soci

How to get a blob value from a row

Krzmbrzl opened this issue · 1 comments

Suppose I have selected into a soci::row and have queried my entry of choice to be of type soci::dt_blob. As what type may I get that value via row.get< ... >(3)? As a soci::blob? If so, I can't get this to compile because

soci::blob blob = row.get< soci::blob >(3)

would invoke the copy-ctor, which is deleted for blobs.

I have figured it out myself: The data is stored in a std::string and must be queried as such:

std::string data = row.get< std::string >(3);