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
ファイルを表示 Open project: phalcon/incubator Class Usage Examples

Public Methods

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.

Private Methods

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

Method Details

__construct() public method

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 method

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