1
0
mirror of https://github.com/php/doc-es.git synced 2026-03-25 16:02:13 +01:00
Files
archived-doc-es/reference/mongo/mongocursor/doquery.xml
Pedro Antonio Gil Rodríguez 2a6da665e9 Traducción
git-svn-id: https://svn.php.net/repository/phpdoc/es/trunk@329330 c90b9560-bf6c-de11-be94-00142212c4b1
2013-01-29 12:24:54 +00:00

133 lines
3.3 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 8bbdbb8d6b7631c45d6616873afa7f98de979072 Maintainer: seros Status: ready -->
<!-- Reviewed: no -->
<refentry xml:id="mongocursor.doquery" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>MongoCursor::doQuery</refname>
<refpurpose>Ejecutar un sentencia</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>protected</modifier> <type>void</type><methodname>MongoCursor::doQuery</methodname>
<void/>
</methodsynopsis>
<warning>
<para>
Por favor, no utilice este método.
</para>
</warning>
<para>
Esta función realmente consulta la base de datos. Todas las consultas y comandos van
a través de esta función. Así, esta función puede ser sobrescrita para proporcionar
un manejo de consultas personalizado.
</para>
<para>
Maneja la serialización de la consulta, enviándola a la base de datos, recibiendo una
respuesta, y deserializándola. Por lo tanto, si se está planeando sobrescribirlo,
el código seguramente debiera de invocar al original para usar la funcionalidad
existente (véase el ejemplo de más abajo).
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
&no.function.parameters;
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&null;.
</para>
</refsect1>
<refsect1 role="errors">
&reftitle.errors;
<para>
Lanza una <classname>MongoConnectionException</classname> si no se puede acceder a la
base de datos.
</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.2.11</entry>
<entry>Emite un error de nivel <constant>E_DEPRECATED</constant> cuando se usa.</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
<refsect1 role="examples"><!-- {{{ -->
&reftitle.examples;
<para>
<example xml:id="mongocursor.doquery.example.basic"><!-- {{{ -->
<title>Ejemplo de <function>MongoCursor::doQuery</function></title>
<para>
Se prodría sobrescribir esta función para intentar una consulta a un secundario y, si
fallase, intentarlo de nuevo en el primario.
</para>
<programlisting role="php">
<![CDATA[
<?php
class MyCursor extends MongoCursor {
protected function doQuery() {
$this->slaveOkay();
try {
MongoCursor::doQuery();
}
catch(MongoCursorException $e) {
$this->slaveOkay(false);
MongoCursor::doQuery();
}
}
}
?>
]]>
</programlisting>
</example><!-- }}} -->
</para>
</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
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
-->