Join another table.

@param string $table
@param string $on
@param array  $columns

@return object
332425
public function join($table, $on, array $columns = array())
    {
        if (!array_key_exists('joins', $this->query)) {
            $this->query['joins'] = array();
        }

        $this->query['select'] = array_merge($this->query['select'], $columns);
        $this->query['joins'][] = array($table, $on);

        return $this;
    }
923344
public function hasColumns($table, array $columns)
    {
        $tableColumns = array_map('strtolower', array_keys($this->getColumnListing($table)));

        foreach ($columns as $column) {
            if (!in_array(strtolower($column), $tableColumns)) {
                return false;
            }
        }

        return true;
    }
183066
public static function build(Table $table, array $columns = [])
    {
        $index = new Index();
        $index->setColumns($columns);

        return new static($table, $index);
    }
1061162
public function join($tableName, $joinType = 'left', $on, $joinTableFields = [])
    {
        switch (strtolower($joinType)) {
            case 'left':
                $joinType = ' LEFT JOIN ';
                break;
            case 'right':
                $joinType = ' RIGHT JOIN ';
                break;
            case 'inner':
                $joinType = ' INNER JOIN ';
                break;
            default:
                $joinType = ' LEFT JOIN ';
                break;
        }

        if (!empty($joinTableFields)) {
            $this->fields = array_merge($this->fields, $joinTableFields);
        }

        $this->setJoins($tableName, $joinType . $tableName . ' ON ' . $on);

        return $this;
    }
902587
public function rightJoin($table, $on, $joinField = null)
    {
        return $this->join($table, $on, $joinField, 'RIGHT');
    }
517835
protected function isColumnExcludedFromFilterable(string $on, array $columns = []): bool
    {
        $only = $columns['only'] ?? '';
        $except = $columns['except'] ?? '';

        return (! empty($only) && ! \in_array($on, (array) $only)) ||
            (! empty($except) && \in_array($on, (array) $except));
    }
351843
public function innerJoinOnTo($source, $table, $on)
    {
        $this->join('INNER', $source, $table, $on);

        return $this;
    }
863153
public function join($table, $alias = null, $on = null, $type = 'INNER JOIN')
    {
        $table = $this->connection->quoteIdentifier($table);

        $this->joins[$alias] = "$type $table $alias ON $on";

        return $this;
    }
467458
public function join($table, $on = null, $using = null, $type = 'JOIN')
    {
        $this->from->addJoin($table, $on, $using, $type);

        return $this;
    }
627250
public function has($table,  $on, $server=null, $fields='', $joinType='left'){
		$joinType = $joinType.' JOIN';	
		$this->driver->join($table, $on, $server, $fields, $joinType);
		return $this;
	}
652479
public function join($join = null, $on = [], $type = 'LEFT')
    {
        if (!$join) {
            return $this;
        }
        $this->_parts['joins'][] = compact('join', 'on', 'type');
        return $this;
    }
466454
public function join($table, $joinCondition, array $columns = null)
    {

        $join = array('table' => $table, 'conditions' => $joinCondition);

        if (isset($columns)) {
            $join['columns'] = $columns;
        }

        $this->q['join'][] = $join;

        return $this;
    }
825096
public function innerJoin($table) {
        JoinImpl::join($this->context,'INNER', $table);
        return new JoinOnRule($this->context);
    }
588479
public function insert($table, array $columns)
    {
        if (empty($columns)) {
            return 0;
        }
        return $this->getInsertBuilder()
            ->setTable($table)
            ->setColumns($columns)
            ->execute();
    }
1063335
public function withColumns(array $columns) : Table
    {
        if ($this->columns === $columns) {
            return $this;
        }

        return new self($this->name, $columns, $this->indexes, $this->foreignKeys);
    }
1002123
public static function left(Table $table, string $alias, array $on) : Join
    {
        return new self(self::LEFT, $table, $alias, $on);
    }
614061
public function rightJoinOnTo($source, $table, $on)
    {
        $this->join('RIGHT', $source, $table, $on);

        return $this;
    }