Phalcon\Db\Adapter\MongoDB\Operation\Distinct::createCommand PHP Méthode

createCommand() private méthode

Create the distinct command.
private createCommand ( MongoDB\Driver\Server $server ) : MongoDB\Driver\Command
$server MongoDB\Driver\Server
Résultat MongoDB\Driver\Command
    private function createCommand(Server $server)
    {
        $cmd = ['distinct' => $this->collectionName, 'key' => $this->fieldName];
        if (!empty($this->filter)) {
            $cmd['query'] = (object) $this->filter;
        }
        if (isset($this->options['maxTimeMS'])) {
            $cmd['maxTimeMS'] = $this->options['maxTimeMS'];
        }
        if (isset($this->options['readConcern']) && Functions::serverSupportsFeature($server, self::$wireVersionForReadConcern)) {
            $cmd['readConcern'] = Functions::readConcernAsDocument($this->options['readConcern']);
        }
        return new Command($cmd);
    }