class Table

Representation of a database table. More...

Full nameKDB::Table
Definition#include <table.h>
InheritsKDB::DataObject [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Signals


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

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

bool  appendField (Field *)

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

bool  removeField (const QString &name)

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

bool  changeField (Field *)

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)

[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

Index *  newIndex (const QString &name)

creates a new index

Parameters:
namethis is the name of the index

Index *  getIndex (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. returns true if the table has been successfully created, false otherwise.

bool  designMode ()

[const]

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

void  fieldAdded ( KDB::Field * )

[signal]

void  fieldRemoved ( KDB::Field * )

[signal]

void  changed ()

[signal]

void  indexAdded ( KDB::Index * )

[signal]

void  indexRemoved ( KDB::Index * )

[signal]

void  created ( KDB::Table * )

[signal]