aboutsummaryrefslogtreecommitdiff
path: root/sqlite3.go
diff options
context:
space:
mode:
authorConor Branagan <conor.branagan@gmail.com>2016-11-10 10:27:20 -0500
committerConor Branagan <conor.branagan@gmail.com>2017-03-04 18:10:02 -0500
commitbba480975b7136da2f4016b2ba6133e68aa2a878 (patch)
tree43196ee7701499dbc840250d33f06688d553f81c /sqlite3.go
parentfix test (diff)
downloadgolite-bba480975b7136da2f4016b2ba6133e68aa2a878.tar.gz
golite-bba480975b7136da2f4016b2ba6133e68aa2a878.tar.xz
Add Go API for virtual tables
See https://www.sqlite.org/vtab.html for more details. This work was started from https://github.com/gwenn/gosqlite/blob/master/vtab.{c,go} and adds: - Porting the API to go-sqlite3 APIs. - Support for >= Go 1.6 without requiring the `cgocheck` flag to be changed. - Filling out the unfinished callback functions for the `Vtable` struct. - A simple `Context` API layer for ease of use when adding modules. Tests are included.
Diffstat (limited to 'sqlite3.go')
-rw-r--r--sqlite3.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/sqlite3.go b/sqlite3.go
index 6cd5c0e..c7eaf4d 100644
--- a/sqlite3.go
+++ b/sqlite3.go
@@ -627,11 +627,11 @@ func (d *SQLiteDriver) Open(dsn string) (driver.Conn, error) {
// Close the connection.
func (c *SQLiteConn) Close() error {
- deleteHandles(c)
rv := C.sqlite3_close_v2(c.db)
if rv != C.SQLITE_OK {
return c.lastError()
}
+ deleteHandles(c)
c.db = nil
runtime.SetFinalizer(c, nil)
return nil