mattn/go-sqlite3 — Issue #9: Is it possible db.Prepare() and use the prepared stmt in tx?
Author: dlintw
Created: 2012-02-29 06:31:00+00:00
State: open

I'm porting my old Go r.60 db code into Go1.
And start to use go-sqlite3 (old go sqlite library on code.google can not work).
My old code can do (pseudo code)
```
stmt = db.Prepare('insert into TABLE values(?,?)
db.Begin()
for i=0; i<10000; i++ {
stmt.Exec(i, data[i])
}
db.End()
```
But, I don't know how to do such thing on go-sqlite3, could you write a test code or example code?
I just know the prepare() must after transaction initialize, that will reduce my code performance.