std.database

Bubbasaur via Digitalmars-d digitalmars-d at puremagic.com
Fri Mar 4 11:27:47 PST 2016


On Friday, 4 March 2016 at 18:42:45 UTC, Erik Smith wrote:
>     auto db = createDatabase("file:///testdb");
>     auto rowSet = db.connection().statement("select name,score 
> from score").execute;
>     foreach (r; rowSet) writeln(r[0].as!string,",",r[1].as!int);
>
> I'll track query as an alternative name for execute() and 
> std.sql as alternative for std.database.

Why not only:

auto rowSet = db.connection().query("select name,scorefrom 
score");

Or instead of query maybe "returnRows" or just "rows", I think 
the other way is too verbose.

Bubba.


More information about the Digitalmars-d mailing list