Create a proper column value arrays from incoming $columns and $values.

@param array       $columns
@param array|null  $values

@return array that can be parsed with list($columns, $values)
355377
public function mapColumnsWithValues($columns, $values)
    {
        // If $values is null, then use $columns to build it up
        if (is_null($values)) {

            if ($this->isAssoc($columns)) {

                // Incoming is associative array, split it up in two
                $values = array_values($columns);
                $columns = array_keys($columns);

            } else {

                // Create an array of '?' to match number of columns
                $max = count($columns);
                for ($i = 0; $i < $max; $i++) {
                    $values[] = '?';
                }
            }
        }

        return [$columns, $values];
    }
27304
public static Column[] toColumns(String... columns) {
        Column[] ret = new Column[columns.length];
        for (int i = 0; i < columns.length; i++)
            ret[i] = col(columns[i]);
        return ret;
    }
725354
public function columns(array $columns)
    {
        foreach ($columns as $name => $value) {
            $this->columns[$this->grammar->buildId($name)] = $value;
        }

        return $this;
    }
162649
protected function handleSetColumns(array $columns)
    {
        if (empty($columns)) {
            return '';
        }

        $sql = [];

        foreach ($columns as $column) {
            $sql[] = $this->wrap($column['column']) . ' = ' . $this->param($column['value']);
        }

        return ' SET ' . implode(', ', $sql);
    }
1029385
function InListFromValues(array $values)
    {
        if (count($values) == 0)
        {
            return null;
        }
        $list = $this->InList($this->Value($values[0]));
        foreach ($values as $value)
        {
            $list->Add($this->Value($value));
        }
        return $list;
    }
844181
public function loadValues(array $values)
    {
        foreach ($values as $name => $value) {
            $argument = $this->getArgument($name, static::MODE_RETURN_NULL);

            if (null !== $argument) {
                $argument->setValue($value);
            }
        }

        return $this;
    }
1039906
public function prepareValues($values)
    {
        if (empty($values)) {
            return [];
        }

        if (!is_array($values)) {
            $values = (array)$values;
        }

        $values = array_filter($values, 'is_scalar');
        $values = array_map('self::quoteValue', $values);

        return $values;
    }
1111303
public function setColumns( $columns ){
		if( !( is_array( $columns ) && count( $columns ) ) )
			throw new \InvalidArgumentException( 'Column array must not be empty' );
		$this->columns = $columns;
	}
896871
protected static function processColumnSizes(string $values, int $maxColumns)
    {
        $columns = [];

        if ($values == '*') {
            $columns = range(0, $maxColumns);
        } else {
            $values = explode(',', $values);
            foreach ($values as $value) {
                if (strpos($value, '-') !== false) {
                    list($from, $to) = explode('-', $value);
                    $columns = array_merge($columns, range($from, $to));
                } else {
                    $columns[] = (int)$value;
                }
            }
        }

        return array_unique($columns);
    }
1204008
public function values($values)
    {
        if(!$values instanceof DatabaseQuerySelect)
        {
            if (!$this->columns && !is_numeric(key($values))) {
                $this->columns(array_keys($values));
            }

            $this->values[] = array_values($values);
        }
        else $this->values = $values;

        return $this;
    }
978418
protected function verifyColumns(array $columns, array $values): bool {
		
		// to verify our columns, we need to be sure that our array of $values to
		// insert both (a) contains the same number of columns, (b) is always
		// the same list of columns.  for (b) this means that one row can't insert
		// and ID and email address while another row tries to insert an ID and
		// phone number.
		
		// TODO: test to see if skipping $values[0] would save time.
		
		$columnCount = sizeof($columns);
		
		foreach ($values as $value) {
			
			// our first test is to see if the count of columns in our $value
			// matches the count we expect to find.  if not, we'll throw an
			// Exception to help the calling scope know what went wrong here.
			
			if (sizeof($value) !== $columnCount) {
				throw new DatabaseException("insertMultiple failed: mismatched column counts");
			}
			
			// if we're still testing columns, then we'll want to see that there's
			// no difference between the names of our $columns and the keys of this
			// specific $value.
			
			$theseColumns = array_keys($value);
			$difference = array_diff($columns, $theseColumns);
			if (sizeof($difference) !== 0) {
				throw new DatabaseException("insertMultiple failed: mismatched columns");
			}
		}
		
		// if we looped through the entire list of $values and didn't throw an Exception,
		// then we've verified that our columns will allow us to insert these multiple
		// rows.  so, we return true.
		
		return true;
	}
1355594
public function set($columns)
    {
        if (! is_array($columns)) {
            $columns = func_get_args();
        }

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

        return $this->getDisplay();
    }
1116470
public function addColumns(array $columns)
    {
        /*
         * Build a final collection of list column objects
         */
        foreach ($columns as $columnName => $config) {
            $this->allColumns[$columnName] = $this->makeListColumn($columnName, $config);
        }
    }
71244
public function columns(array $columns)
    {
        $columns = array_unique($columns);

        foreach ($columns as &$column) {
            $column = $this->dialect()->quoteTable($column);
        }
        unset($column);

        $this->columns = $columns;

        return $this;
    }
827449
final public function setValues(array $values) {
		if (is_array($values)) {
			foreach (array_keys($this->toArray()) as $key) {
				if (array_key_exists($key, $values)) {
					ObjectMixin::set($this, $key, $values[$key]);
				}
			}
		}
	}
1206829
public static function deleteColumns(array $matrix, array $columns)
    {
        // validate input
        if (self::countMinDepth($matrix) < 2) {
            throw new UnexpectedValueException('Can not delete columns on one dimensional array');
        }
        if (self::countMinDepth($columns) != 1) {
            throw new InvalidArgumentException('Invalid column');
        }

        // remove columns in every row
        foreach ($matrix as $key => $row) {
            foreach ($columns as $column) {
                unset($matrix[$key][$column]);
            }
        }

        return $matrix;
    }
650514
public function columns(array $values, $width = 5, $tableStyle = 'compact', array $columnStyles = [])
    {
        $table = new Table($this);
        $table->setHeaders([])->setRows(iterator_to_array($this->chunk($values, $width)))->setStyle($tableStyle);

        foreach ($columnStyles as $columnIndex => $columnStyle) {
            $table->setColumnStyle($columnIndex, $columnStyle);
        }

        $columnWidths = $this->getColumnWidths($width);
        $table->setColumnWidths($columnWidths);

        $table->render();
    }