Document the MongoWriteBatch constants

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@333001 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Hannes Magnusson 2014-03-14 23:49:51 +00:00
parent c56084ecba
commit 1624dcaf80
4 changed files with 58 additions and 11 deletions

View file

@ -46,12 +46,59 @@
</classsynopsisinfo>
<!-- }}} -->
<classsynopsisinfo role="comment">&Constants;</classsynopsisinfo>
<fieldsynopsis>
<modifier>const</modifier>
<type>int</type>
<varname linkend="mongowritebatch.constants.command.insert">MongoWriteBatch::COMMAND_INSERT</varname>
<initializer>1</initializer>
</fieldsynopsis>
<fieldsynopsis>
<modifier>const</modifier>
<type>int</type>
<varname linkend="mongowritebatch.constants.command.update">MongoWriteBatch::COMMAND_UPDATE</varname>
<initializer>2</initializer>
</fieldsynopsis>
<fieldsynopsis>
<modifier>const</modifier>
<type>int</type>
<varname linkend="mongowritebatch.constants.command.delete">MongoWriteBatch::COMMAND_DELETE</varname>
<initializer>3</initializer>
</fieldsynopsis>
<classsynopsisinfo role="comment">&Methods;</classsynopsisinfo>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.mongowritebatch')/db:refentry/db:refsect1[@role='description']/descendant::db:constructorsynopsis[not(@role='procedural')])" />
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.mongowritebatch')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[not(@role='procedural')])" />
</classsynopsis>
<!-- }}} -->
<section xml:id="mongowritebatch.constants">
<title>MongoWriteBatch types</title>
<variablelist>
<varlistentry xml:id="mongowritebatch.constants.command.insert">
<term><constant>MongoWriteBatch::COMMAND_INSERT</constant></term>
<listitem>
<para>Create an Insert Write Batch</para>
</listitem>
</varlistentry>
<varlistentry xml:id="mongowritebatch.constants.command.update">
<term><constant>MongoWriteBatch::COMMAND_UPDATE</constant></term>
<listitem>
<para>Create an Update Write Batch</para>
</listitem>
</varlistentry>
<varlistentry xml:id="mongowritebatch.constants.command.delete">
<term><constant>MongoWriteBatch::COMMAND_DELETE</constant></term>
<listitem>
<para>Create an Delete Write Batch</para>
</listitem>
</varlistentry>
</variablelist>
</section>
</section>
<section xml:id="mongowritebatch.description">

View file

@ -40,18 +40,18 @@
</thead>
<tbody>
<row>
<entry>INSERT</entry>
<entry>MongoWriteBatch::COMMAND_INSERT</entry>
<entry>The document to add</entry>
</row>
<row>
<entry>UPDATE</entry>
<entry>MongoWriteBatch::COMMAND_UPDATE</entry>
<entry>
<simpara>Raw update operation. Required keys are: array("q" => <link linkend="mongocollection.update.criteria">array("criteria")</link>, "u" => array("new data"))</simpara>
<simpara>Optionally with the "multi" and "upsert" keys as boolean values</simpara>
</entry>
</row>
<row>
<entry>DELETE</entry>
<entry>MongoWriteBatch::COMMAND_DELETE</entry>
<entry>
<simpara>Raw delete operation. Required keys are: array("q" => <link linkend="mongocollection.delete.criteria">array("criteria")</link>, "limit" => 1)</simpara>
</entry>

View file

@ -39,9 +39,9 @@
<para>
One of:
<simplelist>
<member><literal>0</literal> - make an INSERT batch</member>
<member><literal>1</literal> - make an UPDATE batch</member>
<member><literal>2</literal> - make a DELETE batch</member>
<member><literal>0</literal> - make an MongoWriteBatch::COMMAND_INSERT batch</member>
<member><literal>1</literal> - make an MongoWriteBatch::COMMAND_UPDATE batch</member>
<member><literal>2</literal> - make a MongoWriteBatch::COMMAND_DELETE batch</member>
</simplelist>
</para>
</listitem>

View file

@ -57,27 +57,27 @@
<row>
<entry>nInserted</entry>
<entry>Number of inserted documents</entry>
<entry>INSERT batch</entry>
<entry>MongoWriteBatch::COMMAND_INSERT batch</entry>
</row>
<row>
<entry>nMatched</entry>
<entry>Number of documents matching the query criteria</entry>
<entry>UPDATE batch</entry>
<entry>MongoWriteBatch::COMMAND_UPDATE batch</entry>
</row>
<row>
<entry>nModified</entry>
<entry>Number of documents actually needed to be modied</entry>
<entry>UPDATE batch</entry>
<entry>MongoWriteBatch::COMMAND_UPDATE batch</entry>
</row>
<row>
<entry>nUpserted</entry>
<entry>Number of upserted documents</entry>
<entry>UPDATE batch</entry>
<entry>MongoWriteBatch::COMMAND_UPDATE batch</entry>
</row>
<row>
<entry>nRemoved</entry>
<entry>Number of documents removed</entry>
<entry>DELETE batch</entry>
<entry>MongoWriteBatch::COMMAND_DELETE batch</entry>
</row>
<row>
<entry>ok</entry>