diff options
author | Aviv Klasquin Komissar <avivklas@users.noreply.github.com> | 2021-10-19 12:18:21 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-19 18:18:21 +0900 |
commit | 3900dc318797f0c829deb42ed9d723a30e3f60b0 (patch) | |
tree | cbf346bb4fe0ca9c7297e9bae7afb27d477585ce /sqlite3.go | |
parent | bump codecov/codecov-action@v2 (#957) (diff) | |
download | golite-3900dc318797f0c829deb42ed9d723a30e3f60b0.tar.gz golite-3900dc318797f0c829deb42ed9d723a30e3f60b0.tar.xz |
return non-nil result when calling exec with empty query (#973)
fixes #963
Diffstat (limited to 'sqlite3.go')
-rw-r--r-- | sqlite3.go | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -828,6 +828,10 @@ func (c *SQLiteConn) exec(ctx context.Context, query string, args []namedValue) tail := s.(*SQLiteStmt).t s.Close() if tail == "" { + if res == nil { + // https://github.com/mattn/go-sqlite3/issues/963 + res = &SQLiteResult{0, 0} + } return res, nil } query = tail |