svn: /phpdoc/en/trunk/reference/mongo/ mongocollection/ensureindex.xml mongocollection/insert.xml mongocollection/remove.xml
mongocollection/update.xml mongocursor/sort.xml

From: Date: Thu, 29 Dec 2011 11:48:33 +0000
Subject: svn: /phpdoc/en/trunk/reference/mongo/ mongocollection/ensureindex.xml mongocollection/insert.xml mongocollection/remove.xml
mongocollection/update.xml mongocursor/sort.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-9300@lists.php.net to get a copy of this message
derick Thu, 29 Dec 2011 11:48:33 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=321505 Log: Documentation fixes and changes for 1.3.0. Changed paths: U phpdoc/en/trunk/reference/mongo/mongocollection/ensureindex.xml U phpdoc/en/trunk/reference/mongo/mongocollection/insert.xml U phpdoc/en/trunk/reference/mongo/mongocollection/remove.xml U phpdoc/en/trunk/reference/mongo/mongocollection/update.xml U phpdoc/en/trunk/reference/mongo/mongocursor/sort.xml Modified: phpdoc/en/trunk/reference/mongo/mongocollection/ensureindex.xml =================================================================== --- phpdoc/en/trunk/reference/mongo/mongocollection/ensureindex.xml 2011-12-29 11:10:13 UTC (rev 321504) +++ phpdoc/en/trunk/reference/mongo/mongocollection/ensureindex.xml 2011-12-29 11:48:33 UTC (rev 321505) @@ -14,13 +14,13 @@ &reftitle.description; <methodsynopsis> <modifier>public</modifier> <type>bool</type><methodname>MongoCollection::ensureIndex</methodname> - <methodparam><type>array</type><parameter>keys</parameter></methodparam> + <methodparam><type>string|array</type><parameter>key|keys</parameter></methodparam> <methodparam choice="opt"><type>array</type><parameter>options</parameter><initializer>array()</initializer></methodparam> </methodsynopsis> <para> - A unique index cannot be created on a field if multiple existing documents do - not contain the field. The field is effectively &null; for these documents - and thus already non-unique. + This method creates an index on the collection and the specified fields. + The key specification can either be just a single field name as string, or an + array containing one or more field names with their sort direction. </para> </refsect1> @@ -55,6 +55,13 @@ <para> Create a unique index. </para> + <warning> + <para> + A unique index cannot be created on a field if multiple existing documents do + not contain the field. The field is effectively &null; for these documents + and thus already non-unique. + </para> + </warning> </listitem> <listitem> <para> @@ -103,9 +110,9 @@ <literal>"name"</literal> </para> <para> - After driver version 1.0.4 (NOT including 1.0.4) you can specify an - index name. This can be useful if you are indexing many keys and - Mongo complains about the index name being too long. + Starting with driver version 1.0.5 you can specify an index name. + This can be useful if you are indexing many keys and Mongo complains + about the index name being too long. </para> </listitem> <listitem> @@ -148,9 +155,11 @@ </thead> <tbody> <row> - <entry>1.2.0</entry> + <entry>1.0.2</entry> <entry> - Added timeout option. + Changed "options" parameter from boolean to array. Pre-1.0.2, the + second parameter was an optional boolean value specifying a unique + index. </entry> </row> <row> @@ -167,13 +176,19 @@ </entry> </row> <row> - <entry>1.0.2</entry> + <entry>1.2.0</entry> <entry> - Changed "options" parameter from boolean to array. Pre-1.0.2, the - second parameter was an optional boolean value specifying a unique - index. + Added timeout option. </entry> </row> + <row> + <entry>1.3.0</entry> + <entry> + The <parameter>options</parameter> parameter does no longer accept + just a boolean to signify a unique index. Instead, this now has to be done + with <literal>array('unique' => true)</literal>. + </entry> + </row> </tbody> </tgroup> </informaltable> @@ -209,8 +224,11 @@ $c = new MongoCollection($db, 'foo'); // create an index on 'x' ascending -$c->ensureIndex(array('x' => 1)); +$c->ensureIndex('x'); +// create an index on 'y' ascending +$c->ensureIndex(array('y' => 1)); + // create an index on 'z' ascending and 'zz' descending $c->ensureIndex(array('z' => 1, 'zz' => -1)); Modified: phpdoc/en/trunk/reference/mongo/mongocollection/insert.xml =================================================================== --- phpdoc/en/trunk/reference/mongo/mongocollection/insert.xml 2011-12-29 11:10:13 UTC (rev 321504) +++ phpdoc/en/trunk/reference/mongo/mongocollection/insert.xml 2011-12-29 11:48:33 UTC (rev 321505) @@ -291,6 +291,14 @@ Added timeout option. </entry> </row> + <row> + <entry>1.3.0</entry> + <entry> + The <parameter>options</parameter> parameter does no longer accept + just a boolean to signify a safe insert. Instead, this now has to be done + with <literal>array('safe' => true)</literal>. + </entry> + </row> </tbody> </tgroup> </informaltable> Modified: phpdoc/en/trunk/reference/mongo/mongocollection/remove.xml =================================================================== --- phpdoc/en/trunk/reference/mongo/mongocollection/remove.xml 2011-12-29 11:10:13 UTC (rev 321504) +++ phpdoc/en/trunk/reference/mongo/mongocollection/remove.xml 2011-12-29 11:48:33 UTC (rev 321505) @@ -178,6 +178,14 @@ Added timeout option. </entry> </row> + <row> + <entry>1.3.0</entry> + <entry> + The <parameter>options</parameter> parameter does no longer accept + just a boolean to signify "justOne". Instead, this now has to be done + with <literal>array('justOne' => true)</literal>. + </entry> + </row> </tbody> </tgroup> </informaltable> Modified: phpdoc/en/trunk/reference/mongo/mongocollection/update.xml =================================================================== --- phpdoc/en/trunk/reference/mongo/mongocollection/update.xml 2011-12-29 11:10:13 UTC (rev 321504) +++ phpdoc/en/trunk/reference/mongo/mongocollection/update.xml 2011-12-29 11:48:33 UTC (rev 321505) @@ -211,6 +211,14 @@ Added timeout option. </entry> </row> + <row> + <entry>1.3.0</entry> + <entry> + The <parameter>options</parameter> parameter does no longer accept + just a boolean to signify an upsert. Instead, this now has to be done + with <literal>array('upsert' => true)</literal>. + </entry> + </row> </tbody> </tgroup> </informaltable> Modified: phpdoc/en/trunk/reference/mongo/mongocursor/sort.xml =================================================================== --- phpdoc/en/trunk/reference/mongo/mongocursor/sort.xml 2011-12-29 11:10:13 UTC (rev 321504) +++ phpdoc/en/trunk/reference/mongo/mongocursor/sort.xml 2011-12-29 11:48:33 UTC (rev 321505) @@ -47,6 +47,32 @@ </para> </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <para> + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>1.3.0</entry> + <entry> + The <parameter>options</parameter> parameter does no longer accept + just a boolean to signify a safe insert. Instead, this now has to be done + with <literal>array('safe' => true)</literal>. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </para> + </refsect1> + <refsect1 role="examples"> &reftitle.examples; <example>

« previous php.doc.cvs (#9300) next »