aboutsummaryrefslogtreecommitdiff
path: root/sqlite3_go18.go
diff options
context:
space:
mode:
authormattn <mattn.jp@gmail.com>2019-06-20 10:01:18 +0900
committerGitHub <noreply@github.com>2019-06-20 10:01:18 +0900
commit5dd71670cca4bc0ee90371eabd0f1bdba1ac6f35 (patch)
tree543c80d0195a740c44ca4e560435158e98f91665 /sqlite3_go18.go
parentMerge pull request #725 from auxten/patch-1 (diff)
parentUpdated Ping to return ErrBadConn (diff)
downloadgolite-5dd71670cca4bc0ee90371eabd0f1bdba1ac6f35.tar.gz
golite-5dd71670cca4bc0ee90371eabd0f1bdba1ac6f35.tar.xz
Merge pull request #727 from MichaelS11/master
Updated Ping and doTestOpen. Added TestOpenContext and TestFileCopyTruncate
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
}