inner join语句

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

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

        return $this;
    }
1311085
public function createTable($table, $alias = null)
    {
        $tableObject = $this->facade->createTable($this, $table);

        if ($alias) {
            $tableObject->setAlias($alias);
        }

        return $tableObject;
    }
474393
private function setJoin($table, $field, $parentField, $alias, $parentAlias)
    {
        if (!in_array($alias, $this->tables)) {
            $condition = $this->getFullFieldName($field, $alias).' = '.$this->getFullFieldName($parentField, $parentAlias);
            $this->queryBuilder->join($table, $alias, 'WITH', $condition);
            $this->tables[] = $alias;
        }
    }
51637
public function query($table = null, $alias = null)
    {
        return $this->_di->get('ManaPHP\Db\Query', [$this])->from($table, $alias);
    }
474893
public function setFrom($table, $alias = null)
    {
        $this->table = $table;
        $this->aliasTable = $alias === null ? $table : $alias;

        return $this;
    }
1334408
public function rightJoin($table, $criteria = null, $alias = null)
    {
        return $this->join($table, $criteria, self::RIGHT_JOIN, $alias);
    }
1256342
public function doJoin($joinType, $table, $alias = null, $joinOn = null)
    {
        $this->joinTables[] = $tableObject = $this->createTable($table, $alias);

        $joinMetadata = new JoinMetadata();
        $joinMetadata->setJoinType($joinType);

        if ($joinOn) {
            $relativeOn = new RelativeClause($tableObject, $joinOn, RelativeClause::SELF_DIRECTIVE);
            $joinMetadata->setJoinOn($relativeOn);
        }

        $tableObject->setJoinMetadata($joinMetadata);
        is_callable($table) && $table($tableObject, $joinMetadata);

        return $tableObject;
    }
331635
public function innerJoin($table, $constraint, $tableAlias = null)
    {
        return $this->addJoinSource('INNER', $table, $constraint, $tableAlias);
    }
1069281
public final function join($tableName, $targetTableName = null, $alias = null)
    {
        return new QueryHelper\QueryJoin($this, $tableName, 'JOIN', $targetTableName, $alias);
    }
787089
public function from($table, $alias = null)
    {
        if ($alias === null) {
            $this->from[] = $this->grammar->buildId($table);
        } else {
            $this->from[] = $this->grammar->buildIdWithAlias($table, $alias);
        }

        return $this;
    }
930555
public function join($trueTableName, $alias, $on) {
        $join = new Join($trueTableName, $alias, $on);

        $this->statementContext->getJoinClause()->addJoin($join);
        return $this;
    }
966505
private function GetTableJoinSQL($criteria)
	{
		$sql = "";
		
		$tablenames = array_keys($this->Tables);
		
		if (count($tablenames) > 1)
		{
			// we're selecting from multiple tables so we have to do an outer join
			$sql .= " from `" . $tablenames[0] . "`";
				
			// WARNING: if tables are being joined in the incorrect order, it is likely
			// caused by a query that goes across more than one foreign relationship.
			// you can force tables to be joined in a specific order by adding a field
			// reference in the outermost Phreezable FieldMap.  QueryBuilder will
			// include tables in whatever order they are references, so you can control
			// this by simply adding in referenced to foreign field in the order you want
			// the tables to be joined
			//for ($i = count($tablenames) -1; $i > 0 ; $i--) // this iterates backwards
			for ($i = 1; $i < count($tablenames); $i++)      // this iterates forwards
			{
				try
				{
					$sql .= $this->Joins[$tablenames[$i]];
				}
				catch (Exception $ex)
				{
					// if 'undefined index' occurs here, there is likely a foreign field in the fieldmap that does not have it's related keymap set to KM_LOAD_EAGER
					throw new Exception("An invalid join was attempted from table '" . $tablenames[$i] 
						. "'. Please verify that the KeyMap fetching strategy for table '" . $tablenames[0]
						. "' has been properly configured.");
				}
			}
		}
		else
		{
			// we are only selecting from one table
			// (LL) added backticks here
			$sql .= " from `" . $tablenames[0] . "` ";
		}
		
		return $sql;
	}
331595
public function innerJoin($join, $alias)
    {
        if (!in_array($alias, $this->joins)) {
            $this->queryBuilder->innerJoin($join, $alias);
            array_push($this->joins, $alias);
        }

        return $this;
    }
1366895
public static function create($modelAlias = null, $criteria = null)
    {
        if ($criteria instanceof UserCustomerRelationQuery) {
            return $criteria;
        }
        $query = new UserCustomerRelationQuery(null, null, $modelAlias);

        if ($criteria instanceof Criteria) {
            $query->mergeWith($criteria);
        }

        return $query;
    }
525878
public function updateInDatabase($table, array $data, array $criteria = [])
    {
        $query = $this->_getDriver()->update($table, $data, $criteria);
        $parameters = array_merge(array_values($data), array_values($criteria));
        $this->debugSection('Query', $query);
        if (!empty($parameters)) {
            $this->debugSection('Parameters', $parameters);
        }
        $this->_getDriver()->executeQuery($query, $parameters);
    }
648529
public function table($table, $alias = null)
    {
        if ($alias) {
            $table = [$alias => $table];
        } elseif (!is_array($table)) {
            $table = [$table];
        }

        $this->joins = [];
        foreach ($table as $alias => $name) {
            if ($name instanceof QueryInterface) {
                $expression = '(' . $name->getQuery() . ')';
            } else {
                $expression = $this->connection->quoteIdentifier($name);
            }
            if (is_string($alias)) {
                $this->tables[$alias] = $expression . ' ' . $alias;
            } else {
                $this->tables[$name] = $expression;
            }
        }

        return $this;
    }
905591
public function sqlJoin($joinType, $tableName, $on, $alias)
    {
        if (is_string($tableName)) {
            $tableName = TableNameResolver::getTableName($tableName, $this->tablePrefix);
        } elseif ($tableName instanceof self) {
            $tableName = $tableName->toSQL();
        }

        $onSQL = [];
        if (is_string($on)) {
            $onSQL[] = $this->getAdapter()->quoteSql($on);
        } else {
            foreach ($on as $leftColumn => $rightColumn) {
                if ($rightColumn instanceof Expression) {
                    $onSQL[] = $this->getQuotedName($leftColumn).'='.$this->getAdapter()->quoteSql($rightColumn->toSQL());
                } else {
                    $onSQL[] = $this->getQuotedName($leftColumn).'='.$this->getQuotedName($rightColumn);
                }
            }
        }

        if (false !== strpos($tableName, 'SELECT')) {
            return $joinType.' ('.$this->getAdapter()->quoteSql($tableName).')'.(empty($alias) ? '' : ' AS '.$this->getQuotedName($alias)).' ON '.implode(',', $onSQL);
        }

        return $joinType.' '.$this->getQuotedName($tableName).(empty($alias) ? '' : ' AS '.$this->getQuotedName($alias)).' ON '.implode(',', $onSQL);
    }