From 8ae4ceaffd16a8dcd89cc266c29eb2da8d5b3c62 Mon Sep 17 00:00:00 2001 From: Will Glass-Husain Date: Sun, 23 Nov 2014 10:44:00 -0800 Subject: [PATCH 1/2] fix count to use query --- src/colmt.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/colmt.lua b/src/colmt.lua index a8c061e..823c1e9 100755 --- a/src/colmt.lua +++ b/src/colmt.lua @@ -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 From 9f1587f9b903cb4e81826cf70caa699b031945a6 Mon Sep 17 00:00:00 2001 From: Will Glass-Husain Date: Sun, 23 Nov 2014 11:18:03 -0800 Subject: [PATCH 2/2] bump version --- resty-mongol-0.8-3.rockspec => resty-mongol-0.8-4.rockspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename resty-mongol-0.8-3.rockspec => resty-mongol-0.8-4.rockspec (98%) diff --git a/resty-mongol-0.8-3.rockspec b/resty-mongol-0.8-4.rockspec similarity index 98% rename from resty-mongol-0.8-3.rockspec rename to resty-mongol-0.8-4.rockspec index a661186..4f7a09c 100644 --- a/resty-mongol-0.8-3.rockspec +++ b/resty-mongol-0.8-4.rockspec @@ -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"