DDBI on the road again

As have already been noted on D.announce, I have started committing new code to DDBI. The task at hand is to refine the interfaces, make it easier to use where possible, and use as little resources as possible (this isn't necessarily easy given that fetched data need to stay in memory somewhere).

I have committed some new interfaces in dbi/model/ and implemented those (mostly at least) for mysql. SQLite will be the next to be added, and after that maybe PostgreSQL. I expect to have to rely on contributions for anything beyond that.

If you have any thoughts on the work I've been doing, please contact me. My current thoughts involve adding multi statement/multi result support (thanks BCS), make sure optional allocators can be used properly (and in all places applicable), how to best fetch results and error handling.

The latter came up as a question from Aaron who's fork I have gleaned at quite a bit - exceptions vs error codes. My opinion is (without hearing much of argumentation yet) that error codes shouldn't be used for error handling when Exceptions are available. However, there may be a question about whether errors reported from the DBMS always are exceptional problems, or if they may be trivial issues better handled outside of try/catch. I believe that normally, provoking an error in the DBMS means either a bug in your application, or an exceptional problem, which in any case warrants an exception. The main reason I'm not too eager to jump on to the error code bandwagon, is that it would make a need to distinguish between what is exceptional and what isn't. I didn't agree with the first example I heard, for instance :)

Reply

Please solve the math problem above and type in the result. e.g. for 1+1, type 2
The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <center><img><a> <em> <strong> <cite> <code> <blockcode> <ul> <ol> <li> <dl> <dt> <dd><br><script> <pre>
  • Lines and paragraphs break automatically.
  • You may post block code using <blockcode [type="language"]>...</blockcode> tags.
More information about formatting options