On 11/11/13 04:49, Thorsten Ottosen wrote:
On 09-11-2013 23:03, Roland Bock wrote:
Hi,
sqlpp11 is a template library representing an embedded domain specific language (EDSL) that allows you to
* define types representing tables and columns, * construct type safe queries checked at compile time for syntax errors, type errors, name errors and even some semantic errors, * interpret results by iterating over query-specific structs with appropriately named and typed members.
Very interesting.
Have you considered a syntax like
auto results = db >> select(Person.name,Person.age) >> from(foo) >> where( Person.age > 42);
-Thorsten
Or maybe using << instead of >>. The reason for using << is it's suggestive of karma operators. I'm also guessing that: auto results = db << select(Person.name,Person.age) << from(foo) << where( Person.age > 42); would be translated into some SQL string that is then passed to the actual dbms thru the connection and the result is then returned. This again sounds vaguely like what karma does, only karma just formats the data structure into a string. Was karma ever considered as part of the implementation? -Larry