summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron <aaron@10gen.com>2009-02-10 14:04:03 -0500
committerAaron <aaron@10gen.com>2009-02-10 14:04:03 -0500
commit565d3742839561836424443f95c951005a6030d8 (patch)
tree9f16bccaa1aea6834a4fc57427d39cca349f1dce
parent72eb0d50728c70eac638ddbe0689a8cfa7662607 (diff)
downloadmongo-565d3742839561836424443f95c951005a6030d8.tar.gz
Use @file to tell doxygen to document globals, add more doc for BSON() and QUERY()
-rw-r--r--client/connpool.h2
-rw-r--r--client/dbclient.h7
-rw-r--r--client/gridfs.h2
-rw-r--r--client/model.h2
-rw-r--r--db/jsobj.h7
-rw-r--r--db/json.h2
6 files changed, 15 insertions, 7 deletions
diff --git a/client/connpool.h b/client/connpool.h
index 30b86a06241..c5c91b58519 100644
--- a/client/connpool.h
+++ b/client/connpool.h
@@ -1,4 +1,4 @@
-/* connpool.h */
+/** @file connpool.h */
/**
* Copyright (C) 2008 10gen Inc.
diff --git a/client/dbclient.h b/client/dbclient.h
index b4775f111c4..5949cde1f00 100644
--- a/client/dbclient.h
+++ b/client/dbclient.h
@@ -1,4 +1,4 @@
-// dbclient.h - connect to a Mongo database as a database, from C++
+/** @file dbclient.h - connect to a Mongo database as a database, from C++ */
/**
* Copyright (C) 2008 10gen Inc.
@@ -75,7 +75,7 @@ namespace mongo {
};
#pragma pack()
- /** Represents a query. Typically one uses the QUERY(...) macro to construct a query object.
+ /** Represents a query. Typically one uses the QUERY(...) macro to construct a Query object.
Example:
QUERY( "age" << 33 << "school" << "UCLA" ).sort("name")
*/
@@ -135,6 +135,9 @@ namespace mongo {
Query& where(const char *jscode) { return where(jscode, BSONObj()); }
};
+/** Typically one uses the QUERY(...) macro to construct a Query object.
+ Example: QUERY( "age" << 33 << "school" << "UCLA" )
+*/
#define QUERY(x) Query( BSON(x) )
/**
diff --git a/client/gridfs.h b/client/gridfs.h
index 3a8428e2cb0..9aeab0257fd 100644
--- a/client/gridfs.h
+++ b/client/gridfs.h
@@ -1,4 +1,4 @@
-// gridfs.h
+/** @file gridfs.h */
#pragma once
diff --git a/client/model.h b/client/model.h
index 3437d3bdd5e..1089eb06a11 100644
--- a/client/model.h
+++ b/client/model.h
@@ -1,4 +1,4 @@
-// model.h
+/** @file model.h */
/**
* Copyright (C) 2008 10gen Inc.
diff --git a/db/jsobj.h b/db/jsobj.h
index 500bfaaddc6..b032e614320 100644
--- a/db/jsobj.h
+++ b/db/jsobj.h
@@ -1,4 +1,4 @@
-/* jsobj.h */
+/** @file jsobj.h */
/**
BSONObj and its helpers
@@ -732,6 +732,11 @@ namespace mongo {
/** Use BSON macro to build a BSONObj from a stream
e.g.,
BSON( "name" << "joe" << "age" << 33 )
+
+ The labels GT, GTE, LT, LTE, NE can be helpful for stream-oriented construction
+ of a BSONObj, particularly when assembling a Query. For example,
+ BSON( "a" << GT << 23.4 << NE << 3 << "b" << 2 ) produces the object
+ { a: { \$gt: 23.4, \$ne: 3 }, b: 2 }.
*/
#define BSON(x) (( BSONObjBuilder() << x ).obj())
diff --git a/db/json.h b/db/json.h
index af9c81d4150..c65785aa060 100644
--- a/db/json.h
+++ b/db/json.h
@@ -1,4 +1,4 @@
-// json.h
+/** @file json.h */
/**
* Copyright (C) 2008 10gen Inc.