Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Counting Query documents

Date: Sat, 15 Sep 2012 10:42:43 -0700 (PDT)
From: Therefore <thereforena...@gmail.com>
To: mongodb-user@googlegroups.com
Message-Id: <b4ef8e9b-4337-45ce-979f-6e4cce43f18e@googlegroups.com>
In-Reply-To: <27a2a69a-e1c6-478b-9427-ff7f5971f87d@googlegroups.com>
References: <e227dcc6-fee4-4328-94f8-af487fdca2b3@googlegroups.com>
 <27a2a69a-e1c6-478b-9427-ff7f5971f87d@googlegroups.com>
Subject: Re: Counting Query documents
MIME-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_927_6565659.1347730963821"

------=_Part_927_6565659.1347730963821
Content-Type: multipart/alternative; 
	boundary="----=_Part_928_22070528.1347730963821"

------=_Part_928_22070528.1347730963821
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit

The answer to this came from "ForEveR" at:

http://stackoverflow.com/questions/12333725/mongodb-c-driver-server-side-query-count

You can get a server-side count by using the Query public member obj which 
is  BSONObj:

c.count("mydb.users", qu.obj);

------=_Part_928_22070528.1347730963821
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 7bit

The answer to this came from "ForEveR" at:<br><br>http://stackoverflow.com/questions/12333725/mongodb-c-driver-server-side-query-count<br><br>You can get a server-side count by using the Query public member obj which is&nbsp; BSONObj:<br><br>c.count("mydb.users", qu.obj);<br>
------=_Part_928_22070528.1347730963821--

------=_Part_927_6565659.1347730963821--