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

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

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

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.