# Poco::Data

# class MetaColumn

Library: Data
Package: DataCore
Header: Poco/Data/MetaColumn.h

## Description

MetaColumn class contains column metadata information.

## Inheritance

Known Derived Classes: Poco::Data::ODBC::ODBCMetaColumn

## Member Summary

Member Functions: isNullable, length, name, position, precision, setLength, setName, setNullable, setPrecision, setType, type

## Enumerations

### ColumnDataType

FDT_BOOL

FDT_INT8

FDT_UINT8

FDT_INT16

FDT_UINT16

FDT_INT32

FDT_UINT32

FDT_INT64

FDT_UINT64

FDT_FLOAT

FDT_DOUBLE

FDT_STRING

FDT_WSTRING

FDT_BLOB

FDT_CLOB

FDT_DATE

FDT_TIME

FDT_TIMESTAMP

FDT_UNKNOWN

## Constructors

### MetaColumn

MetaColumn();

Creates the MetaColumn.

### MetaColumn

explicit MetaColumn(
std::size_t position,
const std::string & name = "",
ColumnDataType type = FDT_UNKNOWN,
std::size_t length = 0,
std::size_t precision = 0,
bool nullable = false
);

Creates the MetaColumn.

## Destructor

### ~MetaColumn

virtual ~MetaColumn();

Destroys the MetaColumn.

## Member Functions

### isNullable

bool isNullable() const;

Returns true if column allows null values, false otherwise.

### length

std::size_t length() const;

Returns column maximum length.

### name

const std::string & name() const;

Returns column name.

### position

std::size_t position() const;

Returns column position.

### precision

std::size_t precision() const;

Returns column precision. Valid for floating point fields only (zero for other data types).

### type

ColumnDataType type() const;

Returns column type.

### setLength

void setLength(
std::size_t length
);

Sets the column length.

### setName

void setName(
const std::string & name
);

Sets the column name.

### setNullable

void setNullable(
bool nullable
);

Sets the column nullability.

### setPrecision

void setPrecision(
std::size_t precision
);

Sets the column precision.

### setType

void setType(
ColumnDataType type
);

Sets the column data type.