On 12 April 2013 16:16, Bruce Adams <[email protected]> wrote:
> Thanks in part to my prompting the the author of DTL has posted in
> regard to n3612
>
> https://groups.google.com/a/isocpp.org/forum/#!topic/std-proposals/iqOtgxP_IRA

Thanks for that. The whole discussion is very interesting.
I will yet see, but despite I am subscribed to that mailing list,
it is unlikely I will have time to dive into it myself, unfortunately.

> One of the attractions of DTLs approach for me is illustrated by the example
> of how to dump an entire table:

> DynamicDBView<> view("DB_EXAMPLE", "*");
> copy(view.begin(), view.end(), ostream_iterator<variant_row>(cout, "\n"));
>
> I never worked out if it was possible to be quite so elegant in SOCI. Is it?

Yes, fancy :-)

>From the docs:

rowset<std::string> rs = (sql.prepare << "select firstname from person");
std::copy(rs.begin(), rs.end(),
std::ostream_iterator<std::string>(std::cout, "\n"));

change to rowset<row> and make row streamable.

Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
soci-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/soci-users

Reply via email to