dstddb icon indicating copy to clipboard operation
dstddb copied to clipboard

std.database.sqlite.database.connection c nnot deduce function from argument types

Open bubnenkoff opened this issue 9 years ago • 1 comments

auto db = createDatabase("file:///" ~ sqlLiteDBName).query("CREATE TABLE IF NOT EXISTS MySyncData (guid text, id integer, name text, fl integer)"); auto con = db.connection();
Output:
source\app.d(104,28): Error: template std.database.sqlite.database.connection cannot deduce function from argument types !()(Result!(DefaultPolicy)), candidate are: \packages\dstddb-0.0.3\dstddb\src\std\dtabase\sqlite\database.d(31,6): std.database.sqlite.database.connection()(Database!T db, string source = "") dmd failed with exit code 1.

bubnenkoff avatar Apr 06 '16 11:04 bubnenkoff

The db variable assignment should not include the query. Here's a improvement:

auto db = createDatabase("file://t.db"); db.query("CREATE TABLE IF NOT EXISTS MySyncData (guid text, id integer, a integer)"); auto con = db.connection();

cruisercoder avatar Apr 20 '16 04:04 cruisercoder