Specifies the expressions to select. Duplicate results may be eliminated.

@since 0.3

@param string|string[] $expressions
@return self
@throws InvalidArgumentException
@throws RuntimeException
184816
public function selectReduced( $expressions /* expressions ... */ ) {
		$expressions = is_array( $expressions ) ? $expressions : func_get_args();

		$this->setQueryForm( 'SELECT' );
		$this->uniqueness = 'REDUCED ';
		$this->addExpressions( $expressions );

		return $this;
	}
644517
protected static function convertNthExpression($expression)
    {
        if ($expression === '') {
            throw new InvalidSelectorException('nth-child (or nth-last-child) expression must not be empty');
        }

        if ($expression === 'odd') {
            return 'position() mod 2 = 1 and position() >= 1';
        }

        if ($expression === 'even') {
            return 'position() mod 2 = 0 and position() >= 0';
        }

        if (is_numeric($expression)) {
            return sprintf('position() = %d', $expression);
        }

        if (preg_match("/^(?P<mul>[0-9]?n)(?:(?P<sign>\+|\-)(?P<pos>[0-9]+))?$/is", $expression, $segments)) {
            if (isset($segments['mul'])) {
                $multiplier = $segments['mul'] === 'n' ? 1 : trim($segments['mul'], 'n');
                $sign = (isset($segments['sign']) && $segments['sign'] === '+') ? '-' : '+';
                $position = isset($segments['pos']) ? $segments['pos'] : 0;

                return sprintf('(position() %s %d) mod %d = 0 and position() >= %d', $sign, $position, $multiplier, $position);
            }
        }

        throw new InvalidSelectorException(sprintf('Invalid nth-child expression "%s"', $expression));
    }
1176128
public function selectElemMatch($fieldName, $expression)
    {
        if ($expression instanceof Expr) {
            $expression = $expression->getQuery();
        }
        $this->query['select'][$fieldName] = array('$elemMatch' => $expression);
        return $this;
    }
184397
public function setOperators(array $operators): self
    {
        foreach ($operators as $operator) {
            $this->validateOperator($operator);
        }
        $this->operators = $operators;

        return $this;
    }
1188232
public function select($fields)
    {
        if (!is_array($fields)) {
            $fields = func_get_args();
        }

        $fields = $this->addTablePrefix($fields);
        $this->addStatement('selects', $fields);
        return $this;
    }
991936
public function selectRaw(string $expression, array $bindings = []): BaseQueryRelateContract
    {
        $this->query->selectRaw($expression, $bindings);

        return $this;
    }
820253
public function addEvaluatedExpressions(array $expressions)
    {
        foreach ($expressions as $expression => $result) {
            try {
                $this->evaluatedExpressions[] = $this->addVariable($expression, $result);
            } catch (BufferFullException $e) {
                $this->evaluatedExpressions[] = $this->variableTable->bufferFullVariable();
            }
        }
    }
425236
public function setExpressions(array $expressions)
    {
        $this->expressions = array();

        foreach ($expressions as $expression) {
            $this->addExpression($expression);
        }

        return $this;
    }
1316590
public function norX(array $expressions)
    {
        $self = $this;
        return function ($object) use ($self, $expressions) {
            $orX = $self->orX($expressions);
            return !$orX($object);
        };
    }
817482
public function withExpression(string $expression): self
    {
        if (!(new \ReflectionClass($expression))->implementsInterface(Expression::class)) {
            throw new DomainException($expression);
        }

        $self = clone $this;
        $self->expression = new $expression($self->name);

        return $self;
    }
524599
public function setExpr($expression) {
		$this->valueList = func_get_args();
		$this->expression = array_shift($this->valueList);
		return $this;
	}
102308
protected function allExpressions(array $expressions=null, &$all=null)
    {

        $expressions = $expressions ?: $this->expressions();
        $all = $all ?: [];

        foreach ($expressions as $expression) {

            $all[] = $expression;

            if ($expression instanceof HasExpressions) {
                $this->allExpressions($expression->expressions(), $all);
            }

        }

        return $all;
    }
226329
public function setValues($values)
    {
        if ((null !== $values) && (false === is_array($values))) {
            if (false === ($values instanceof ArrayAccess)) {
                throw new InvalidArgumentException(
                    'The value of $values is not an array or an instance of ArrayAccess.'
                );
            }
        }

        $this->values = $values;
    }
1331919
public static function normalize($expression)
    {
        if (is_callable($expression)) {
            $expressionConfigurator = $expression;
            $expression = new Expression;
            call_user_func($expressionConfigurator, $expression);
        }

        if ($expression instanceof Expression) {
            $expression = $expression->toArray();
        } elseif (is_array($expression)) {
            foreach ($expression as $fieldName => $value) {
                $expression[$fieldName] = self::normalize($value);
            }
        }

        return $expression;
    }
592493
public function select($expression = '*')
    {
        if (!is_array($expression)) {
            $expression = explode(',', $expression);
        }

        $this->type        = self::TYPE_SELECT;
        $this->expressions = array_merge($this->expressions, array_map(function ($expression, $alias) {
            return is_string($alias) ? "$expression AS $alias" : $expression;
        }, $expression, array_keys($expression)));

        return $this;
    }
608405
public void setExpressions(java.util.Collection<ExpressionStatus> expressions) {
        if (expressions == null) {
            this.expressions = null;
            return;
        }

        this.expressions = new com.amazonaws.internal.SdkInternalList<ExpressionStatus>(expressions);
    }
689115
protected function createMatchQuery($expression, array $fields = [])
    {
        if (0 == strlen($expression)) {
            return new Query\MatchAll();
        }

        if (empty($fields)) {
            $fields = $this->getDefaultMatchFields();
        }

        $query = new Query\MultiMatch();
        $query
            ->setQuery($expression)
            ->setFields($fields);

        return $query;
    }