class Field
|
Representation of a field object. More... |
|
|
Public Methods
Representation of a field object.
It knows its name, its datatype, constraints
when available (like null/not null) and, when it is part of a record, its value.
The field object can manage only the data type of the underlying column.
Conversion operators are provided for all common C++ datatypes. If a conversion
is not allowed, a KDB::ConversionException is raised.
It is responsibility of the plugin to instantiate a correct field object for
the underlying datatype. For datatypes not supported natively by C++, the
Plugin can handle either QStrings or QByteArrays.
The datatype supported are the following:
- QString (can be used for unknown datatypes)
- QStringList (for sets and one-dimensional array)
- QDateTime
- QByteArray (for BLOBs and Unknown datatypes)
- char
- short
- int
- long
- float
- double
- long double
- bool
All numeric types are handled both in signed and unsigned form.
void setPrecision (unsigned int size)
|
unsigned int precision ()
|
void setSize (unsigned int size)
|
void setType (DataType t)
|
void setNativeType (const QString &type)
|
void setDefaultValue (const Value &val)
|
void setComment (const QString &val)
|
void setConstraint (const QString &val)
|
void setAcceptNull (bool)
|
void setValue (const Value &v, bool init = false)
|
Field & operator = (const Value &v)
|
- Version: kdbcore 0.0.2
- Author: Alessandro Praduroux <pradu@thekompany.com>
- Generated: marc@yogi on Tue Mar 27 13:09:39 2001, using kdoc 2.0a48.