kexi
KexiDB::AlterTableHandler::InsertFieldAction Class Reference
#include <alter.h>

Detailed Description
Defines an action for inserting a single table field.Definition at line 322 of file alter.h.
Public Member Functions | |
InsertFieldAction (int fieldIndex, KexiDB::Field *newField, int uid) | |
InsertFieldAction (const InsertFieldAction &action) | |
InsertFieldAction (bool) | |
int | index () const |
void | setIndex (int index) |
KexiDB::Field & | field () const |
void | setField (KexiDB::Field *field) |
virtual QString | debugString (const DebugOptions &debugOptions=DebugOptions()) |
virtual void | simplifyActions (ActionDictDict &fieldActions) |
virtual tristate | updateTableSchema (TableSchema &table, Field *field, QMap< QString, QString > &fieldMap) |
Protected Member Functions | |
virtual void | updateAlteringRequirements () |
virtual tristate | execute (Connection &conn, TableSchema &table) |
Protected Attributes | |
int | m_index |
Member Function Documentation
void AlterTableHandler::InsertFieldAction::simplifyActions | ( | ActionDictDict & | fieldActions | ) | [virtual] |
Legend: A,B==fields, P==property, [....]==action, (..,..,..) group of actions, <...> internal operation.
Case 1: there are "change property" actions after the Insert action. -> change the properties in the Insert action itself and remove the "change property" actions. Examples: [Insert A] && [rename A to B] => [Insert B] [Insert A] && [change property P in field A] => [Insert A with P altered] Comment: we need to do this reduction because otherwise we'd need to do psyhical altering right after [Insert A] if [rename A to B] follows.
- Todo:
- not checked
Reimplemented from KexiDB::AlterTableHandler::ActionBase.
tristate AlterTableHandler::InsertFieldAction::updateTableSchema | ( | TableSchema & | table, | |
Field * | field, | |||
QMap< QString, QString > & | fieldMap | |||
) | [virtual] |
- Todo:
- add it only when there should be fixed value (e.g. default) set for this new field...
Reimplemented from KexiDB::AlterTableHandler::ActionBase.
void AlterTableHandler::InsertFieldAction::updateAlteringRequirements | ( | ) | [protected, virtual] |
- Todo:
- sometimes add DataConversionRequired (e.g. when relationships require removing orphaned records) ?
Reimplemented from KexiDB::AlterTableHandler::ActionBase.
tristate AlterTableHandler::InsertFieldAction::execute | ( | Connection & | conn, | |
TableSchema & | table | |||
) | [protected, virtual] |
Performs physical execution of this action.
Reimplemented from KexiDB::AlterTableHandler::ActionBase.
The documentation for this class was generated from the following files: