Returns a table's columns
496089
public static List<Column> getColumns(DatabaseMetaData metadata, String tableName) throws Exception {
        List<Column> columns = new ArrayList<Column>();

        PreparedStatement stmt = metadata.getConnection().prepareStatement("SELECT * FROM " + tableName);
        ResultSetMetaData rsmeta = stmt.getMetaData();
        for (int i = 1, ii = rsmeta.getColumnCount(); i <= ii; ++i) {
            columns.add(new Column(rsmeta, i));
        }
        stmt.close();
        return columns;
    }
724607
def columns(self):
        """"""

        try:
            # For resources that are metapack packages.
            r = self.expanded_url.resource.columns()
            return list(r)
        except AttributeError as e:

            pass

        return self.schema_columns
290723
protected function _fetchTableColumns($table)
    {
        $return = array();
        $query  = $this->getObject('lib:database.query.show')
            ->show('FULL COLUMNS')
            ->from($table);

        if($columns = $this->select($query, Database::FETCH_OBJECT_LIST))
        {
            foreach($columns as $column)
            {
                // Set the table name in the raw info (MySQL doesn't add this).
                $column->Table = $table;

                $column = $this->_parseColumnInfo($column, $table);
                $return[$column->name] = $column;
            }
        }

        return $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 );
	}
132209
def _get_select_columns(self, columns=None):
        
        if columns == ['*'] or columns is None:
            columns = ['%s.*' % self._related.get_table()]

        return columns + self._get_aliased_pivot_columns()
192317
private function getColumns()
    {
        $table = $this->table->connect($this->database, Inflector::tabilize($this->tableName));

        return $table->getColumns();
    }
327955
static function getColumns() {
		$class = get_called_class();
		if (!isset(self::$_qualifiedColumns[$class])) {
			$table = static::getTableName();
			self::$_qualifiedColumns[$class] = array_map(function($column_name) use ($table) {
				return $table . '.' . $column_name;
			}, array_keys(static::$_columns));
		}

		return self::$_qualifiedColumns[$class];
	}
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;
    }
697015
def _get_property_columns(tabletype, columns):
    
    from ligo.lw.lsctables import gpsproperty as GpsProperty
    # get properties for row object
    rowvars = vars(tabletype.RowType)
    # build list of real column names for fancy properties
    extracols = {}
    for key in columns:
        prop = rowvars[key]
        if isinstance(prop, GpsProperty):
            extracols[key] = (prop.s_name, prop.ns_name)
    return extracols
1080747
private function _getColumns($table)
    {
        if (isset($this->_tables[$table])) {
            return $this->_tables[$table];
        };
        $this->_tables[$table] = false;
        if ($rows = $this->selectArray("PRAGMA table_info({$table})")) {
            $cols = array();
            foreach ($rows as $row) {
                $cols[] = $row['name'];
            };
            if (count($cols) > 0) {
                $this->_tables[$table] = $cols;
            };
        };
        return $this->_tables[$table];
    }
656412
def _getColumnList(self):
        
        columnList = []
        for columnName in self.columnNames:
            column = self.columns[columnName]
            type = column.getType()
            if type is None:
                type = 'text'
            columnList.append(
                {u'name': columnName,
                 u'type': type.decode('ascii')})
        return columnList
582800
def columns(self):
        """"""
        result = self.query.result()
        return [field.name for field in result.schema]
185039
def _get_column_widths(self):
        """"""
        col_widths = {}
        for table, (row, col) in self.__tables.values():
            for colname, width in table.column_widths.items():
                ic = col + table.get_column_offset(colname)
                current_width = col_widths.setdefault(ic, width)
                col_widths[ic] = max(width, current_width)
        return col_widths
820693
function getCellsAtColumn(
    opts: Options,
    // The table
    table: Block,
    columnIndex: number
): List<Block> {
    return table.nodes.map(row => row.nodes.get(columnIndex));
}
965717
def _get_columns_as_string(self):
        """"""
        columnslist = []
        for rowidx, row in self.columns.iterrows():
            columnslist.append("#%s = %s" % (rowidx, row.description))
        return "\n".join(columnslist)
629428
def get_column_names(engine: Engine, tablename: str) -> List[str]:
    
    return [info.name for info in gen_columns_info(engine, tablename)]
1250983
public function getColumns( $table ) {
		$table = $this->safeTable($table);
		$columnsRaw = $this->adapter->get("DESCRIBE $table");
		foreach($columnsRaw as $r) {
			$columns[$r['Field']]=$r['Type'];
		}
		return $columns;
	}