right join语句

@param string       $table
@param string|array $criteria
@param string       $alias

@return QueryBuilder
@throws \Swoft\Db\Exception\DbException
168984
public function rightJoin(string $table, $criteria = null, string $alias = null): self
    {
        $table = $this->getTableNameByClassName($table);
        $this->join($table, $criteria, self::RIGHT_JOIN, $alias);

        return $this;
    }
60748
public function rightJoin($table, $condition = null, $alias = null)
    {
        return $this->join($table, $condition, $alias, 'RIGHT');
    }
715945
private function _join($type, $mixed, $criteria, $alias='')
    {
        if (is_object($mixed)) {
            $this->_joins []= sprintf('%s (%s) %s %s', $type, $mixed, $alias ?: 'derived', $criteria);
        } elseif ($alias) {
            $this->_joins []= sprintf('%s `%s` AS `%s` %s', $type, $mixed, $alias, $criteria);
        } else {
            $this->_joins []= sprintf('%s `%s` %s', $type, $mixed, $criteria);
        }

        return $this;
    }
143221
public function rightJoin(string $tableName, string $tableAlias, string $condition) : self
    {
        $this->joins['right'][] = ['tableName' => $tableName, 'tableAlias' => $tableAlias, 'condition' => $condition];

        return $this;
    }
785985
public function rightJoinOn($table, $where)
    {
        //argument test
        Argument::i()
            //Argument 1 must be a string
            ->test(1, 'string')
            //Argument 2 must be a string
            ->test(2, 'string');
        
        $where = func_get_args();
        $table = array_shift($where);
        
        $this->join[] = array(self::RIGHT, $table, $where, false);
        
        return $this;
    }
543445
private function join(string $type, $source, $table, $on = null, array $params = [])
    {
        if ($source) {
            $source = $this->getSourceName($source);
        }

        [$tableAlias, $tableName] = $this->dialect()->parseTable($table);

        if ($tableName instanceof SelectQuery) {
            if (!$tableAlias) {
                throw new SqlException('JOIN table should have an alias name.');
            }

            $tableKey = $tableAlias;
        } else {
            $tableKey = $tableAlias ?: $tableName;

            $tableName = $this->dialect()->quoteTable($tableName);
        }

        if ($tableAlias) {
            $tableAlias = $this->dialect()->quoteName($tableAlias);
        }

        if (is_callable($on)) {
            $conditions = new Conditions($this->dialect());

            call_user_func_array($on, [$conditions]);

            $on = $conditions;
        }

        if (is_scalar($on)) {
            $on = $this->dialect()->quote($on);
        }

        $this->addJoin($tableKey, $type, $source, $tableName, $tableAlias, $on, $params);

        return $this;
    }
1191915
public function join($table, $on, $type = 'full', $alias = '')
    {
        if (!isset($this->joins)) {
            $this->joins = [];
        }
        $join = [
            'table' => $this->trimName($table),
            'on' => $on,
            'type' => $type,
        ];
        if (!empty($alias)) {
            $join['alias'] = $this->trimName($alias);
        }
        $this->joins = array_merge($this->joins, [$join]);
        return $this;
    }
502360
public function rightJoin($table, $field1, $operator, $field2) {
        array_push($this->_joins, ' RIGHT JOIN ' . $table . ' ON ' . $field1 . ' ' . $operator . ' ' . $field2 . ' ');
    
        return $this;
    }
806119
public function leftJoin($table, ...$criterion): self
    {
        $this->join[] = $this->joinArgumentsToJoinObject('LEFT', $table, $criterion);
        return $this;
    }
139236
public function leftJoin($table, $alias = null, $on = null)
    {
        return $this->join($table, $alias, $on, 'LEFT JOIN');
    }
736525
public function leftJoin($table, $alias_or_cond, $cond = null) {
		if (is_null($cond))
			$this->joins[] = new JoinClause(JoinClause::LEFT_JOIN, $table, null, $alias_or_cond);
		else
			$this->joins[] = new JoinClause(JoinClause::LEFT_JOIN, $table, $alias_or_cond, $cond);
		return $this;
	}
991959
public function join($table, $criteria = null, $type = self::INNER_JOIN, $alias = null)
    {
        if (!$this->isJoinUnique($table, $alias)) {
            return $this;
        }

        if (is_string($criteria)) {
            $criteria = array($criteria);
        }

        $this->join[] = array('table' => $table,
            'criteria' => $criteria,
            'type' => $type,
            'alias' => $alias);

        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;
    }
667053
public function from($table, $alias = null) {
        $this->_table = (string) $table;
        $this->asAlias($alias);

        return $this;
    }
1224278
public function join($tableName, $alias = null)
    {
        $this->joins[] = ' LEFT JOIN ?f as ?f';
        $this->lastJoinAlias = $alias;
        $this->joinArguments[] = $tableName;
        $this->joinArguments[] = $alias;
        return $this;
    }
299824
public function subQuery( $table, $alias=null )
    {
        $sub = new self();
        if( !$alias ) $alias = 'sub_' . $this->subQueryCount ++;
        $sub->table( $table, $alias );
        $sub->setParentTable( $this->getAliasOrTable() );
        return $sub;
    }
167080
public function leftJoin($fromAlias, $join, $alias, $condition = null)
    {
        $this->_dbPending[] = [
            'name' => 'leftJoin',
            'args' => [
                $fromAlias,
                $join,
                $alias,
                $condition
            ],
        ];

        return $this;
    }