MongoDB\Driver\Server::executeReadCommand

(mongodb >=1.4.0)

MongoDB\Driver\Server::executeReadCommandExecute a database command that reads on this server

Beschreibung

final public MongoDB\Driver\Server::executeReadCommand(string $db, MongoDB\Driver\Command $command, array $options = array()): MongoDB\Driver\Cursor

Executes the command on this server.

This method will apply logic that is specific to commands that read (e.g. » count) and take the MongoDB server version into account. The "readConcern" option will default to the corresponding value from the MongoDB Connection URI.

Hinweis: The "readPreference" option does not control the server to which the driver issues the operation; it will always be executed on this server object. Instead, it may be used when issuing the operation to a secondary (from a replica set connection, not standalone) or mongos node to ensure that the driver sets the wire protocol accordingly or adds the read preference to the operation, respectively.

Parameter-Liste

db (string)

The name of the database on which to execute the command.

command (MongoDB\Driver\Command)

The command to execute.

options

options
Option Type Description
readConcern MongoDB\Driver\ReadConcern

A read concern to apply to the operation.

This option is available in MongoDB 3.2+ and will result in an exception at execution time if specified for an older server version.

readPreference MongoDB\Driver\ReadPreference

A read preference to use for selecting a server for the operation.

session MongoDB\Driver\Session

A session to associate with the operation.

Warnung

If you are using a "session" which has a transaction in progress, you cannot specify a "readConcern" or "writeConcern" option. This will result in an MongoDB\Driver\Exception\InvalidArgumentException being thrown. Instead, you should set these two options when you create the transaction with MongoDB\Driver\Session::startTransaction().

Rückgabewerte

Returns MongoDB\Driver\Cursor on success.

Fehler/Exceptions

Siehe auch

Hier Kannst Du einen Kommentar verfassen


Bitte gib mindestens 10 Zeichen ein.
Wird geladen... Bitte warte.
* Pflichtangabe
Es sind noch keine Kommentare vorhanden.

Was genau bedeutet "Vibe Coding"? Ein tiefgehender Blick für Entwickler

In der Welt der Softwareentwicklung gibt es unzählige Wege, wie man an ein Projekt herangeht. Manche schwören auf strikte Planung, andere auf bewährte Algorithmen und wieder andere lassen sich von etwas ganz anderem leiten: ihrem Gefühl. ...

admin

Autor : admin
Kategorie: Software & Web-Development

PHP cURL-Tutorial: Verwendung von cURL zum Durchführen von HTTP-Anfragen

cURL ist eine leistungsstarke PHP-Erweiterung, die es Ihnen ermöglicht, mit verschiedenen Servern über verschiedene Protokolle wie HTTP, HTTPS, FTP und mehr zu kommunizieren. ...

TheMax

Autor : TheMax
Kategorie: PHP-Tutorials

Midjourney Tutorial - Anleitung für Anfänger

Über Midjourney, dem Tool zur Erstellung digitaler Bilder mithilfe von künstlicher Intelligenz, gibt es ein informatives Video mit dem Titel "Midjourney Tutorial auf Deutsch - Anleitung für Anfänger" ...

Mike94

Autor : Mike94
Kategorie: KI Tutorials

Tutorial veröffentlichen

Tutorial veröffentlichen

Teile Dein Wissen mit anderen Entwicklern weltweit

Du bist Profi in deinem Bereich und möchtest dein Wissen teilen, dann melde dich jetzt an und teile es mit unserer PHP-Community

mehr erfahren

Tutorial veröffentlichen

在线购买中国护照(Telegram:@Globaldocs16)购买中国护照、身份证、驾驶证

在线购买中国护照(Telegram:@Globaldocs16)购买中国护照、身份证、驾驶证、绿卡、居留证、雅思成绩、工作证、公 ...

Geschrieben von toretovon76 am 16.06.2026 02:27:48
Forum: XML
Buy real and fake Passports (WhatsApp: +1 (615)-314-6286) renew passports

Buy real and fake Passports (WhatsApp: +1 (615)-314-6286) renew passports online, apply for legal passports, buy fake passports, Buy US passports, ...

Geschrieben von toretovon76 am 16.06.2026 02:26:40
Forum: XML
在线购买中国护照(Telegram:@Globaldocs16)购买中国护照、身份证、驾驶证、绿卡

在线购买中国护照(Telegram:@Globaldocs16)购买中国护照、身份证、驾驶证、绿卡、居留证、雅思成绩、工作证、公 ...

Geschrieben von toretovon76 am 16.06.2026 02:24:23
Forum: SQL / Datenbanken
Buy real and fake Passports (WhatsApp: +1 (615)-314-6286) renew passports

Buy real and fake Passports (WhatsApp: +1 (615)-314-6286) renew passports online, apply for legal passports, buy fake passports, Buy US passports, ...

Geschrieben von toretovon76 am 16.06.2026 02:23:45
Forum: SQL / Datenbanken