return non-nil result when calling exec with empty query (#973)
fixes #963
This commit is contained in:
committed by
GitHub
parent
3392062c72
commit
3900dc3187
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user