Closed sonygod closed 4 years ago
The test suite runs fine on a :memory: database: https://github.com/haxetink/tink_sql/commit/5e1567d62000cb00d3a240d16c7df67b6472da3f Could you reduce the example or be more specific what fails?
import tink.sql.Database;
import tink.sql.Types;
typedef Customer = {
@:autoIncrement @:primary public var id(default, null):Id<Customer>;
public var avatar(default, null):VarChar<50>;
}
class Db extends tink.sql.Database {
@:table var fa_customer:Customer;
public var user(get, never):tink.sql.Table<{fa_customer:Customer}>;
inline function get_user()
return fa_customer;
}
class Main {
static var db:Db;
static function main() {
var driver2 = new tink.sql.drivers.Sqlite(function(db) {
return ":memory:";
});
db = new Db('fa_klw', driver2);
db.user.create();
trace('create table'); // work.
testInsert().next(function(id) {
trace("id=" + id);//no trace?
return id;
});
trace("finish");
}
static function testInsert() {
return db.user.insertOne({
id: cast null,
avatar: "TEST.PNG",
});
}
}
Test running fine. Closing.
current sqlite version do not support ":memory:" database.
please consider to support !
test