Get column meta data

@param int $colnum column number

@return mixed column meta data
169382
public function getColumnMeta($colnum=0)
    {
        if (!$this->_stmt) {
            return null;
        }
        $name = \oci_field_name($this->_stmt, $colnum+1);
        $len  = \oci_field_size($this->_stmt, $colnum+1);
        $prec = \oci_field_scale($this->_stmt, $colnum+1);
        $type = \oci_field_type($this->_stmt, $colnum+1);
        return array("name"=>$name, "len"=>$len, "precision"=>$prec, "driver:decl_type"=>$type);
    }
891870
public function getColumnMetadata($column)
    {
        if (!$this->columnDispatch) {
            $this->buildColumnDispatch();
        }

        if (!empty($this->columnDispatch[$column])) {
            $metaData = array();

            foreach ($this->columnDispatch[$column] as $handler) {
                /**
                 * @var GridField_ColumnProvider $handler
                 */
                $columnMetaData = $handler->getColumnMetadata($this, $column);

                if (is_array($columnMetaData)) {
                    $metaData = array_merge($metaData, $columnMetaData);
                    continue;
                }

                throw new LogicException(sprintf(
                    'Non-array response from %s::getColumnMetadata().',
                    get_class($handler)
                ));
            }

            return $metaData;
        }

        throw new InvalidArgumentException(sprintf(
            'Bad column "%s"',
            $column
        ));
    }
1035718
public function getColumnMetadata($gridField, $column)
    {
        if ($column === self::CHECKBOX_COLUMN) {
            $title = _t('GridFieldMultiSelect.SelectAllVisibleRows', 'Select all visible rows');
            return array(
                'title' => '<input class="multiselect-all no-change-track" type="checkbox"
								title="' . htmlentities($title) . '">',
            );
        }
    }
471047
private function getAssociationColumnName(ClassMetadata $meta, $fieldName)
    {
        $mapping = $meta->getAssociationMapping($fieldName);

        return current($mapping['joinColumnFieldNames']);
    }
25655
def _get_meta(self, row, col):
        
        if self.meta is None:
            logging.error("unable to get meta: empty section")
            return {}

        if not row in self._get_row_hdrs() or\
            not col in self._get_col_hdrs():
            logging.error("unable to get meta: cell [%s,%s] does not exist"
                          % (row, col))
            return {}

        meta_str = self.meta[col][self.irt[row]]
        try:
            meta = ast.literal_eval(meta_str)
            if isinstance(meta, dict):
                return meta
        except (SyntaxError, ValueError), e:
            logging.error("unable to parse meta string - %s: %s"
                          % (meta_str, e))

        return {}
413251
public function getColumnValues($columnName = 'PrimaryKey')
    {
        $ret = [];
        $keyGetterMethod = 'get' . ucfirst($columnName);
        foreach ($this as $obj) {
            $ret[] = $obj->$keyGetterMethod();
        }

        return $ret;
    }
1356755
public function meta($key = null)
    {
        if ($key !== null) {
            return array_get($this->meta, $key);
        }

        return $this->meta;
    }
374944
public function getTableColumns()
	{
	    $metadata = new MetaData($this->tableGateway->getAdapter());
	    $columns = $metadata->getColumnNames($this->tableGateway->getTable());
	
	    return $columns;
	}
1024049
public function getMetaColumns($tableName){
        $stmt = $this->query(self::META_COLUMNS_SQL, array($tableName));
        if ($stmt === false){
            return array();
        }

        $rows = array();
        foreach ($stmt as $row){
            switch($row[1]){
            case 'float8':
            case 'numeric':
                $type = PDO::PARAM_STR; // Not exists PARAM_FLOAT by current version.
                break;

            case 'int4':
            case 'int8':
                $type = PDO::PARAM_INT;
                break;

            case 'bool':
                $type = PDO::PARAM_BOOL;
                break;

            default:
                $type = PDO::PARAM_STR;
                break;
            }

            $rows[$row[0]] = $type;
        }

        return $rows;
    }
479223
public function getNumLazyLoadColumns()
    {
        $count = 0;
        foreach ($this->columns as $col) {
            if ($col->isLazyLoad()) {
                $count++;
            }
        }

        return $count;
    }
246547
private function retrieveColumnsCachedMetadata($tableName)
    {
        $key = $this->cachePrefix . '.' . $tableName . '.meta';

        /* @noinspection PhpUnhandledExceptionInspection */
        return Cache::remember($key, function () use ($tableName) {
            return $this->retrieveColumnsMetadata($tableName);
        });
    }
390525
protected function getDataColumn($column) {
		if (function_exists('array_column')) {
			return array_column($this->_data, $column);
		}
		
		$columnData = [];
		
		foreach ($this->_data as $row) {
			$columnData[] = $row[$column];
		}
		
		return $columnData;
	}
1065111
protected function getColumnNameFromData($columnName, $data, $default = null)
    {
        /*
         * Array column name, eg: column[key][key2][key3]
         */
        $keyParts = HtmlHelper::nameToArray($columnName);
        $result = $data;

        /*
         * Loop the column key parts and build a value.
         * To support relations only the last column should return the
         * relation value, all others will look up the relation object as normal.
         */
        foreach ($keyParts as $key) {
            if ($result instanceof Model && $result->hasRelation($key)) {
                $result = $result->{$key};
            }
            else {
                if (is_array($result) && array_key_exists($key, $result)) {
                    return $result[$key];
                }
                if (!isset($result->{$key})) {
                    return $default;
                }

                $result = $result->{$key};
            }
        }

        return $result;
    }
1086477
public function getColumnsMetadata(string $sql): ColumnsMetadata
    {
        if ($this->cache_active) {
            $cache_key = md5($sql);
            if (!array_key_exists($cache_key, static::$metadata_cache)) {
                $md = $this->readColumnsMetadata($sql);
                static::$metadata_cache[$cache_key] = $md;
            }

            return static::$metadata_cache[$cache_key];
        }

        return $this->readColumnsMetadata($sql);
    }
176356
public function getPrintMetadata() {
        $metadata = new Metadata($this->getDbAdapter());

        foreach ($metadata->getSchemas() as $valueSchema) {

            echo 'In Schema ' . $valueSchema . PHP_EOL;

            // get the table names
            $tableNames = $metadata->getTableNames($valueSchema);

            foreach ($tableNames as $tableName) {
                echo 'In Table ' . $tableName . PHP_EOL;

                $table = $metadata->getTable($tableName, $valueSchema);


                echo '    With columns: ' . PHP_EOL;
                foreach ($table->getColumns() as $column) {
                    echo '        ' . $column->getName()
                    . ' -> ' . $column->getDataType()
                    . PHP_EOL;
                }

                echo PHP_EOL;
                echo '    With constraints: ' . PHP_EOL;

                foreach ($metadata->getConstraints($tableName, $valueSchema) as $constraint) {
                    /** @var $constraint Zend\Db\Metadata\Object\ConstraintObject */
                    echo '        ' . $constraint->getName()
                    . ' -> ' . $constraint->getType()
                    . PHP_EOL;
                    if (!$constraint->hasColumns()) {
                        continue;
                    }
                    echo '            column: ' . implode(', ', $constraint->getColumns());
                    if ($constraint->isForeignKey()) {
                        $fkCols = array();
                        foreach ($constraint->getReferencedColumns() as $refColumn) {
                            $fkCols[] = $constraint->getReferencedTableName() . '.' . $refColumn;
                        }
                        echo ' => ' . implode(', ', $fkCols);
                    }
                    echo PHP_EOL;
                }

                echo '----' . PHP_EOL;
            }
            echo '-------------------------------------------' . PHP_EOL;
        }
    }
500664
public static function getValueSet($colname)
    {
        $valueSets = RemoteAppPeer::getValueSets();

        if (!isset($valueSets[$colname])) {
            throw new PropelException(sprintf('Column "%s" has no ValueSet.', $colname));
        }

        return $valueSets[$colname];
    }
872940
public function getColumnMeta($column)
    {
        $fields = sqlsrv_field_metadata($this->_stmt);

        if (!$fields) {
            throw new Zend_Db_Statement_Sqlsrv_Exception('Column metadata can not be fetched');
        }

        if (!isset($fields[$column])) {
            throw new Zend_Db_Statement_Sqlsrv_Exception('Column index does not exist in statement');
        }

        return $fields[$column];
    }