Moodle PHP Documentation 4.1
Moodle 4.1.11 (Build: 20240610) (c8c84b4af18)
MongoDB\Operation\Explain Class Reference
Inheritance diagram for MongoDB\Operation\Explain:
MongoDB\Operation\Executable

Public Member Functions

 __construct (string $databaseName, Explainable $explainable, array $options=[])
 Constructs an explain command for explainable operations.
 
 execute (Server $server)
 Execute the operation.
 

Public Attributes

const VERBOSITY_ALL_PLANS = 'allPlansExecution'
 
const VERBOSITY_EXEC_STATS = 'executionStats'
 
const VERBOSITY_QUERY = 'queryPlanner'
 

Constructor & Destructor Documentation

◆ __construct()

MongoDB\Operation\Explain::__construct ( string $databaseName,
Explainable $explainable,
array $options = [] )

Constructs an explain command for explainable operations.

Supported options:

  • comment (mixed): BSON value to attach as a comment to this command.

    This is not supported for servers versions < 4.4.

  • readPreference (MongoDB\Driver\ReadPreference): Read preference.
  • session (MongoDB\Driver\Session): Client session.
  • typeMap (array): Type map for BSON deserialization. This will be used used for the returned command result document.
  • verbosity (string): The mode in which the explain command will be run.
Parameters
string$databaseNameDatabase name
Explainable$explainableOperation to explain
array$optionsCommand options
Exceptions
InvalidArgumentExceptionfor parameter/option parsing errors

Member Function Documentation

◆ execute()

MongoDB\Operation\Explain::execute ( Server $server)

Execute the operation.

See also
Executable\execute()
Return values
array|object
Exceptions
UnsupportedExceptionif the server does not support explaining the operation
DriverRuntimeExceptionfor other driver errors (e.g. connection errors)

Implements MongoDB\Operation\Executable.


The documentation for this class was generated from the following file: