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 inline

bool isNullable() const;

Returns true if column allows null values, false otherwise.

length inline

std::size_t length() const;

Returns column maximum length.

name inline

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 inline

std::size_t position() const;

Returns column position.

precision inline

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 inline

ColumnDataType type() const;

Returns column type.

setLength protected inline

void setLength(
    std::size_t length
);

Sets the column length.

setName protected inline

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

Sets the column name.

setNullable protected inline

void setNullable(
    bool nullable
);

Sets the column nullability.

setPrecision protected inline

void setPrecision(
    std::size_t precision
);

Sets the column precision.

setType protected inline

void setType(
    ColumnDataType type
);

Sets the column data type.