Boost logo

Boost :

Subject: Re: [boost] SQL: next iteration of sqlpp11
From: Roland Bock (rbock_at_[hidden])
Date: 2014-02-05 13:22:04


On 2014-02-05 18:22, Rodrigo Madera wrote:
> On Wed, Feb 5, 2014 at 3:16 PM, Roland Bock <rbock_at_[hidden]> wrote:
>
>> If someone writes an sqlpp11-connector for SOCI, the connector will
>> depend on both SOCI and sqlpp11. But neither sqlpp11 nor SOCI will
>> depend on the connector or each other. That is one of the beauties of
>> the approach :-)
>>
> But wouldn't that duplicate work?
>
> For instance, SOCI has an Oracle backend. If sqlpp uses SOCI as a backend,
> it would have support for Oracle, and all other RDBMs for that matter.
>
> But if sqlpp has a other connectors bypassing SOCI, then what is the
> advantage? Would sqlpp have direct Oracle connectors besides SOCI's?
>
> If so, I begin to question the usefulness of integrating sqlpp with SOCI.
OK, very, very short recap:
sqlpp11 is a frontend which does not depend on any specific backend.
sqlpp11 is totally vendor-agnostic. It creates expression trees that can
easily interpreted by the connector/backend. During this interpretation
all the vendor specific stuff is taken care of.
Similarly with select results, sqlpp11 provides a unified way of
accessing and interpreting results. The connector/backend feed the
values into the structure.

Connectors are not part sqlpp11. They are specific for one or more
databases.

With that:
It is quite simple to create connectors, actually. For instance, the
first working connector for sqlite3 was done within a day. The first
connector to postgres (based on sqlpp11-0.6) was created by Poul within
a day or two after I announced the library in November.

A connector to SOCI would be nice, because it could connect to several
database systems at once. So you don't have to switch libraries if you
want to switch to another database.

On the other hand, in our company for instance, we have our own
connector because we want to use very specific configuration options. So
there is always room for several competing backend connectors, in my
opinion.

In short: I'd like to see connectors to SOCI, to CppDb, and other
multi-database libraries, as well as directly to databases. Competition
is good. All these connectors live outside of sqlpp11.

Best,

Roland


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