Skip to content

Commit

Permalink
Merge pull request #5 from forio/fix-count-for-query
Browse files Browse the repository at this point in the history
fix count to use query
  • Loading branch information
DorianGray committed Dec 1, 2014
2 parents 2fd4f65 + 9f1587f commit 697adfe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package = "resty-mongol"
version = "0.8-3"
version = "0.8-4"
source = {
url = "https://github.com/Olivine-Labs/resty-mongol/archive/v0.8.tar.gz",
dir = "resty-mongol-0.8"
Expand Down
3 changes: 2 additions & 1 deletion src/colmt.lua
Original file line number Diff line number Diff line change
Expand Up @@ -306,9 +306,10 @@ function colmethods:insert(docs, continue_on_error, safe)
return oldpairs(t)
end
end

local r, err = self.db_obj:cmd(attachpairs_start({
count = self.col,
query = query and next(query) or nil
query = query or nil
}, "count"))
pairs = oldpairs
if not r then
Expand Down

0 comments on commit 697adfe

Please sign in to comment.