@param Join $join

@return self
343485
public function addJoin($join)
    {
        if (!$this->joins->contains($join)) {
            $this->joins[] = $join;
        }

        return $this;
    }
1188041
public function rightJoinUsing($table, $where)
    {
        $where = func_get_args();
        $table = array_shift($where);

        $this->join[] = [self::RIGHT, $table, $where, true];

        return $this;
    }
1289285
public function with(...$with): self
    {
        $this->hasWith = true;
        $this->with = $with;

        return $this;
    }
154619
protected function compileOneJoin(Join $join, array &$bindings): string
    {
        $sql = $join->type.' JOIN '.$this->compileIdentifierWithAlias($join->table, $join->tableAlias, $bindings);

        if ($join->criteria) {
            $sql .= ' ON '.$this->compileCriteria($join->criteria, $bindings);
        }

        return $sql;
    }
1110389
private function prepareJoin(array $join)
    {
        if ($join['table'] instanceof SelectQuery) {
            [$sql, $params] = $join['table']->toSql();

            $join['table'] = '(' . $sql . ')';

            $join['params'] = $params;
        }

        if ($join['on'] instanceof Conditions) {
            [$sql, $params] = $join['on']->toSql();

            $join['on'] = $sql;

            $join['params'] = array_merge($join['params'], $params);
        }

        return $join;
    }
1288282
public function join(string $table, \Closure $joinConstructor)
    {
        $join = new Join($table);
        $joinConstructor($join);

        $this->joins[] = $join;

        return $this;
    }
682892
public function join(string $combiner, self $expr): self
    {
        $path = $this->__toString().$combiner;

        if ('*/' !== $expr->path) {
            $path .= $expr->path;
        }

        $this->path = $path;
        $this->element = $expr->element;
        $this->condition = $expr->condition;

        return $this;
    }
884031
public function asJoined(bool $joined = true)
    {
        $node = clone $this;
        $node->joined = $joined;

        return $node;
    }
664837
protected function parseJoin($join)
    {
        $result = implode(' ', $join);
        foreach($join as $item)
        {
            $this->params = array_merge($this->params, $item->getBinds());
        }
        return $result;
    }
958491
public function remove( $member )
    {
        if( false !== $key = array_search( $member, $this->members, true ) ) {
            unset( $this->members[$key] );
        }
        return $this;
    }
1140942
public function selectOne(Query $query, $join = 'all')
        {
            $row = $this->rawSelectOne($query, $join);
            return $this->populateFromRow($row);
        }
1013378
public function addJoinObject(Join $join, $name = null)
    {
        if (!in_array($join, $this->joins)) { // compare equality, NOT identity
            if (null === $name) {
                $this->joins[] = $join;
            } else {
                $this->joins[$name] = $join;
            }
        }

        return $this;
    }
1073823
public function resultsInJoin($join)
    {
        if (!is_numeric($join)) {
            $errMsg = 'Аргумент должен быть числом';
            throw new ArgumentNotNumericException($errMsg);
        }

        $join = (integer)$join;

        $actions = $this->getActions();

        foreach ($actions as $actionDescriptor) {
            if ($join === $actionDescriptor->getUnconditionalResult()->getJoin()) {
                return true;
            }

            $results = $actionDescriptor->getConditionalResults();
            foreach ($results as $resultDescriptor) {
                if ($join === $resultDescriptor->getJoin()) {
                    return true;
                }
            }
        }

        return false;
    }
1324875
public function join($join) {
		$joins = $this->get('join', array());
		$joins[] = $join;
		return $this->sget('join', $joins);
	}
146401
protected function _createJoinStatement(Select\Join $join )
    {
        $template = " %s JOIN %s%s ON %s";
        $alias = (is_null($join->getAlias())) ?
            null : " AS {$join->getAlias()}";

        return sprintf(
            $template,
            $join->getType(),
            $join->getTable(),
            $alias,
            $join->getOnClause()
        );
    }
761371
public function openBracket(string $join = null){
		$join = strtoupper(trim($join));

		if(in_array($join, $this->joinArgs, true)){
			$this->where[] = $join;
		}

		$this->where[] = '(';

		return $this;
	}
680124
public function join($join = [])
    {
        $this->string['join'] = $this->useBuilder('join')->join($join, $this->getBase()->getTable());
        return $this;
    }