Set multiple columns by array (willoverwrite all existing).

@param array $columns
321035
public function setColumns(array $columns)
    {
        $useColumns = [];

        foreach ($columns as $col) {
            $col = $this->createColumn($col);
            $useColumns[$col->getUniqueId()] = $col;
        }

        $this->columns = $useColumns;
    }
179068
public function set(array $columns)
    {
        parent::set($columns);
        $compiler = $this->connection->getCompiler();
        return $this->connection->count($compiler->update($this->sql), $compiler->getParams());
    }
933073
function columns(array $columns)
    {
        foreach ($columns as &$col) {
            if (!$col instanceof Attribute) {
                $col = new UnqualifiedColumn($col);
            }
        }
        $this->nodes->columns = $columns;
        return $this;
    }
1082579
public function columns(string $column, string ...$columns)
    {
        array_unshift($columns, $column);

        foreach ($columns as $column) {
            $this->column($column);
        }

        return $this;
    }
1206150
public function setMaxColumns($columns, $size = null)
    {
        if (is_null($size)) {
            $size = $this->baseSize;
        }
        $columnAttribute = 'max' . ucfirst($size) . 'Columns';
        $this->{$columnAttribute} = $columns;
    }
1311904
public function setAll(array $values) {
		foreach ($values as $name => $value) {
			$this->set($name, $value);
		}
	}
332870
public function addColumns(array $columns) {
        foreach ($columns as $column => $options) {
            $this->addColumn($column, $options);
        }

        return $this;
    }
705695
public function columns(array $columns): self
    {
        foreach ($columns as $name => $alias) {
            if (!is_string($name)) {
                $this->column($alias, null);
                continue;
            }
            if (is_string($alias)) {
                $this->column($name, $alias);
            } else {
                $this->column($alias, $name);
            }
        }
        return $this;
    }
1205812
private function buildColumns(array $columns)
    {
        $this->columns = [];
        foreach ($columns as $key => $column)
        {
            $column = new DataTableColumn($column);
            $this->columns[$key] = $column;
            if($column->getName() != ""){
                $this->columns[$column->getName()] = $column;
            }
            if($column->getData() != ""){
                $this->columns[$column->getData()] = $column;
            }
        }
    }
1292980
public function setSortColumns(array $columns)
    {
        $this->sortColumns = [];
        $this->mappingSortColumns = [];

        foreach ($columns as $i => $column) {
            if (!isset($column['name'])) {
                throw new InvalidArgumentException('The "name" property of sort column must be present ("sort" property is optional)');
            }

            if (isset($column['sort']) && 'asc' !== $column['sort'] && 'desc' !== $column['sort']) {
                throw new InvalidArgumentException('The "sort" property of sort column must have "asc" or "desc" value');
            }

            if ($this->isSorted($column['name'])) {
                throw new InvalidArgumentException(sprintf('The "%s" column is already sorted', $column['name']));
            }

            $this->sortColumns[] = $column;
            $this->mappingSortColumns[$column['name']] = $i;
        }

        return $this;
    }
1652
public function columns($columns)
  {
    if ( is_null($this->columns) ){
      $this->columns = new Element('()', $columns);
    }
    else {
      $this->columns->append($columns);
    }

    return $this;
  }
1279135
public function columns( $column )
    {
        if( is_array($column ) ) {
            $this->columns += $column;
        } elseif( func_num_args() > 1 ) {
            $column = func_get_args();
            $this->columns += $column;
        }
        return $this;
    }
1057252
public function setColumns($columns)
    {
        foreach ($columns as $c) {
            $this->setColumn($c, isset($c['show']) ? $c['show'] : true);
        }

        return $this;
    }
596098
public function setMultiple(array $values)
    {
        foreach ($values as $column => $value) {
            $this->set($column, $value);
        }

        return $this;
    }
990724
public function columns($columns = '*')
    {
        if ('*' == $columns) {
            $this->columns = ['*'];
        } else {
            $columns = $this->prepareNames(func_get_args());
            $this->columns = array_values(array_diff($columns, ['*']));
        }
        return $this;
    }
65629
public function setTables($tables) {
		foreach($tables as $key=>$value) {
			if (is_numeric($key)) {
				$this->tables[] = $value;
			}
			else {
				$this->tables[] = $key;
				$this->columns[$key] = $value;
			}
		}
		$this->cacheTables = true;
	}
725354
public function columns(array $columns)
    {
        foreach ($columns as $name => $value) {
            $this->columns[$this->grammar->buildId($name)] = $value;
        }

        return $this;
    }