Boost logo

Boost :

Subject: Re: [boost] Boost library submission (poll for interest)
From: mbiddeg_at_[hidden]
Date: 2010-01-14 06:35:48


>From an exception safety POV: What happens if db.commit(txn) is never called
here? The raw Transaction pointer raises my hackles immediately.

Why not just use:

std::unique_ptr<Transaction> txn(db.beginTransaction());
    {
        ...
    }
db.commit(*txn); //db.commit(txn.get());//

______________________________________________________________________

Kizza George Mbidde
Interconnect Billing Systems Analyst
IT
cell: +256 77 212 0982
email: mbiddeg_at_[hidden]

-----Original Message-----
From: boost-bounces_at_[hidden] [mailto:boost-bounces_at_[hidden]] On Behalf Of Brian Ravnsgaard Riis
Sent: January 14, 2010 03:50
To: boost_at_[hidden]
Subject: Re: [boost] Boost library submission (poll for interest)

Bob Walters <bob.s.walters <at> gmail.com> writes:

>
> I have a library I would like to submit for inclusion in Boost. This
> message is just soliciting for interest per the submission process.
> If interest is expressed, I'll carry on with a preliminary submission.

[snip]

Sorry for coming late to the discussion. Been out of touch (and without
internet) for quite a while. Anyway...

Let it be said now that I know very little about the internals of DBs of any
kind really, so I've skimmed your docs as a potential user. I am really rather
excited about the prospects here; I've been looking for a "database engine" for
C++ for some time, but so far just managed with SQLite (which is not intended as
criticism in any way).

One thing that immediately jumped at me, though, is this construct:

    Transaction *txn = db.beginTransaction();
    {
        ...
    }
    db.commit(txn);

>From an exception safety POV: What happens if db.commit(txn) is never called
here? The raw Transaction pointer raises my hackles immediately. Blame it on
Stroustrup and Meyers! :-) Am I missing something here?

As an aside, the quick start guide seems rather longish to accomplish very
little, but as you have to go around the Boost.Interprocess part that is
probably unavoidable (and you *do* have to go around that part, I think).

>
> Let me know if there's any interest, and I'll work on a preliminary
> submission for the sandbox.

Consider me interested! :-)

 /Brian Riis

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk