Return empty rows collection if query does not have any rows

This commit is contained in:
Dan Sosedoff
2016-01-17 15:05:57 -06:00
parent 3167d96cfc
commit 4844270f0b
3 changed files with 9 additions and 3 deletions

View File

@@ -205,7 +205,10 @@ func (client *Client) query(query string, args ...interface{}) (*Result, error)
return nil, err
}
result := Result{Columns: cols}
result := Result{
Columns: cols,
Rows: []Row{},
}
for rows.Next() {
obj, err := rows.SliceScan()