Boost logo

Boost :

Subject: Re: [boost] sqlpp11, 3rd iteration
From: Adam Wulkiewicz (adam.wulkiewicz_at_[hidden])
Date: 2014-08-21 12:45:19

Roland Bock wrote:
> Dear Boosters,
> Quite a bit has happened since last I reported about sqlpp11 in this
> forum [1,2]. I have incorporated a lot of the feedback you gave me,
> hopefully bringing the library closer to a reviewable state.
> Source:
> Doku: (not at all formal yet)
> I am hoping for more feedback both here and live at CppCon
> (

I didn't mention it earlier but your library looks great!
In my work I musn't write code that uses such functionality but as a C++
developer I appreciate that I could handle queries, errors, etc. at the
C++ level.

Which brings me to a question about the SQL extensions. In order to
support such extensions, e.g. SQL/MM or SQL/SFA [1][2] which specifies a
storage, access model, operations, etc. for handling of
geometrical/geographical data, a user would be forced to extend your
library with additional functions/methods/structures to e.g. perform a

     .where( intersects(streets.geometry, some_polygon) )


     .where( streets.geometry.within(from_wkt("POLYGON((0 0,10 0,10 10,0 10,0 0))")) )


     .where( streets.geometry.distance(some_point) < 100 )

or something like that. For more info see: WKT [3], spatial relations [4].

How simple/complicated would it be (for the user) to add the support for
such extensions currently? Would the user be forced to implement it in
the library directly and e.g. always include it with the rest of the
library? Or would it be possible to implement it as a separate addon
that could be optionally included?

In addition to the above, would it be possible to map the same C++
functions/methods to different SQL functions for different database
servers? In various servers there are non-standard extensions which may
have various SQL functions names or different number of parameters, etc.
E.g. related to the above example, one server can support SQL/MM
defining operation ST_Intersects() and other one SQL/SFA defining

Assuming that various servers may support various functionalities on
which layer of sqlpp this support should be checked and the error
returned if necessary?
E.g. ST_CoveredBy() isn't defined in the SQL/MM standard but it can be
used in PostgreSQL/PostGIS, but currently not in MySQL (version 5.7).
Or should all servers support the same functionalities?
If such errors was reported at compile-time then AFAIU specific version
of the library (or just a lowest level connector?) would be forced to
work with specific version of a server?



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