Explain
in package
implements
Executable
Operation for the explain command.
Tags
Interfaces, Classes, Traits and Enums
- Executable
Table of Contents
- VERBOSITY_ALL_PLANS = 'allPlansExecution'
- VERBOSITY_EXEC_STATS = 'executionStats'
- VERBOSITY_QUERY = 'queryPlanner'
- $databaseName : string
- $explainable : Explainable
- $options : array<string|int, mixed>
- $wireVersionForAggregate : int
- __construct() : mixed
- Constructs an explain command for explainable operations.
- execute() : array<string|int, mixed>|object
- Execute the operation.
- createOptions() : array<string|int, mixed>
- Create options for executing the command.
- isFindAndModify() : bool
Constants
VERBOSITY_ALL_PLANS
public
mixed
VERBOSITY_ALL_PLANS
= 'allPlansExecution'
VERBOSITY_EXEC_STATS
public
mixed
VERBOSITY_EXEC_STATS
= 'executionStats'
VERBOSITY_QUERY
public
mixed
VERBOSITY_QUERY
= 'queryPlanner'
Properties
$databaseName
private
string
$databaseName
$explainable
private
Explainable
$explainable
$options
private
array<string|int, mixed>
$options
$wireVersionForAggregate
private
static int
$wireVersionForAggregate
= 7
Methods
__construct()
Constructs an explain command for explainable operations.
public
__construct(string $databaseName, Explainable $explainable[, array<string|int, mixed> $options = [] ]) : mixed
Supported options:
-
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
- $databaseName : string
-
Database name
- $explainable : Explainable
-
Operation to explain
- $options : array<string|int, mixed> = []
-
Command options
Tags
Return values
mixed —execute()
Execute the operation.
public
execute(Server $server) : array<string|int, mixed>|object
Parameters
- $server : Server
Tags
Return values
array<string|int, mixed>|object —createOptions()
Create options for executing the command.
private
createOptions() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —isFindAndModify()
private
isFindAndModify(Explainable $explainable) : bool
Parameters
- $explainable : Explainable