import sqlite
import console;
var db = sqlite("C:\Users\Administrator\Desktop\test-sqlite.db"); //创建数据库
if( not db.existsTable("film") ){
db.exec( "CREATE TABLE [film](title, length, year, starring);"); //创建表
}
var tm = time.tick()
db.beginTrans()
for(i=1;10000;1){
db.exec("INSERT INTO film(title,length,year) VALUES(@title,@length,@year)",{
title = "标题";
length = 4;
year = time.now();
})
}
db.commitTrans()
tm = time.tick()-tm
console.dump(db.getTable("SELECT count(*) FROM [film] "),tm)
db.close()
console.pause();