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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user