scan count with wherein, fixes #217

This commit is contained in:
Josh Baker 2017-09-04 07:20:03 -07:00
parent cf33e0f2af
commit ff4db894a2
1 changed files with 2 additions and 1 deletions

View File

@ -39,7 +39,8 @@ func (c *Controller) cmdScan(msg *server.Message) (res string, err error) {
}
sw.writeHead()
if sw.col != nil {
if sw.output == outputCount && len(sw.wheres) == 0 && sw.globEverything == true {
if sw.output == outputCount && len(sw.wheres) == 0 &&
len(sw.whereins) == 0 && sw.globEverything == true {
count := sw.col.Count() - int(s.cursor)
if count < 0 {
count = 0