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