PHP Class Phalcon\Db\Adapter\MongoDB\Operation\Distinct

See also: MongoDB\Collection::distinct()
See also: http://docs.mongodb.org/manual/reference/command/distinct/
Inheritance: implements Phalcon\Db\Adapter\MongoDB\Operation\Executable
Afficher le fichier Open project: phalcon/incubator Class Usage Examples

Méthodes publiques

Méthode 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.

Private Methods

Méthode Description
createCommand ( MongoDB\Driver\Server $server ) : MongoDB\Driver\Command Create the distinct command.

Method Details

__construct() public méthode

Supported options: * maxTimeMS (integer): The maximum amount of time to allow the query to run. * readConcern (MongoDB\Driver\ReadConcern): Read concern. For servers < 3.2, this option is ignored as read concern is not available. * readPreference (MongoDB\Driver\ReadPreference): Read preference.
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

execute() public méthode

Execute the operation.
See also: Executable::execute()
public execute ( MongoDB\Driver\Server $server ) : mixed[]
$server MongoDB\Driver\Server
Résultat mixed[]