count() for c++ client

This commit is contained in:
Dwight
2009-02-09 16:24:47 -05:00
parent fadc7ef3bb
commit 52ac9edf31
5 changed files with 43 additions and 34 deletions

View File

@@ -7,12 +7,12 @@ using namespace mongo;
void run() {
DBClientConnection c;
c.connect("localhost");
c.connect("192.168.58.1");
cout << "connected ok" << endl;
BSONObj p = BSON( "name" << "Joe" << "age" << 33 );
c.insert("tutorial.persons", p);
cout << "count:" << c.count(
cout << "count:" << c.count("tutorial.persons") << endl;
}
int main() {