Problems compiling sqlite-d

Adam D. Ruppe via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Jan 28 11:01:48 PST 2017


On Friday, 27 January 2017 at 12:01:30 UTC, Nestor wrote:
> Is there any other native D implementation of sqlite reader?

My sqlite.d and database.d from here can do it too:
https://github.com/adamdruppe/arsd

Just download those two files and compile them together with your 
file:

dmd yourfile.d database.d sqlite.d

However, my thing requires the C library, sqlite3, to be 
available already so it might not work out of the box for you 
either.

import arsd.sqlite;
auto db = new Sqlite("filename");
foreach(row; db.query("select * from foo"))
   writeln(row[0], row["name"]);


More information about the Digitalmars-d-learn mailing list