summaryrefslogtreecommitdiff
path: root/client/examples/second.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'client/examples/second.cpp')
-rw-r--r--client/examples/second.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/client/examples/second.cpp b/client/examples/second.cpp
index e1bd8d4737f..f5802eec30a 100644
--- a/client/examples/second.cpp
+++ b/client/examples/second.cpp
@@ -7,11 +7,11 @@
using namespace std;
using namespace mongo;
-int main(){
+int main() {
DBClientConnection conn;
string errmsg;
- if ( ! conn.connect( "127.0.0.1" , errmsg ) ){
+ if ( ! conn.connect( "127.0.0.1" , errmsg ) ) {
cout << "couldn't connect : " << errmsg << endl;
throw -11;
}
@@ -19,13 +19,13 @@ int main(){
const char * ns = "test.second";
conn.remove( ns , emptyObj );
-
+
conn.insert( ns , BUILDOBJ( "name" << "eliot" << "num" << 17 ) );
conn.insert( ns , BUILDOBJ( "name" << "sara" << "num" << 24 ) );
auto_ptr<DBClientCursor> cursor = conn.query( ns , emptyObj );
cout << "using cursor" << endl;
- while ( cursor->more() ){
+ while ( cursor->more() ) {
BSONObj obj = cursor->next();
cout << "\t" << obj.jsonString() << endl;
}