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
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?
>________________________________
> From: Mateusz Loskot <[email protected]>
>To: SOCI general discussion list <[email protected]>
>Sent: Thursday, April 4, 2013 10:33 AM
>Subject: Re: [soci-users] The next three big things
>
>
>On 29 March 2013 09:59, Alex Ott <[email protected]> wrote:
>>
>> Regarding error handling - it would be nice to have some common set of
>> error codes (enum?) propagated together with exception
>
>I think it's a good idea to to try to unify errors.
>
>> - in my app I
>> don't know which database will be supported until runtime (I link only
>> core, and modules are loaded dynamically), so I can't link specific DB
>> modules to get DB-specific exceptions.
>
>I have overlooked this very good point. Likely, because I don't use
>dynamically loaded backends myself.
>
>I was hoping the paper linked by Sergei [1] would suggest a neat
>solution, but it only states what we already know:
>"it is not trivial to implement, as there exists a database state this is
>coupled with but separate from the application state".
>
>[1] http://isocpp.org/files/papers/n3612.pdf
>
>I haven't given lots of thoughts on how to improve exceptions in SOCI.
>Briefly, I see several approaches:
>1) never carry database session state in exception object, but compose
>complete exception before throwing
>2) carry database state, i.e. SOCI backend
>
>I also wonder if we could learn a lesson from C++11 features like
>std::error_category and std::error_code to model SOCI errors.
>If we don't switch to C++11 for SOCI 4, we could use Boost.System.
>
>Thoughts?
>
>Best regards,
>--
>Mateusz Loskot, http://mateusz.loskot.net
>
>------------------------------------------------------------------------------
>Minimize network downtime and maximize team effectiveness.
>Reduce network management and security costs.Learn how to hire
>the most talented Cisco Certified professionals. Visit the
>Employer Resources Portal
>http://www.cisco.com/web/learning/employer_resources/index.html
>_______________________________________________
>soci-users mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/soci-users
>
>
>------------------------------------------------------------------------------
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