forked from mirror/go-sqlite3
Merge branch 'master' of https://github.com/mattn/go-sqlite3
This commit is contained in:
commit
3ab1d6f348
|
@ -164,6 +164,9 @@ func (c *SQLiteConn) Exec(query string, args []driver.Value) (driver.Result, err
|
||||||
var res driver.Result
|
var res driver.Result
|
||||||
if s.(*SQLiteStmt).s != nil {
|
if s.(*SQLiteStmt).s != nil {
|
||||||
na := s.NumInput()
|
na := s.NumInput()
|
||||||
|
if len(args) < na {
|
||||||
|
return nil, errors.New("args is not enough to execute query")
|
||||||
|
}
|
||||||
res, err = s.Exec(args[:na])
|
res, err = s.Exec(args[:na])
|
||||||
if err != nil && err != driver.ErrSkip {
|
if err != nil && err != driver.ErrSkip {
|
||||||
s.Close()
|
s.Close()
|
||||||
|
|
|
@ -14,7 +14,7 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"./sqlite3_test"
|
"github.com/mattn/go-sqlite3/sqlite3_test"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TempFilename() string {
|
func TempFilename() string {
|
||||||
|
|
Loading…
Reference in New Issue