From db0a9d7438c9ce3119b3b6bc73178cab1d90a93d Mon Sep 17 00:00:00 2001 From: Ed Costello Date: Mon, 8 Apr 2013 13:25:41 -0400 Subject: [PATCH 1/6] document UUID JavaScript method --- source/reference/method/UUID.txt | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 source/reference/method/UUID.txt diff --git a/source/reference/method/UUID.txt b/source/reference/method/UUID.txt new file mode 100644 index 00000000000..e3fd8586c86 --- /dev/null +++ b/source/reference/method/UUID.txt @@ -0,0 +1,27 @@ +====== +UUID() +====== + +.. default-domain:: mongodb + +.. method:: UUID(hex) + + :param string hex: Specify a 32 byte hexadecimal string to convert + to the UUID BSON subtype + + Returns a BSON UUID object. + + .. example:: + + Create a 32 byte hexadecimal string: + + .. code-block:: javascript + + var myuuid = '0123456789abcdeffedcba9876543210' + + Convert it to the BSON UUID subtype: + + .. code-block:: javascript + + UUID(myuuid) + BinData(3,"ASNFZ4mrze/+3LqYdlQyEA==") From 49c98b113c847eeced35314c2bfe4fbf9eaf7e25 Mon Sep 17 00:00:00 2001 From: Ed Costello Date: Mon, 8 Apr 2013 14:38:22 -0400 Subject: [PATCH 2/6] minor copy edits to compact command --- source/reference/command/compact.txt | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/source/reference/command/compact.txt b/source/reference/command/compact.txt index 8b40aad30b0..e4e340ae547 100644 --- a/source/reference/command/compact.txt +++ b/source/reference/command/compact.txt @@ -25,7 +25,7 @@ compact You may also specify the following options: - :param force: + :param boolean force: .. versionchanged:: 2.2 :dbcommand:`compact` blocks activities only for the database @@ -39,7 +39,7 @@ compact :term:`replica set` primary because the command blocks all other activity. - :param paddingFactor: + :param number paddingFactor: .. versionadded:: 2.2 @@ -89,7 +89,7 @@ compact ``paddingFactor`` when allocating new records for documents in this collection. - :param paddingBytes: + :param integer paddingBytes: .. versionadded:: 2.2 @@ -100,7 +100,7 @@ compact Specifying ``paddingBytes`` can be useful if your documents start small but then increase in size - significantly. For example,if your documents are initially + significantly. For example, if your documents are initially 40 bytes long and you grow them by 1KB, using ``paddingBytes: 1024`` might be reasonable since using ``paddingFactor: 4.0`` would specify a record size of 160 @@ -137,20 +137,20 @@ compact - :dbcommand:`compact` generally uses less disk space than :dbcommand:`repairDatabase` and is faster. However,the - :dbcommand:`compact` command is still slow and does block other + :dbcommand:`compact` command is still slow and blocks other database use. Only use :dbcommand:`compact` during scheduled maintenance periods. - If you terminate the operation with the :method:`db.killOp() ` method or restart the - server before it has finished: + server before the :dbcommand:`compact` operation has finished: - If you have journaling enabled, the data remains consistent and usable, regardless of the state of the :dbcommand:`compact` operation. You may have to manually rebuild the indexes. - If you do not have journaling enabled and the :program:`mongod` - or :dbcommand:`compact` terminates during the operation, it's + or :dbcommand:`compact` terminates during the operation, it is impossible to guarantee that the data is in a consistent state. @@ -159,7 +159,7 @@ compact rerun the compaction to completion to restore the use of this free space. - - :dbcommand:`compact` may increase the total size and number of our + - :dbcommand:`compact` may increase the total size and number of your data files, especially when run for the first time. However, this will not increase the total collection storage space since storage size is the amount of data allocated within the database files, @@ -178,7 +178,7 @@ compact - Compact each member separately. - - Ideally, compaction runs on a secondary. See option + - Ideally run :dbcommand:`compact` on a secondary. See option ``force:true`` above for information regarding compacting the primary. @@ -189,7 +189,7 @@ compact sending read operations during compaction. Once the operation finishes the secondary will automatically return to ``SECONDARY`` state. See :data:`~replSetGetStatus.members.state` - for more information replica set member states. Refer to the + for more information about replica set member states. Refer to the "`partial script for automating step down and compaction`_" for an example of this procedure. @@ -200,7 +200,7 @@ compact - It is not possible to compact :term:`capped collections ` because they don't have padding, and documents cannot grow in these collections. However, the documents of a - :term:`capped collections ` are not subject to + :term:`capped collection` are not subject to fragmentation. .. seealso:: :dbcommand:`repairDatabase` From 6fdd402d29596019210e21464454bde06de5c6bf Mon Sep 17 00:00:00 2001 From: Ed Costello Date: Mon, 8 Apr 2013 15:22:27 -0400 Subject: [PATCH 3/6] address @tychoish github comments --- source/reference/method/UUID.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/reference/method/UUID.txt b/source/reference/method/UUID.txt index e3fd8586c86..0b5875317b9 100644 --- a/source/reference/method/UUID.txt +++ b/source/reference/method/UUID.txt @@ -4,12 +4,12 @@ UUID() .. default-domain:: mongodb -.. method:: UUID(hex) +.. method:: UUID() :param string hex: Specify a 32 byte hexadecimal string to convert to the UUID BSON subtype - Returns a BSON UUID object. + :returns: A BSON UUID object. .. example:: From f2f832d2091b050cfb73d68c4b7f1a50ba6a3c0a Mon Sep 17 00:00:00 2001 From: Ed Costello Date: Tue, 9 Apr 2013 19:03:23 -0400 Subject: [PATCH 4/6] punctuated. --- source/reference/method/UUID.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/reference/method/UUID.txt b/source/reference/method/UUID.txt index 0b5875317b9..65c9e79cee2 100644 --- a/source/reference/method/UUID.txt +++ b/source/reference/method/UUID.txt @@ -7,7 +7,7 @@ UUID() .. method:: UUID() :param string hex: Specify a 32 byte hexadecimal string to convert - to the UUID BSON subtype + to the UUID BSON subtype. :returns: A BSON UUID object. From 75ced43a427057865a4c9787a6985bd57eb1a363 Mon Sep 17 00:00:00 2001 From: Ed Costello Date: Wed, 10 Apr 2013 13:18:50 -0400 Subject: [PATCH 5/6] DOCS-1375 c/upsert/update --- source/core/create.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/core/create.txt b/source/core/create.txt index 1eed7657010..5792959d2e4 100644 --- a/source/core/create.txt +++ b/source/core/create.txt @@ -23,7 +23,7 @@ following basic operations: - :ref:`insert ` -- :ref:`upsert ` +- :ref:`update ` All insert operations in MongoDB exhibit the following properties: From e2be24d7caabd7fcb0c0257b53f5f2178d94e99c Mon Sep 17 00:00:00 2001 From: Ed Costello Date: Thu, 11 Apr 2013 11:42:49 -0400 Subject: [PATCH 6/6] DOCS-1382 minor: remove note that cd() unimplemented --- source/reference/method/cd.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/source/reference/method/cd.txt b/source/reference/method/cd.txt index c9d4ef2bb18..0a2a904db80 100644 --- a/source/reference/method/cd.txt +++ b/source/reference/method/cd.txt @@ -12,5 +12,3 @@ cd() This function returns with output relative to the current shell session, and does not impact the server. - - .. note:: This feature is not yet implemented.