fix LastInsertId()/RowsAffected().

This commit is contained in:
mattn
2011-11-15 11:03:31 +09:00
parent e36e29f33e
commit fdbb364aba
2 changed files with 79 additions and 15 deletions

View File

@@ -198,11 +198,11 @@ type SQLiteResult struct {
}
func (r *SQLiteResult) LastInsertId() (int64, error) {
return int64(C.sqlite3_last_insert_rowid(r.s.s)), nil
return int64(C.sqlite3_last_insert_rowid(r.s.c.db)), nil
}
func (r *SQLiteResult) RowsAffected() (int64, error) {
return int64(C.sqlite3_changes(r.s.s)), nil
return int64(C.sqlite3_changes(r.s.c.db)), nil
}
func (s *SQLiteStmt) Exec(args []interface{}) (driver.Result, error) {