From bba480975b7136da2f4016b2ba6133e68aa2a878 Mon Sep 17 00:00:00 2001 From: Conor Branagan Date: Thu, 10 Nov 2016 10:27:20 -0500 Subject: 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. --- sqlite3.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sqlite3.go') 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 -- cgit v1.2.3