Provide an associative array of Closures to be used as the "formatter" key inside of the
`Database::$_columns` specification.

@see lithium\data\source\Database::_formatters()
968721
protected function _formatters() {
		$datetime = $timestamp = function($format, $value) {
			if ($format && (($time = strtotime($value)) !== false)) {
				$val = date($format, $time);
				if (!preg_match('/^' . preg_quote($val) . '\.\d+$/', $value)) {
					$value = $val;
				}
			}
			return $this->connection->quote($value);
		};

		return compact('datetime', 'timestamp') + [
			'boolean' => function($value) {
				return $this->connection->quote($value ? 't' : 'f');
			}
		] + parent::_formatters();
	}
1143257
private function compileColumnNames()
    {
        $columns = [];
        foreach($this->columnConfiguration as $column) {
            $columns[] = $column->getName();
        }

        return $columns;
    }
1371253
private function buildFormatterList()
    {
        if (!$this->isObject(self::$formatters)) {
            $formatters = new ArrayObject([]);
            foreach (self::$formatters as $fk => $fv) {
                $formatters->key($fk, new ArrayObject($fv));
            }
            self::$formatters = $formatters;
        }
    }
1265043
public function getColNames()
    {
        $colNames = array();
        foreach ($this->_array as $row) {
            foreach (array_keys($row) as $key) {
                if (!is_numeric($key) && !isset($colNames[$key])) {
                    $colNames[$key] = $key;
                }
            }
        }
        return $colNames;
    }
875603
public function withColumns(array $columns): self
    {
        $loader = clone $this;
        $loader->columns = array_merge(
            [$loader->schema[Record::SH_PRIMARY_KEY]],
            $columns
        );

        return $loader;
    }
557664
public function buildColumns($columns)
    {
        if (!is_array($columns)) {
            if (strpos($columns, '(') !== false) {
                return $columns;
            } else {
                $columns = preg_split('/\s*,\s*/', $columns, -1, PREG_SPLIT_NO_EMPTY);
            }
        }
        foreach ($columns as $i => $column) {
            if ($column instanceof Expression) {
                $columns[$i] = $column->expression;
            } elseif (strpos($column, '(') === false) {
                $columns[$i] = $this->db->quoteColumnName($column);
            }
        }

        return is_array($columns) ? implode(', ', $columns) : $columns;
    }
1374174
public function getColumnSettings($columns = null)
	{
		if(null == $columns)
		{
			$columns = array_map(function($descriptor)
				{
					return zend_column_name($descriptor);
				},
				$this->getColumns()
			);
		}

		$k = array_find_key($columns, function($v, $k){
				return $v == $this->getPrimaryKey();
			}
		);

		if(null !== $k)
		{
			unset($columns[$k]);
		}

		return  array_join($columns, $this->_settings, false);

	}
327075
public function columns($columns) {
		if (is_array($columns))
			$this->columnList = $columns;
		else
			$this->columnList = func_get_args();
		return $this;
	}
309307
public function select($columns = [])
    {
        $expr = new ColumnExpression($this->sql);

        if ($columns instanceof Closure) {
            $columns($expr);
        } else {
            if (!is_array($columns)) {
                $columns = [$columns];
            }
            $expr->columns($columns);
        }
    }
161633
public function getColumnNames(array $columns)
    {
        return array_reduce($columns, function ($carry, \tao_models_classes_table_Column $column) {
            /** @var ContextTypePropertyColumn|VariableColumn $column */
            $carry[$this->getColumnId($column)] = $column->getLabel();
            return $carry;
        });
    }
246549
protected function getKeySql($columns)
	{
		// TODO Error checking on array and element types.

		$kNonUnique = (string) $columns[0]['Non_unique'];
		$kName      = (string) $columns[0]['Key_name'];
		$kColumn    = (string) $columns[0]['Column_name'];

		$prefix = '';

		if ($kName === 'PRIMARY')
		{
			$prefix = 'PRIMARY ';
		}
		elseif ($kNonUnique == 0)
		{
			$prefix = 'UNIQUE ';
		}

		$nColumns = \count($columns);
		$kColumns = array();

		if ($nColumns === 1)
		{
			$kColumns[] = $this->db->quoteName($kColumn);
		}
		else
		{
			foreach ($columns as $column)
			{
				$kColumns[] = (string) $column['Column_name'];
			}
		}

		$sql = $prefix . 'KEY ' . ($kName !== 'PRIMARY' ? $this->db->quoteName($kName) : '') . ' (' . implode(',', $kColumns) . ')';

		return $sql;
	}
629159
function using($columns)
    {
        $lastJoin = $this->getLastJoinSource();

        if (null === $columns) {
            $lastJoin->right = null;
            return $this;
        }

        $columns = is_array($columns) ? $columns : func_get_args();

        if ($lastJoin->right instanceof Using) {
            $lastJoin->right->expression = array_merge(
                $lastJoin->right->expression,
                $columns
            );
        } else {
            $lastJoin->right = new Grouping($columns);
        }
        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;
            }
        }
    }
615770
public function setColumns($columns)
    {
        if (is_string($columns)) {
            $columns = explode(',', $columns);
            $columns = ArrayMethods::trim($columns);
        }
        $this->_columnNames = $columns;
        return $this;
    }
451957
function setColumns($columns) {
		$this->columns = array();

		if ($columns === null) {
			return $this;
		}

		if (is_string($columns)) {
			return $this->addColumn($columns);
		}

		foreach ($columns as $alias => &$column) {
			$this->addColumn($column, is_int($alias) ? null : $alias);
		}
		return $this;
	}
187683
private function compileColumns()
    {
        $columnstring = '';
        foreach ($this->columns as $columnentry) {
            if ($columnentry->table == false) {
                $columnentry->table = $this->table;
            }
            if ($columnentry->column == '*') {
                $columnstring .= '`' . $columnentry->table . '`.' . $columnentry->column;
            } else {
                $columnstring .= '`' . $columnentry->table . '`.`' . $columnentry->column . '`';
            }
            if ($columnentry->alias !== false) {
                $columnstring .= ' AS `' . $columnentry->alias . '`';
            }
            $columnstring .= ', ';
        }
        return rtrim($columnstring, ', ') . ' ';
    }
1187822
protected function compileUpdateColumns($values)
    {
        // When gathering the columns for an update statement, we'll wrap each of the
        // columns and convert it to a parameter value. Then we will concatenate a
        // list of the columns that can be added into this update query clauses.
        return collect($values)->map(function ($value, $key) {
            return $this->wrap($key) . ' = ' . $this->parameter($value);
        })->implode(', ');
    }