Fetches all columns of the table and their information
974560
private function fetchColumns() {
        $qry = 'SELECT c.column_name as colName, c.column_default as colDefault,
			c.is_nullable as nullable, c.column_type as colType, c.extra, c.column_key as colKey,
                        c.character_set_name as charset, c.collation_name as collation';
        $qry .= ', d.index_name as indexName';
        $qry .=' FROM INFORMATION_SCHEMA.COLUMNS c ' .
                'LEFT JOIN INFORMATION_SCHEMA.STATISTICS d'
                . ' ON c.column_name = d.column_name AND d.table_schema="' . $this->connection->getDBName() . '" AND d.table_name="' . $this->name . '" ' .
                'WHERE c.table_schema="' . $this->connection->getDBName() . '" AND c.table_name="' . $this->name . '"';

        $columns = $this->connection->doPrepare($qry);
        if (is_bool($columns)) return;

        foreach ($columns as $column) {
            $this->columns[$column['colName']] = $column;
            if (in_array($column['colKey'],
                            array('MUL', 'UNI', 'PRI', 'SPA', 'FUL'))) {
                $this->indexes[$column['colName']] = $column['indexName'];
            }
        }
    }
33071
private static function getSttyColumns()
    {
        $info = static::runCommand('stty -a | grep columns');

        if ($info && preg_match('/rows.(\d+);.columns.(\d+);/i', $info, $matches)) {
            // extract [w, h] from "rows h; columns w;"
        } elseif ($info && preg_match('/;.(\d+).rows;.(\d+).columns/i', $info, $matches)) {
            // extract [w, h] from "; h rows; w columns"
        } else {
            return [];
        }

        return [(int) $matches[2], (int) $matches[1]];
    }
712567
def columns(self):
        
        return Index(np.array(self._gather_column_names(), dtype=np.bytes_), np.dtype(np.bytes_))
25180
def get_column_keys_and_names(table):
    
    ins = inspect(table)
    return ((k, c.name) for k, c in ins.mapper.c.items())
527587
private function _fetch_table()
    {
        if ($this->_table == NULL)
        {
            $this->_table = plural(preg_replace('/(_m|_model)?$/', '', strtolower(get_class($this))));
        }
    }
654590
protected function _fetchTableColumns($table)
    {
        $result = array();
        $sql    = $this->quoteName($this->getTableNeedle().$table);

        if ($columns = $this->show('SHOW FULL COLUMNS FROM '.$sql, AnDatabase::FETCH_OBJECT_LIST)) {
            foreach ($columns as $column) {
                //Set the table name in the raw info (MySQL doesn't add this)
                $column->Table = $table;

                //Parse the column raw schema data
                $column = $this->_parseColumnInfo($column, $table);

                $result[$column->name] = $column;
            }
        }

        return $result;
    }
1100286
def _getcols(cur, table):
        
        query = ' '.join(("SELECT * FROM", table, "LIMIT 0"))  # for testing

        cur.execute(query)
        colnames = [desc[0] for desc in cur.description]
        LOG.info("COLS (%s): %s", table, colnames)

        return
730606
private function get_columns( $table ) {
		global $wpdb;

		$table_sql    = $this->esc_sql_ident( $table );
		$primary_keys = $text_columns = $all_columns = array();

		foreach ( $wpdb->get_results( "DESCRIBE $table_sql" ) as $col ) {
			if ( 'PRI' === $col->Key ) {
				$primary_keys[] = $col->Field;
			}

			if ( $this->is_text_col( $col->Type ) ) {
				$text_columns[] = $col->Field;
			}

			$all_columns[] = $col->Field;
		}

		return array( $primary_keys, $text_columns, $all_columns );
	}
964790
protected function getInformation()
    {
        $dbColumns = $this->model->getConnection()->select('SHOW COLUMNS FROM ' . $this->model->getTable());
        $availableColumns = [];
        $askColumn = null;
        $availableComparators = ['=', '<', '>', '<=', '>=', 'LIKE', 'like'];
        $comparator = null;

        $this->info("Columns available to search user against");
        foreach ($dbColumns as $value) {
            $availableColumns[] = $value->Field;
            $this->info($value->Field);
        }

        while(! in_array($askColumn, $availableColumns)) {
            $askColumn = $this->ask('Which column do you want to search against?');
        }

        while(! in_array($comparator, $availableComparators)) {
            $comparator = $this->ask('Which sql operator do you want to use? e.g. =, LIKE etc');
        }

        $search = $this->ask('Value of Search term');

        $results = $this->model->where($askColumn, $comparator, $search)->get();

        $this->presentUsersToSelect($results);

        $this->selectTypeOfPassword();

        $this->persist();
    }
525777
def fetch_column_names(cls,
                           db: DATABASE_SUPPORTER_FWD_REF,
                           table: str) -> List[str]:
        """"""
        raise RuntimeError(_MSG_NO_FLAVOUR)
1000707
def columns(self):
        
        schema = self.schema()
        return [schema.column(col) for col in self.__columns]
748584
def fetch(table, cols="*", where=(), group="", order=(), limit=(), **kwargs):
    """"""
    return select(table, cols, where, group, order, limit, **kwargs).fetchall()
350994
public function get_columns($table) {
		$result = $this->get_table_definition($table);

		$columns = [];
		foreach ($result as $row) {
			$columns[] = &$row['Field'];
		}

		return $columns;
	}
1158288
public function list_cols($table)
    {
        $q = $this->query('SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = ?',
            array($table));

        if ($q) {
            return $q->fetchAll(PDO::FETCH_COLUMN, 0);
        }

        return array();
    }
529744
protected function getColumnNames()
    {
        $names = array();
        $columns = $this->db->getSchemaManager()->listTableColumns($this->table);

        if (count($columns) == 0) {
            $schema = $this->schema ?: $this->app['db.schema'];
            $fullTable = $schema.".".$this->table;
            $columns = $this->db->getSchemaManager()->listTableColumns($fullTable);
        }

        foreach ($columns as $column) {
            $names[] = $column->getName();
        }

        return $names;
    }
649793
public function fetchColumn()
    {
        $spec = $this->getResult();

        $data = $spec->fetch_row();
        if( is_array($data) ) {
            $data = current($data);
        }

        $this->free();
        return $data;
    }
586777
public function getColmuns($table)
    {
        $table = self::table($table);
        $columns = [];
        //
        $data = Database::read("select COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = '".Config::get('database.database')."' AND TABLE_NAME = '$table';");
        //
        foreach ($data as $key => $value) {
            $columns[] = $value['COLUMN_NAME'];
        }
        //
        return $columns;
    }