mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-20 02:48:56 +00:00
134 lines
4 KiB
XML
134 lines
4 KiB
XML
![]() |
<?xml version="1.0" encoding="utf-8"?>
|
||
|
<!-- $Revision$ -->
|
||
|
|
||
|
<refentry xml:id="mongowritebatch.construct" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||
|
<refnamediv>
|
||
|
<refname>MongoWriteBatch::__construct</refname>
|
||
|
<refpurpose>Description</refpurpose>
|
||
|
</refnamediv>
|
||
|
|
||
|
<refsect1 role="description">
|
||
|
&reftitle.description;
|
||
|
<methodsynopsis>
|
||
|
<modifier>protected</modifier> <methodname>MongoWriteBatch::__construct</methodname>
|
||
|
<methodparam><type>MongoCollection</type><parameter>collection</parameter></methodparam>
|
||
|
<methodparam choice="opt"><type>string</type><parameter>batch_type</parameter></methodparam>
|
||
|
<methodparam choice="opt"><type>array</type><parameter>write_options</parameter></methodparam>
|
||
|
</methodsynopsis>
|
||
|
<para>
|
||
|
Constructs a new MongoWriteBatch.
|
||
|
</para>
|
||
|
<para>
|
||
|
<note>
|
||
|
This is a protected constructor. Please use one of the classes inheriting <classname>MongoWriteBatch</classname>.
|
||
|
</note>
|
||
|
</para>
|
||
|
|
||
|
</refsect1>
|
||
|
|
||
|
<refsect1 role="parameters">
|
||
|
&reftitle.parameters;
|
||
|
<variablelist>
|
||
|
<varlistentry>
|
||
|
<term><parameter>collection</parameter></term>
|
||
|
<listitem>
|
||
|
<para>
|
||
|
The <classname>MongoCollection</classname> to execute the batch on.
|
||
|
Its <link linkend="mongo.writeconcern">WriteConcern</link> will be copied and used as default WriteConcerns
|
||
|
if none given as <parameter>$write_options</parameter> or during <methodname>MongoWriteBatch::execute</methodname>.
|
||
|
</para>
|
||
|
</listitem>
|
||
|
</varlistentry>
|
||
|
<varlistentry>
|
||
|
<term><parameter>batch_type</parameter></term>
|
||
|
<listitem>
|
||
|
<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>
|
||
|
</simplelist>
|
||
|
</para>
|
||
|
</listitem>
|
||
|
</varlistentry>
|
||
|
<varlistentry>
|
||
|
<term><parameter>write_options</parameter></term>
|
||
|
<listitem>
|
||
|
<para>
|
||
|
An array of Write Options.
|
||
|
<informaltable>
|
||
|
<thead>
|
||
|
<row>
|
||
|
<entry>key</entry>
|
||
|
<entry>value meaning</entry>
|
||
|
</row>
|
||
|
</thead>
|
||
|
<tbody>
|
||
|
<row>
|
||
|
<entry>w (int|string)</entry>
|
||
|
<entry><link linkend="mongo.writeconcern">WriteConcern</link> value</entry>
|
||
|
</row>
|
||
|
<row>
|
||
|
<entry>wtimeout (int)</entry>
|
||
|
<entry><link linkend="mongo.writeconcern">Maximum time to wait for Replication</link></entry>
|
||
|
</row>
|
||
|
<row>
|
||
|
<entry>ordered</entry>
|
||
|
<entry>Determins if MongoDB must apply this batch in order (sequentally, one item at a time) or can rearrange it. Defaults to &true;</entry>
|
||
|
</row>
|
||
|
<row>
|
||
|
<entry>j (bool)</entry>
|
||
|
<entry>Wait for journaling on the primary. This value is discouraged, use WriteConcern instead</entry>
|
||
|
</row>
|
||
|
<row>
|
||
|
<entry>fsync (bool)</entry>
|
||
|
<entry>Wait for fsync on the primary. This value is discouraged, use WriteConcern instead</entry>
|
||
|
</row>
|
||
|
</tbody>
|
||
|
</informaltable>
|
||
|
</para>
|
||
|
</listitem>
|
||
|
</varlistentry>
|
||
|
</variablelist>
|
||
|
</refsect1>
|
||
|
|
||
|
<refsect1 role="returnvalues">
|
||
|
&reftitle.returnvalues;
|
||
|
<para>
|
||
|
A new MongoWriteBatch of type <parameter>batch_type</parameter>.
|
||
|
</para>
|
||
|
</refsect1>
|
||
|
|
||
|
<refsect1 role="seealso">
|
||
|
&reftitle.seealso;
|
||
|
<simplelist>
|
||
|
<member><classname>MongoInsertBatch</classname></member>
|
||
|
<member><classname>MongoUpdateBatch</classname></member>
|
||
|
<member><classname>MongoDeleteBatch</classname></member>
|
||
|
</simplelist>
|
||
|
</refsect1>
|
||
|
|
||
|
</refentry>
|
||
|
|
||
|
<!-- Keep this comment at the end of the file
|
||
|
Local variables:
|
||
|
mode: sgml
|
||
|
sgml-omittag:t
|
||
|
sgml-shorttag:t
|
||
|
sgml-minimize-attributes:nil
|
||
|
sgml-always-quote-attributes:t
|
||
|
sgml-indent-step:1
|
||
|
sgml-indent-data:t
|
||
|
indent-tabs-mode:nil
|
||
|
sgml-parent-document:nil
|
||
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
||
|
sgml-exposed-tags:nil
|
||
|
sgml-local-catalogs:nil
|
||
|
sgml-local-ecat-files:nil
|
||
|
End:
|
||
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||
|
vim: et tw=78 syn=sgml
|
||
|
vi: ts=1 sw=1
|
||
|
-->
|