Skip to content

Translate more mongodb #2207

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 187032b3ea20fa28f1c9f29ba38d06820428f849 Maintainer: Fan2Shrek Status: ready -->
<!-- Reviewed: yes -->

<refentry xml:id="mongodb-driver-bulkwritecommandresult.getdeletedcount" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>MongoDB\Driver\BulkWriteCommandResult::getDeletedCount</refname>
<refpurpose>Renvoie le nombre de documents supprimés</refpurpose>
</refnamediv>

<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>final</modifier> <modifier>public</modifier> <type>int</type><methodname>MongoDB\Driver\BulkWriteCommandResult::getDeletedCount</methodname>
<void />
</methodsynopsis>
<para>
</para>
</refsect1>

<refsect1 role="parameters">
&reftitle.parameters;
&no.function.parameters;
</refsect1>

<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Renvoie le nombre total de documents supprimés par toutes les opérations.
</para>
</refsect1>

<refsect1 role="errors">
&reftitle.errors;
<simplelist>
&mongodb.throws.argumentparsing;
&mongodb.throws.unacknowledged;
</simplelist>
</refsect1>

<refsect1 role="examples">
&reftitle.examples;
<example>
<title>Exemple de <function>MongoDB\Driver\BulkWriteCommandResult::getDeletedCount</function></title>
<programlisting role="php">
<![CDATA[
<?php

$manager = new MongoDB\Driver\Manager;

$bulk = new MongoDB\Driver\BulkWriteCommand;
$bulk->insertOne('db.coll', ['x' => 1]);
$bulk->updateOne('db.coll', ['x' => 1], ['$set' => ['y' => 3]]);
$bulk->updateOne('db.coll', ['x' => 2], ['$set' => ['y' => 1]], ['upsert' => true]);
$bulk->updateOne('db.coll', ['x' => 3], ['$set' => ['y' => 2]], ['upsert' => true]);
$bulk->deleteMany('db.coll', []);

$result = $manager->executeBulkWriteCommand($bulk);

var_dump($result->getDeletedCount());

?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
int(3)
]]>
</screen>
</example>
</refsect1>

<refsect1 role="seealso">
&reftitle.seealso;
<simplelist>
<member><methodname>MongoDB\Driver\BulkWriteCommandResult::getDeleteResults</methodname></member>
<member><methodname>MongoDB\Driver\BulkWriteCommandResult::isAcknowledged</methodname></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
-->
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 187032b3ea20fa28f1c9f29ba38d06820428f849 Maintainer: Fan2Shrek Status: ready -->
<!-- Reviewed: yes -->

<refentry xml:id="mongodb-driver-bulkwritecommandresult.getdeleteresults" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>MongoDB\Driver\BulkWriteCommandResult::getDeleteResults</refname>
<refpurpose>Renvoie les résultats détaillés des suppressions réussies</refpurpose>
</refnamediv>

<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>final</modifier> <modifier>public</modifier> <type class="union"><type>MongoDB\BSON\Document</type><type>null</type></type><methodname>MongoDB\Driver\BulkWriteCommandResult::getDeleteResults</methodname>
<void />
</methodsynopsis>
<para>
</para>
</refsect1>

<refsect1 role="parameters">
&reftitle.parameters;
&no.function.parameters;
</refsect1>

<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Renvoie un document contenant les résultats de chaque opération de
suppression réussie, ou &null; si les résultats détaillés n'ont pas été demandés. Les
clés du document correspondront à l'index de l'opération d'écriture de
<classname>MongoDB\Driver\BulkWriteCommand</classname>.
</para>
</refsect1>

<refsect1 role="errors">
&reftitle.errors;
<simplelist>
&mongodb.throws.argumentparsing;
&mongodb.throws.unacknowledged;
</simplelist>
</refsect1>

<refsect1 role="examples">
&reftitle.examples;
<example>
<title>Exemple de <function>MongoDB\Driver\BulkWriteCommandResult::getDeleteResults</function></title>
<programlisting role="php">
<![CDATA[
<?php

$manager = new MongoDB\Driver\Manager;

$bulk = new MongoDB\Driver\BulkWriteCommand(['verboseResults' => true]);
$bulk->insertOne('db.coll', ['x' => 1]);
$bulk->updateOne('db.coll', ['x' => 1], ['$set' => ['y' => 3]]);
$bulk->updateOne('db.coll', ['x' => 2], ['$set' => ['y' => 1]], ['upsert' => true]);
$bulk->updateOne('db.coll', ['x' => 3], ['$set' => ['y' => 2]], ['upsert' => true]);
$bulk->deleteMany('db.coll', []);

$result = $manager->executeBulkWriteCommand($bulk);

var_dump($result->getDeleteResults()->toPHP());

?>
]]>
</programlisting>
&example.outputs.similar;
<screen>
<![CDATA[
object(stdClass)#7 (1) {
["4"]=>
object(stdClass)#6 (1) {
["deletedCount"]=>
object(MongoDB\BSON\Int64)#5 (1) {
["integer"]=>
string(1) "3"
}
}
}
]]>
</screen>
</example>
</refsect1>

<refsect1 role="seealso">
&reftitle.seealso;
<simplelist>
<member><methodname>MongoDB\Driver\BulkWriteCommandResult::getDeletedCount</methodname></member>
<member><methodname>MongoDB\Driver\BulkWriteCommandResult::isAcknowledged</methodname></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
-->
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 187032b3ea20fa28f1c9f29ba38d06820428f849 Maintainer: Fan2Shrek Status: ready -->
<!-- Reviewed: yes -->

<refentry xml:id="mongodb-driver-bulkwritecommandresult.getinsertedcount" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>MongoDB\Driver\BulkWriteCommandResult::getInsertedCount</refname>
<refpurpose>Renvoie le nombre de documents insérés</refpurpose>
</refnamediv>

<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>final</modifier> <modifier>public</modifier> <type>int</type><methodname>MongoDB\Driver\BulkWriteCommandResult::getInsertedCount</methodname>
<void />
</methodsynopsis>
<para>
</para>
</refsect1>

<refsect1 role="parameters">
&reftitle.parameters;
&no.function.parameters;
</refsect1>

<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Renvoie le nombre total de documents insérés (excluant les upserts) par toutes
les opérations.
</para>
</refsect1>

<refsect1 role="errors">
&reftitle.errors;
<simplelist>
&mongodb.throws.argumentparsing;
&mongodb.throws.unacknowledged;
</simplelist>
</refsect1>

<refsect1 role="examples">
&reftitle.examples;
<example>
<title>Exemple de <function>MongoDB\Driver\BulkWriteCommandResult::getInsertedCount</function></title>
<programlisting role="php">
<![CDATA[
<?php

$manager = new MongoDB\Driver\Manager;

$bulk = new MongoDB\Driver\BulkWriteCommand;
$bulk->insertOne('db.coll', ['x' => 1]);
$bulk->updateOne('db.coll', ['x' => 1], ['$set' => ['y' => 3]]);
$bulk->updateOne('db.coll', ['x' => 2], ['$set' => ['y' => 1]], ['upsert' => true]);
$bulk->updateOne('db.coll', ['x' => 3], ['$set' => ['y' => 2]], ['upsert' => true]);
$bulk->deleteMany('db.coll', []);

$result = $manager->executeBulkWriteCommand($bulk);

var_dump($result->getInsertedCount());

?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
int(1)
]]>
</screen>
</example>
</refsect1>

<refsect1 role="seealso">
&reftitle.seealso;
<simplelist>
<member><methodname>MongoDB\Driver\BulkWriteCommandResult::getInsertResults</methodname></member>
<member><methodname>MongoDB\Driver\BulkWriteCommandResult::isAcknowledged</methodname></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
-->
Loading