Method | Description | |
---|---|---|
__construct ( string $databaseName, string $collectionName, string $fieldName, array | object $filter = [], array $options = [] ) | Constructs a distinct command. | |
execute ( MongoDB\Driver\Server $server ) : mixed[] | Execute the operation. |
Method | Description | |
---|---|---|
createCommand ( MongoDB\Driver\Server $server ) : MongoDB\Driver\Command | Create the distinct command. |
public __construct ( string $databaseName, string $collectionName, string $fieldName, array | object $filter = [], array $options = [] ) | ||
$databaseName | string | Database name |
$collectionName | string | Collection name |
$fieldName | string | Field for which to return distinct values |
$filter | array | object | Query by which to filter documents |
$options | array | Command options |
public execute ( MongoDB\Driver\Server $server ) : mixed[] | ||
$server | MongoDB\Driver\Server | |
return | mixed[] |