diff options
| author | mattn <mattn.jp@gmail.com> | 2014-09-03 09:21:35 +0900 |
|---|---|---|
| committer | mattn <mattn.jp@gmail.com> | 2014-09-03 09:21:35 +0900 |
| commit | 3ab1d6f3481128cefecd12ab6cc9cfa61b11f2ce (patch) | |
| tree | 6cefdfd48a57709a121c7e58a80819c791c2d66e /sqlite3.go | |
| parent | Merge branch 'pr/135' (diff) | |
| parent | Merge pull request #140 from pblaszczyk/patch-1 (diff) | |
| download | golite-3ab1d6f3481128cefecd12ab6cc9cfa61b11f2ce.tar.gz golite-3ab1d6f3481128cefecd12ab6cc9cfa61b11f2ce.tar.xz | |
Merge branch 'master' of https://github.com/mattn/go-sqlite3
Diffstat (limited to '')
| -rw-r--r-- | sqlite3.go | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -164,6 +164,9 @@ func (c *SQLiteConn) Exec(query string, args []driver.Value) (driver.Result, err var res driver.Result if s.(*SQLiteStmt).s != nil { na := s.NumInput() + if len(args) < na { + return nil, errors.New("args is not enough to execute query") + } res, err = s.Exec(args[:na]) if err != nil && err != driver.ErrSkip { s.Close() |
