On Saturday, 28 January 2017 at 19:01:48 UTC, Adam D. Ruppe wrote:
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"]);
I have just tried your way and I get some errors:
OPTLINK (R) for Win32 Release 8.00.17
Copyright (C) Digital Mars 1989-2013 All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
app.obj(app)
Error 42: Symbol Undefined
_D4arsd8database3Row7opIndexMFkAyaiZAya
app.obj(app)
Error 42: Symbol Undefined
_D4arsd8database3Row7opIndexMFAyaAyaiZAya
app.obj(app)
Error 42: Symbol Undefined
_D4arsd6sqlite6Sqlite6__ctorMFAyaiZC4arsd6sqlite6Sqlite
app.obj(app)
Error 42: Symbol Undefined _D4arsd6sqlite6Sqlite7__ClassZ
app.obj(app)
Error 42: Symbol Undefined
_D4arsd8database8Database5queryMFAyaYC4arsd8database9ResultSet
app.obj(app)
Error 42: Symbol Undefined _D4arsd6sqlite12__ModuleInfoZ
Error: linker exited with status 163184408