aboutsummaryrefslogtreecommitdiff
path: root/sqlite3_go18.go
diff options
context:
space:
mode:
authorMichaelS11 <MichaelS11@users.noreply.github.com>2019-06-18 13:33:26 -0700
committerMichaelS11 <MichaelS11@users.noreply.github.com>2019-06-19 16:50:49 -0700
commit57484d0899f89fc920d4437059f0caeb9579c9a1 (patch)
tree543c80d0195a740c44ca4e560435158e98f91665 /sqlite3_go18.go
parentMerge pull request #725 from auxten/patch-1 (diff)
downloadgolite-57484d0899f89fc920d4437059f0caeb9579c9a1.tar.gz
golite-57484d0899f89fc920d4437059f0caeb9579c9a1.tar.xz
Updated Ping to return ErrBadConn
Added TestOpenContext Added TestFileCopyTruncate Added ping to doTestOpen
Diffstat (limited to 'sqlite3_go18.go')
-rw-r--r--sqlite3_go18.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/sqlite3_go18.go b/sqlite3_go18.go
index 43e6418..82b7fea 100644
--- a/sqlite3_go18.go
+++ b/sqlite3_go18.go
@@ -10,7 +10,6 @@ package sqlite3
import (
"database/sql/driver"
- "errors"
"context"
)
@@ -18,7 +17,8 @@ import (
// Ping implement Pinger.
func (c *SQLiteConn) Ping(ctx context.Context) error {
if c.db == nil {
- return errors.New("Connection was closed")
+ // must be ErrBadConn for sql to close the database
+ return driver.ErrBadConn
}
return nil
}