@param string $k
@param array|null $columns

@return array
428316
private function get_field_data( $k, $columns ) {
		$table = null;
		if ( strpos( $k, '.' ) !== false && strpos( $k, '(' ) === false ) {
			$exploded = explode( '.', $k );
			$table    = trim( $exploded[0], '`' );
			$k        = trim( $exploded[1], '`' );
			if ( isset( $this->table_defines[ $table ]['columns'][ $k ] ) ) {
				$name    = $this->table_defines[ $table ]['columns'][ $k ]['name'];
				$columns = $this->table_defines[ $table ];
				$table   = $this->get_table( $table );
			} else {
				$name = $k;
			}
		} else {
			if ( empty( $columns ) ) {
				return [ $k, $columns ];
			}
			$k = trim( $k, '`' );
			if ( isset( $columns[ $k ] ) ) {
				$name = $columns[ $k ]['name'];
			} else {
				$name = $k;
			}
		}
		if ( ! empty( $table ) ) {
			$name = $table . '.' . $name;
		}

		return [ $name, $columns ];
	}
165129
public function columns($columns){
        if(is_array($columns)) $this->columns = array_merge($this->columns,$columns);
        return self::getInstance();
    }
327075
public function columns($columns) {
		if (is_array($columns))
			$this->columnList = $columns;
		else
			$this->columnList = func_get_args();
		return $this;
	}
1117962
public function getEntities($columns = ['*'])
    {
        // As we need the primary key to feed the
        // entity cache, we need it loaded on each
        // request
        if ($columns !== ['*']) {
            $columns = $this->enforceIdColumn($columns);
        }

        // Run the query
        $results = $this->query->get($columns);

        // Pass result set to the mapper and return the EntityCollection
        return $this->mapper->map($results, $this->getEagerLoads(), $this->useCache);
    }
1099852
protected function transfer(array $columns)
    {
        $fields = [];

        foreach ($columns as $column) {
            $field = new Field($column->COLUMN_NAME);

            $this->setIsNullable($field, $column->IS_NULLABLE)
                 ->setMaxLength($field, $column->CHARACTER_MAXIMUM_LENGTH)
                 ->setDefault($field, $column->COLUMN_DEFAULT)
                 ->setDataType($field, $column->DATA_TYPE)
                 ->setKey($field, $column->COLUMN_KEY, $column->EXTRA)
                 ->setLabel($field, $column->COLUMN_NAME)
                 ->setHtmlType($field, $column->DATA_TYPE);

            $optimizer = new FieldOptimizer($field);

            $fields[] = $optimizer->optimize()->getField();
        }

        return $fields;
    }
1299953
protected function getValidColumns($columns)
    {
        $valid = array();
        foreach ($columns as $column) {
            if (!isset($this->data[$column])) {
                continue;
            }
            
            $valid[$column] = $this->data[$column];
        }
        
        return $valid;
    }
311071
public static function q_column($q, $column = 0): array
    {
        $qh = self::getInstance()->sql_query($q);

        return $qh->fetchAll(PDO::FETCH_COLUMN, $column);
    }
1200334
public function setColumns(array $columns)
    {
        $this->mappingColumns = null;
        $this->columns = array_values($columns);

        return $this;
    }
1276498
protected function getFields($column = null) {

        if (!$this->columns) {
            $table = static::TABLE;
            $this->columns = array();

            foreach (AbstractApp::getDbal()->query("SHOW COLUMNS FROM `$table`")->fetchAll(PDO::FETCH_ASSOC) as $d) {
                $this->columns[$d['Field']] = $d;
            }
        }

        if ($column) {
            return $this->columns[$column];
        }

        return $this->columns;
    }
1254027
public function replace($table, array $columns = null, array $where = null): ?array
    {
        if (\is_array($table)) {
            $columns = $this->getColumns($table, false);
            $table = $this->getTable($table);
            $where = $table;
        } elseif ($where) {
            $where = [SQL::WHERE => $where];
        }

        if (!\is_array($columns) || empty($columns)) {
            return null;
        }

        $map = [];
        $stack = [];

        foreach ($columns as $column => $replacements) {
            if (\is_array($replacements)) {
                foreach ($replacements as $old => $new) {
                    $mapKey = $this->mapKey();

                    $stack[] = $this->columnQuote($column) . ' = REPLACE(' . $this->columnQuote($column) . ', ' . $mapKey . 'a, ' . $mapKey . 'b)';

                    $map[$mapKey . 'a'] = [$old, PDO::PARAM_STR];
                    $map[$mapKey . 'b'] = [$new, PDO::PARAM_STR];
                }
            }
        }

        if ($stack === []) {
            return null;
        }

        $sql = 'UPDATE ' . $this->tableQuote($table) . ' SET ' .
            \implode(', ', $stack) . $this->suffixClause($where, $map);

        return [$sql, $map];
    }
848537
protected function getSelectColumns(array $columns = ['*'])
	{
		if ($columns == ['*']) {
			$columns = [$this->related->getTable().'.*'];
		}

		return array_merge($columns, $this->getAliasedPivotColumns());
	}
472271
public function pluck($column, $key = null)
    {
        $results = $this->get(is_null($key) ? [$column] : [$column, $key]);
        // If the columns are qualified with a table or have an alias, we cannot use
        // those directly in the "pluck" operations since the results from the DB
        // are only keyed by the column itself. We'll strip the table out here.
        return array_pluck($results, $this->stripTableForPluck($column), $this->stripTableForPluck($key));
    }
1016503
private function validateColumns($columns): array
    {
        foreach($columns as $e=>$r){
            $columns[$e] = $this->validateColumn($r);
        }
        return $columns;

    }
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;
	}
17904
public function pluck($column, $key = null)
    {
        $result = $this->getBuilder()->pluck($column, $key);

        // Reset query builder
        $this->resetBuilder();

        return $result;
    }
1229390
public function columns($columns = array())
    {
        foreach ((array) $columns as $key => $value)
        {
            if (is_string($key)) {
                $this->columns[$key] = $value;
            } else {
                $this->columns[] = $value;
            }
        }

        return $this;
    }
1083100
public function makeAdminColumnsSortable($columns)
    {
        $admin_columns = $this->getAdminColumns();
        if (!Arr::iterable($admin_columns)) {
            return $columns;
        }

        foreach ($admin_columns as $k) {
            $columns[$k] = $k;
        }
        return $columns;
    }