Apply suggestions from code review

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
This commit is contained in:
Bernd Verst 2022-09-23 13:42:45 -07:00 committed by GitHub
parent 02645149b5
commit ea219576df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -174,12 +174,12 @@ func (q *Query) execute(client *azcosmos.ContainerClient) ([]state.QueryItem, st
if err != nil {
return nil, "", err
}
if len(items) >= resultLimit {
if (resultLimit != 0) && (len(items) >= resultLimit) {
break
}
items = append(items, tempItem)
}
if len(items) >= resultLimit {
if (resultLimit != 0) && (len(items) >= resultLimit) {
break
}
}