On 2013-11-12 07:13, Christof Donat wrote:
Hi,
I see use cases for printf and regex for instance, where the user provides a textual representation of something at compile time. In those cases, compile time validation of strings is a wonderful tool, and I have highest respect for it.
But in the context of sqlpp11 I don't see how or why I should use it? When you have SQL with its original syntax in your source code, you can copy/paste between your source code and your database tool. That way you can develop your queries iteratively. Compile time string parsing then adds compile time syntax checks, type safety and a intuitive interface to access
Am Montag, 11. November 2013, 23:16:06 schrieb Roland Bock: the columns in the result set by using your library.
The library is constructing the query string at runtime. There is no string to be validated at compile time. This is a major difference to most other C++ SQL libraries. The huge strength of it is to me, that it provides all that syntax and type checking and the intuitive access to the result sets. Its weakness is, that I have to translate my queries from SQL syntax to another similar, but not equal syntax when interactively working with my SQL tools. That could be resolved by adding compile time string parsing on top of your library.
Christof
As I wrote to Vicente, personally I wouldn't follow that path. I don't believe in ct SQL parsing for all but the simplest cases. But I might be totally wrong. If you have some spare time on your hands and consider such an approach useful, you should probably give it a try. Regards, Roland