diff --git a/reference/mongo/book.xml b/reference/mongo/book.xml
index 8273bcadad..5f0b791efa 100644
--- a/reference/mongo/book.xml
+++ b/reference/mongo/book.xml
@@ -1,5 +1,5 @@
-
+
Mongo
@@ -36,6 +36,7 @@
&reference.mongo.mongodb;
&reference.mongo.mongocollection;
&reference.mongo.mongocursor;
+ &reference.mongo.mongoemptyobj;
&reference.mongo.mongogridfs;
&reference.mongo.mongogridfsfile;
&reference.mongo.mongogridfscursor;
@@ -47,6 +48,11 @@
&reference.mongo.mongobindata;
&reference.mongo.mongodbref;
+ &reference.mongo.mongoexception;
+ &reference.mongo.mongocursorexception;
+ &reference.mongo.mongoconnectionexception;
+ &reference.mongo.mongogridfsexception;
+
+
&reftitle.runtime;
&extension.runtime;
@@ -146,6 +146,8 @@
The number of bytes-per-chunk. Used in divvying up GridFS files.
+ This number must be at least 100 less than 4 megabytes (max:
+ 4194204) and it is recommended that it be less than that.
diff --git a/reference/mongo/mongocollection/findone.xml b/reference/mongo/mongocollection/findone.xml
index a44f4ce843..bd0023ba07 100644
--- a/reference/mongo/mongocollection/findone.xml
+++ b/reference/mongo/mongocollection/findone.xml
@@ -1,6 +1,6 @@
-
+
MongoCollection::findOne
@@ -12,6 +12,7 @@
public arrayMongoCollection::findOne
arrayqueryarray()
+ arrayfieldsarray()
@@ -29,6 +30,16 @@
+
+
+ fields
+
+
+
+ Fields of the results to return.
+
+
+
diff --git a/reference/mongo/mongocollection/insert.xml b/reference/mongo/mongocollection/insert.xml
index 3c08f8f47b..a557841ac7 100644
--- a/reference/mongo/mongocollection/insert.xml
+++ b/reference/mongo/mongocollection/insert.xml
@@ -1,6 +1,6 @@
-
+
MongoCollection::insert
@@ -36,7 +36,7 @@
&reftitle.returnvalues;
- Returns if the array was inserted.
+ Returns if the array was not empty (an empty array will not be inserted).
diff --git a/reference/mongo/mongoconnectionexception.xml b/reference/mongo/mongoconnectionexception.xml
new file mode 100644
index 0000000000..e392969079
--- /dev/null
+++ b/reference/mongo/mongoconnectionexception.xml
@@ -0,0 +1,64 @@
+
+
+
+
+
+ The MongoConnectionException class
+ MongoConnectionException
+
+
+
+
+
+ &reftitle.intro;
+
+ Thrown when the driver fails to connect to the database.
+
+
+
+
+
+ &reftitle.classsynopsis;
+
+
+
+ MongoConnectionException
+
+
+
+
+ extends
+ MongoException
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/reference/mongo/mongocursorexception.xml b/reference/mongo/mongocursorexception.xml
new file mode 100644
index 0000000000..bd83efd062
--- /dev/null
+++ b/reference/mongo/mongocursorexception.xml
@@ -0,0 +1,64 @@
+
+
+
+
+
+ The MongoCursorException class
+ MongoCursorException
+
+
+
+
+
+ &reftitle.intro;
+
+ Thrown by accessing a cursor incorrectly.
+
+
+
+
+
+ &reftitle.classsynopsis;
+
+
+
+ MongoCursorException
+
+
+
+
+ extends
+ MongoException
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/reference/mongo/mongoemptyobj.xml b/reference/mongo/mongoemptyobj.xml
new file mode 100644
index 0000000000..7e68a6bae4
--- /dev/null
+++ b/reference/mongo/mongoemptyobj.xml
@@ -0,0 +1,98 @@
+
+
+
+
+
+ The MongoEmptyObj class
+ MongoEmptyObj
+
+
+
+
+
+ &reftitle.intro;
+
+ This class is used to insert an empty object into the database.
+
+
+ Inserting an empty array will create an array-type document, which can
+ be used for (among other things) $push updates:
+
+
+insert(array('x' => array()));
+?>
+]]>
+
+ The shell shows that an empty array is saved as an array:
+
+ db.collection.findOne()
+{ 'x' : [] }
+]]>
+
+
+ Inserting a MongoEmptyObj will create an object-type document:
+
+
+insert(array('x' => new MongoEmptyObj()));
+?>
+]]>
+
+ The shell shows that a MongoEmptyObj is saved as an object:
+
+ db.collection.findOne()
+{ 'x' : {} }
+]]>
+
+
+
+
+
+ &reftitle.classsynopsis;
+
+
+
+ MongoEmptyObj
+
+
+
+
+ MongoEmptyObj
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/reference/mongo/mongoexception.xml b/reference/mongo/mongoexception.xml
new file mode 100644
index 0000000000..0b237957a5
--- /dev/null
+++ b/reference/mongo/mongoexception.xml
@@ -0,0 +1,64 @@
+
+
+
+
+
+ The MongoException class
+ MongoException
+
+
+
+
+
+ &reftitle.intro;
+
+ Default Mongo exception.
+
+
+
+
+
+ &reftitle.classsynopsis;
+
+
+
+ MongoException
+
+
+
+
+ extends
+ Exception
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/reference/mongo/mongogridfsexception.xml b/reference/mongo/mongogridfsexception.xml
new file mode 100644
index 0000000000..5de57e5724
--- /dev/null
+++ b/reference/mongo/mongogridfsexception.xml
@@ -0,0 +1,65 @@
+
+
+
+
+
+ The MongoGridFSException class
+ MongoGridFSException
+
+
+
+
+
+ &reftitle.intro;
+
+ Thrown when there are errors reading or writing files
+ to or from the database.
+
+
+
+
+
+ &reftitle.classsynopsis;
+
+
+
+ MongoGridFSException
+
+
+
+
+ extends
+ MongoException
+
+
+
+
+
+
+
+
+
+
+
+
+
+