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: https://github.com/rbock/sqlpp11 Doku: https://github.com/rbock/sqlpp11/wiki (not at all formal yet)
I am hoping for more feedback both here and live at CppCon (http://sched.co/1r4lue3)
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 query: select(streets.name) .from(streets) .where( intersects(streets.geometry, some_polygon) ) or select(streets.name) .from(streets) .where( streets.geometry.within(from_wkt("POLYGON((0 0,10 0,10 10,0 10,0 0))")) ) or select(streets.name) .from(streets) .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 Intersects(). 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? Referenes: [1] http://www.opengeospatial.org/standards/sfa [2] http://www.opengeospatial.org/standards/sfs [3] http://en.wikipedia.org/wiki/Well-known_text [4] http://en.wikipedia.org/wiki/DE-9IM Regards, Adam