Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

KDB::Field Class Reference

Representation of a field object. More...

#include <field.h>

Inheritance diagram for KDB::Field:

KDB::Object KDB::QObject List of all members.

Public Methods

 ~Field ()
void setPrecision (unsigned int size)
unsigned int precision ()
void setSize (unsigned int size)
unsigned int size ()
void setType (DataType t)
DataType type ()
QString nativeType ()
void setConstraint (const QString &val)
QString constraint ()
void setAcceptNull (bool)
bool acceptNull ()
bool isNull ()
void operator= (const QString &newVal)
void operator= (const QDateTime &newVal)
void operator= (int newVal)
void operator= (double newVal)
 operator QString ()
 operator QDateTime ()
 operator int ()
 operator double ()

Friends

class  Recordset
class  Record
class  Table

Detailed Description

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:

All numeric types are handled both in signed and unsigned form.

Author(s):
Alessandro Praduroux <pradu@thekompany.com> , Michael Koch <m_kock@bigfoot.de>
Version:
kdbcore 0.0.2


Constructor & Destructor Documentation

~Field ( )
 


Member Function Documentation

bool acceptNull ( )
 

QString constraint ( )
 

bool isNull ( )
 

QString nativeType ( )
 

operator QDateTime ( )
 

operator QString ( )
 

operator double ( )
 

operator int ( )
 

void operator= ( double newVal )
 

void operator= ( int newVal )
 

void operator= ( const QDateTime & newVal )
 

void operator= ( const QString & newVal )
 

unsigned int precision ( )
 

void setAcceptNull ( bool )
 

void setConstraint ( const QString & val )
 

void setPrecision ( unsigned int size )
 

void setSize ( unsigned int size )
 

void setType ( DataType t )
 

unsigned int size ( )
 

DataType type ( )
 


Friends And Related Function Documentation

class Record [friend]
 

class Recordset [friend]
 

class Table [friend]
 


The documentation for this class was generated from the following file:
Generated at Fri Sep 29 16:32:22 2000 for KDB by doxygen1.2.1 written by Dimitri van Heesch, © 1997-2000