# class Table | Representation of a database table. More...
Full name | `KDB::Table`
Definition | `#include <table.h>`
Inherits | KDB::DataObject [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- ~Table ()
- Field * newField (const QString &name)
- bool appendField (Field *)
- bool removeField (const QString &name)
- bool changeField (Field *)
- Field * getField (const QString &name) const
- FieldList fields () const
- QStringList fieldNames () const
- Index * newIndex (const QString &name)
- Index * getIndex (const QString &name) const
- IndexList indexes () const
- RecordsetPtr openRecordset ()
- bool create ()
- bool designMode () const

#### Signals

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

## 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

~Table () | ### ~Table

Field * newField (const QString &name) | ### newField

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

bool appendField (Field *) | ### appendField

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

bool removeField (const QString &name) | ### removeField

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

bool changeField (Field *) | ### changeField

changes a field definition and issue an alter table to the underlying DBMS. the field must be already present in the list of fields

Field * getField (const QString &name) | ### getField

[const]

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

FieldList fields () | ### fields

[const]

return the list of available fields

QStringList fieldNames () | ### fieldNames

[const]

return the list of names of available fields

Index * newIndex (const QString &name) | ### newIndex

creates a new index

Parameters:

name | this is the name of the index

Index * getIndex (const QString &name) | ### getIndex

[const]

return an index by name

IndexList indexes () | ### indexes

[const]

return the list of available indexes

RecordsetPtr openRecordset () | ### openRecordset

creates a recordset based on this table.

bool create () | ### create

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

bool designMode () | ### designMode

[const]

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

void fieldAdded ( KDB::Field * ) | ### fieldAdded

[signal]

void fieldRemoved ( KDB::Field * ) | ### fieldRemoved

[signal]

void changed () | ### changed

[signal]

void indexAdded ( KDB::Index * ) | ### indexAdded

[signal]

void indexRemoved ( KDB::Index * ) | ### indexRemoved

[signal]

void created ( KDB::Table * ) | ### created

[signal]

- Version: kdbcore 0.0.2
- Author: Alessandro Praduroux <pradu@thekompany.com>
- Generated: root@i386.ports.openbsd.org on Wed Apr 25 13:59:09 2001, using kdoc 2.0a53.