Boost logo

Boost :

Subject: Re: [boost] SQL: next iteration of sqlpp11
From: Johan Baltié (johan.baltie_at_[hidden])
Date: 2014-02-03 16:25:18

On Mon, Feb 3, 2014 at 7:02 PM, Roland Bock <rbock_at_[hidden]> wrote:

> On 2014-02-03 18:36, Johan Baltié wrote:
> > On Mon, Feb 3, 2014 at 6:27 PM, Roland Bock <rbock_at_[hidden]> wrote:
> >> On 2014-02-03 18:22, Johan Baltié wrote:
> > What bother me is that you can have quite easily inconsistent behaviors.
> > You retrieve values and you work with them in a select, you have no
> warning
> > that a null value was encountered but you have no result or worse the
> wrong
> > ones...
> >
> > It should not be the default behavior.
> >
> The behavior could be defined via the value_type as Bjorn suggested in
> his post. But as soon as there is an outer join for instance, there
> could be NULL values all over the place.
> As stated in my reply to Edward, it is tough to impossible to determine
> exactly which columns in a result set could be NULL, if the query
> structure is not fully known at compile time. Would you want to turn
> everything into a boost::optional then?

Yes. It seems the safer way to me.

If an user doesn't like optionals he can add something to the statement so
that he gets non optional types and an exception if a NULL occurs. I do not
know if it is a good design idea, but throwing an exception when you've
asserted that you do not wan't NULL does not seems stupid.

BTW it seems quite promising and interesting, sorry to hear it cannot be
build under MSVC.
Do you have some benchmark against "native" drivers ?


Boost list run by bdawes at, gregod at, cpdaniel at, john at