forked from mirror/go-sqlcipher
Use sqlite3_close_v2()
This commit is contained in:
parent
2a2faeaf38
commit
4970c4bff6
|
@ -293,12 +293,7 @@ func (d *SQLiteDriver) Open(dsn string) (driver.Conn, error) {
|
||||||
|
|
||||||
// Close the connection.
|
// Close the connection.
|
||||||
func (c *SQLiteConn) Close() error {
|
func (c *SQLiteConn) Close() error {
|
||||||
s := C.sqlite3_next_stmt(c.db, nil)
|
rv := C.sqlite3_close_v2(c.db)
|
||||||
for s != nil {
|
|
||||||
C.sqlite3_finalize(s)
|
|
||||||
s = C.sqlite3_next_stmt(c.db, nil)
|
|
||||||
}
|
|
||||||
rv := C.sqlite3_close(c.db)
|
|
||||||
if rv != C.SQLITE_OK {
|
if rv != C.SQLITE_OK {
|
||||||
return ErrNo(rv)
|
return ErrNo(rv)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue