| Moodle PHP Documentation 4.1
    Moodle 4.1.19+ (Build: 20250711) (5f47dc23ffc) | 
 
  
| Public Member Functions | |
| __construct (string $databaseName, string $collectionName, string $fieldName, $filter=[], array $options=[]) | |
| Constructs a distinct command. | |
| execute (Server $server) | |
| Execute the operation. | |
| getCommandDocument (Server $server) | |
| Returns the command document for this operation. | |
| MongoDB\Operation\Distinct::__construct | ( | string | $databaseName, | 
| string | $collectionName, | ||
| string | $fieldName, | ||
| $filter = [], | |||
| array | $options = [] ) | 
Constructs a distinct command.
Supported options:
comment (mixed): BSON value to attach as a comment to this command.
This is not supported for servers versions < 4.4.
| string | $databaseName | Database name | 
| string | $collectionName | Collection name | 
| string | $fieldName | Field for which to return distinct values | 
| array | object | $filter | Query by which to filter documents | 
| array | $options | Command options | 
| InvalidArgumentException | for parameter/option parsing errors | 
| MongoDB\Operation\Distinct::execute | ( | Server | $server | ) | 
Execute the operation.
| array | 
| UnexpectedValueException | if the command response was malformed | 
| UnsupportedException | if read concern is used and unsupported | 
| DriverRuntimeException | for other driver errors (e.g. connection errors) | 
Implements MongoDB\Operation\Executable.
| MongoDB\Operation\Distinct::getCommandDocument | ( | Server | $server | ) | 
Returns the command document for this operation.
| array | 
Implements MongoDB\Operation\Explainable.