On Sunday, 21 February 2016 at 16:05:49 UTC, Stefan Koch wrote:
just a small update on the API
It could look something like this
auto table = db.tables("personal");
auto results =
table.select("name","surname").where!("age","sex", (age, sex)
=> sex.as!Sex == Sex.female, age.as!uint < 40));
auto names = results[0].as!string;
auto surnames = results[0].as!string;
Looks good! Although took me a little bit to notice the Lambda :P
The result from names, surnames, once you access the entry it
consumes it? That seems wrong.
Hmmm is there a short example of how the left/right/natural
joins would be done? I almost worry if there will be heavy uses
for lambdas for that as well.
Also the heavy template/explicit type use of _as_ makes me
wonder if those can be avoided somehow. Then again SQLite might
not care enough from what i recall so it may be unavoidable.