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

KDB::Table Class Reference

Representation of a database table. More...

#include <table.h>

Inheritance diagram for KDB::Table:

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

Public Methods

 ~Table ()
FieldnewField (const QString &name)
 creates a new field for the current table. More...

void appendField (Field *)
 appends the field to the list of fields and issue an alter table to the underlying DBMS.

FieldgetField (const QString &name) const
 returns an existing field by name, or 0L if the field does not exists.

FieldList fields () const
 return the list of available fields.

QStringList fieldNames () const
 return the list of names of available fields.

IndexnewIndex (const QString &name)
 creates a new index. More...

IndexgetIndex (const QString &name) const
 return an index by name.

IndexList indexes () const
 return the list of available indexes.

RecordsetPtr openRecordset ()
 creates a recordset based on this table.

bool create ()
 actually create the table. More...

bool designMode () const
 returns true if the table is in design mode, i.e. More...


Signals

void fieldAdded ( Field * )
void fieldRemoved ( Field * )
void changed ()
void indexAdded ( Index * )
void indexRemoved ( Index * )
void created ( Table * )

Friends

class  Database

Detailed Description

Representation of a database table.

Trough this object we access the fields and indices of a given table (when available). This object will allow building of new fields and indexes, as well as editing of the table data using openRecordset()

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


Constructor & Destructor Documentation

~Table ( )
 


Member Function Documentation

void appendField ( Field * )
 

appends the field to the list of fields and issue an alter table to the underlying DBMS.

void changed ( ) [signal]
 

bool create ( )
 

actually create the table.

returns true if the table has been successfully created, false otherwise.

void created ( Table * ) [signal]
 

bool designMode ( ) const
 

returns true if the table is in design mode, i.e.

it is not created

void fieldAdded ( Field * ) [signal]
 

QStringList fieldNames ( ) const
 

return the list of names of available fields.

void fieldRemoved ( Field * ) [signal]
 

FieldList fields ( ) const
 

return the list of available fields.

Field * getField ( const QString & name ) const
 

returns an existing field by name, or 0L if the field does not exists.

Index * getIndex ( const QString & name ) const
 

return an index by name.

void indexAdded ( Index * ) [signal]
 

void indexRemoved ( Index * ) [signal]
 

IndexList indexes ( ) const
 

return the list of available indexes.

Field * newField ( const QString & name )
 

creates a new field for the current table.

If the table is not create()d, the field is appended to the list of fields and created with the table itself. else no modification will occur. To apply the changes to the table, you must use appendField()

Index * newIndex ( const QString & name )
 

creates a new index.

Parameters:
name   this is the name of the index

RecordsetPtr openRecordset ( )
 

creates a recordset based on this table.


Friends And Related Function Documentation

class Database [friend]
 


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