KexiDB::TableSchema Class Reference
#include <tableschema.h>
Inheritance diagram for KexiDB::TableSchema:

Detailed Description
KexiDB::TableSchema provides information about native database table that can be stored using KexiDB database engine.
Definition at line 42 of file tableschema.h.
Public Types | |
| typedef QPtrList< TableSchema > | List |
| Type of tables list. | |
| typedef QPtrListIterator< TableSchema > | ListIterator |
| Iterator for tables list. | |
Public Member Functions | |
| TableSchema (const QString &name) | |
| TableSchema (const SchemaData &sdata) | |
| TableSchema () | |
| TableSchema (const TableSchema &ts, bool copyId=true) | |
| TableSchema (const TableSchema &ts, int setId) | |
| virtual | ~TableSchema () |
| virtual FieldList & | insertField (uint index, Field *field) |
| virtual void | removeField (KexiDB::Field *field) |
| IndexSchema * | primaryKey () const |
| void | setPrimaryKey (IndexSchema *pkey) |
| const IndexSchema::ListIterator | indicesIterator () const |
| const IndexSchema::List * | indices () |
| virtual void | clear () |
| QString | debugString (bool includeTableName) |
| virtual QString | debugString () |
| Connection * | connection () const |
| bool | isKexiDBSystem () const |
| void | setKexiDBSystem (bool set) |
| virtual bool | isNative () const |
| virtual void | setNative (bool set) |
| QuerySchema * | query () |
| Field * | anyNonPKField () |
| bool | setLookupFieldSchema (const QString &fieldName, LookupFieldSchema *lookupFieldSchema) |
| LookupFieldSchema * | lookupFieldSchema (const Field &field) const |
| LookupFieldSchema * | lookupFieldSchema (const QString &fieldName) |
| const QPtrVector< LookupFieldSchema > & | lookupFieldsList () |
Protected Member Functions | |
| TableSchema (Connection *conn, const QString &name=QString::null) | |
Protected Attributes | |
| IndexSchema::List | m_indices |
| QGuardedPtr< Connection > | m_conn |
| IndexSchema * | m_pkey |
| QuerySchema * | m_query |
| cached query schema that is defined by "select * from <this_table_name>" | |
| Private * | d |
Friends | |
| class | Connection |
Member Typedef Documentation
|
|
Type of tables list.
Definition at line 45 of file tableschema.h. |
|
|
Iterator for tables list.
Definition at line 46 of file tableschema.h. |
Constructor & Destructor Documentation
|
|
Definition at line 64 of file tableschema.cpp. References KexiDB::SchemaData::m_name. |
|
|
Definition at line 74 of file tableschema.cpp. |
|
|
Definition at line 83 of file tableschema.cpp. |
|
||||||||||||
|
Copy constructor. if copyId is true, it's copied as well, otherwise the table id becomes -1, what is usable when we want to store the copy as an independent table. Definition at line 92 of file tableschema.cpp. |
|
||||||||||||
|
Copy constructor like TableSchema(const TableSchema&, bool). setId is set as the table identifier. This is rarely usable, e.g. in project and data migration routines when we need to need deal with unique identifiers;
Definition at line 99 of file tableschema.cpp. References KexiDB::SchemaData::m_id. |
|
|
Definition at line 123 of file tableschema.cpp. |
|
||||||||||||
|
Automatically retrieves table schema via connection. Definition at line 108 of file tableschema.cpp. References d, m_indices, KexiDB::SchemaData::m_name, and m_pkey. |
Member Function Documentation
|
|
Definition at line 372 of file tableschema.cpp. References d, KexiDB::FieldList::hasField(), KexiDB::Field::isPrimaryKey(), KexiDB::FieldList::m_fields, and m_pkey. Referenced by KexiDB::Connection::insertRow(). |
|
|
Removes all fields from the list, clears name and all other properties.
Reimplemented from KexiDB::FieldList. Definition at line 271 of file tableschema.cpp. References KexiDB::SchemaData::clear(), KexiDB::FieldList::clear(), d, m_conn, and m_indices. |
|
|
Definition at line 109 of file tableschema.h. Referenced by KexiDB::TableOrQuerySchema::connection(), and KexiDB::QuerySchema::connection(). |
|
|
Reimplemented from KexiDB::FieldList. Definition at line 326 of file tableschema.cpp. |
|
|
Definition at line 331 of file tableschema.cpp. References KexiDB::LookupFieldSchema::debugString(), KexiDB::FieldList::debugString(), lookupFieldSchema(), KexiDB::FieldList::m_fields, and KexiDB::SchemaData::schemaDataDebugString(). Referenced by KexiDB::TableOrQuerySchema::debugString(), and KexiTableDesignerView::debugStringForCurrentTableSchema(). |
|
|
Definition at line 93 of file tableschema.h. |
|
|
Definition at line 90 of file tableschema.h. Referenced by KexiCellEditorFactory::createEditor(). |
|
||||||||||||
|
Inserts field into a specified position (index). 'order' property of field is set automatically. Definition at line 184 of file tableschema.cpp. References KexiDB::IndexSchema::addField(), KexiDB::FieldList::insertField(), KexiDB::Field::isIndexed(), KexiDB::Field::isPrimaryKey(), KexiDB::Field::isUniqueKey(), KexiDB::FieldList::m_fields, m_indices, KexiDB::Field::m_order, KexiDB::IndexSchema::setAutoGenerated(), setPrimaryKey(), KexiDB::Field::setTable(), and KexiDB::IndexSchema::setUnique(). |
|
|
isKexiDBSystem()==true implies isNative()==true. By default (after allocation), TableSchema object has this property set to false. Definition at line 125 of file tableschema.h. |
|
|
Reimplemented from KexiDB::SchemaData. Definition at line 134 of file tableschema.h. |
|
|
Definition at line 410 of file tableschema.cpp. References field, and lookupFieldSchema(). |
|
|
Definition at line 405 of file tableschema.cpp. References d. Referenced by debugString(), and lookupFieldSchema(). |
|
|
Definition at line 418 of file tableschema.cpp. References d, and KexiDB::FieldList::m_fields. |
|
|
Definition at line 76 of file tableschema.h. Referenced by KexiDB::Connection::deleteAllRows(), KexiDB::Connection::deleteRow(), KexiFormView::initDataSource(), KexiDB::Connection::insertRow(), KexiDB::QuerySchema::pkeyFieldsOrder(), and KexiDB::Connection::updateRow(). |
|
|
Definition at line 364 of file tableschema.cpp. References m_query. Referenced by KexiDB::TableOrQuerySchema::columnInfo(), KexiDB::TableOrQuerySchema::columns(), KexiMigration::PqxxMigrate::drv_copyTable(), KexiMigration::MySQLMigrate::drv_copyTable(), KexiDB::Connection::executeQuery(), KexiDB::Connection::isEmpty(), KexiDB::Connection::prepareQuery(), and KexiDB::Connection::selectStatement(). |
|
|
Reimplemented for internal reasons. Reimplemented from KexiDB::FieldList. Definition at line 225 of file tableschema.cpp. References d, and KexiDB::FieldList::removeField(). |
|
|
Sets KexiDBSystem flag to on or off. When on, native flag is forced to be on. When off, native flag is not affected.
Definition at line 347 of file tableschema.cpp. References KexiDB::SchemaData::m_native. |
|
||||||||||||
|
Sets lookup field schema lookupFieldSchema for fieldName. Passing null lookupFieldSchema will remove the previously set lookup field.
Definition at line 387 of file tableschema.cpp. References d, KexiDB::FieldList::field(), KexiDBWarn, and KexiDB::SchemaData::name(). Referenced by KexiDB::Connection::loadExtendedTableSchemaData(). |
|
|
Reimplemented from KexiDB::SchemaData. Definition at line 354 of file tableschema.cpp. References KexiDBWarn, and KexiDB::SchemaData::m_native. |
|
|
Sets table's primary key index to pkey. Pass pkey==0 if you want to unassign existing primary key ("primary" property of given IndexSchema object will be cleared then so this index becomes ordinary index, still existing on table indeices list). If this table already has primary key assigned, it is unassigned using setPrimaryKey(0) call. Before assigning as primary key, you should add the index to indices list with addIndex() (this is not done automatically!). Definition at line 163 of file tableschema.cpp. References d, KexiDB::FieldList::fieldCount(), m_indices, m_pkey, and KexiDB::IndexSchema::setPrimaryKey(). Referenced by insertField(). |
Friends And Related Function Documentation
|
|
Reimplemented from KexiDB::SchemaData. Definition at line 190 of file tableschema.h. |
Member Data Documentation
|
|
Definition at line 178 of file tableschema.h. Referenced by anyNonPKField(), clear(), lookupFieldSchema(), lookupFieldsList(), removeField(), setLookupFieldSchema(), setPrimaryKey(), TableSchema(), and ~TableSchema(). |
|
|
Definition at line 172 of file tableschema.h. Referenced by clear(), KexiDB::Connection::createTable(), and ~TableSchema(). |
|
|
Definition at line 170 of file tableschema.h. Referenced by clear(), insertField(), setPrimaryKey(), and TableSchema(). |
|
|
Definition at line 174 of file tableschema.h. Referenced by anyNonPKField(), setPrimaryKey(), and TableSchema(). |
|
|
cached query schema that is defined by "select * from <this_table_name>"
Definition at line 176 of file tableschema.h. Referenced by query(), and ~TableSchema(). |
The documentation for this class was generated from the following files:
