aboutsummaryrefslogtreecommitdiff
path: root/sqlite3.go
diff options
context:
space:
mode:
authormattn <mattn.jp@gmail.com>2013-10-24 17:02:49 -0700
committermattn <mattn.jp@gmail.com>2013-10-24 17:02:49 -0700
commit056b49918a67c068eaa4fafdf55b6692f673c393 (patch)
tree74ea2234d81ad2624c802d5b84d4f99f7b4ff203 /sqlite3.go
parentMerge pull request #89 from hattya/blob (diff)
parentUse sqlite3_close_v2() (diff)
downloadgolite-056b49918a67c068eaa4fafdf55b6692f673c393.tar.gz
golite-056b49918a67c068eaa4fafdf55b6692f673c393.tar.xz
Merge pull request #88 from hattya/close_v2
Use sqlite3_close_v2()
Diffstat (limited to 'sqlite3.go')
-rw-r--r--sqlite3.go7
1 files changed, 1 insertions, 6 deletions
diff --git a/sqlite3.go b/sqlite3.go
index 0012aa2..eef4b1f 100644
--- a/sqlite3.go
+++ b/sqlite3.go
@@ -293,12 +293,7 @@ func (d *SQLiteDriver) Open(dsn string) (driver.Conn, error) {
// Close the connection.
func (c *SQLiteConn) Close() error {
- s := C.sqlite3_next_stmt(c.db, nil)
- for s != nil {
- C.sqlite3_finalize(s)
- s = C.sqlite3_next_stmt(c.db, nil)
- }
- rv := C.sqlite3_close(c.db)
+ rv := C.sqlite3_close_v2(c.db)
if rv != C.SQLITE_OK {
return ErrNo(rv)
}