# 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, operator =, position, precision, setLength, setName, setNullable, setPrecision, setType, swap, 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_UUID

FDT_JSON

FDT_UNKNOWN

## Constructors

### MetaColumn

MetaColumn();

Creates the MetaColumn.

### MetaColumn

MetaColumn(
const MetaColumn & other
);

Copy constructor.

### MetaColumn

MetaColumn(
MetaColumn && other
) noexcept;

Move constructor.

### 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

~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.

### operator =

MetaColumn & operator = (
const MetaColumn & other
);

Assignment operator.

### operator =

MetaColumn & operator = (
MetaColumn && other
) noexcept;

Assignment operator.

### 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).

### swap

void swap(
MetaColumn & other
) noexcept;

Swaps the contents with another instance.

### 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.