KexiDB::AlterTableHandler::ChangeFieldPropertyAction Class Reference
#include <alter.h>
Inheritance diagram for KexiDB::AlterTableHandler::ChangeFieldPropertyAction:

Detailed Description
Defines an action for changing a single property value of a table field. Supported properties are currently: "name", "type", "caption", "description", "unsigned", "length", "precision", "width", "defaultValue", "primaryKey", "unique", "notNull", "allowEmpty", "autoIncrement", "indexed", "visibleDecimalPlaces"More to come.
Definition at line 271 of file alter.h.
Public Member Functions | |
| ChangeFieldPropertyAction (const QString &fieldName, const QString &propertyName, const QVariant &newValue, int uid) | |
| ChangeFieldPropertyAction (bool null) | |
| virtual | ~ChangeFieldPropertyAction () |
| QString | propertyName () const |
| QVariant | newValue () const |
| virtual QString | debugString (const DebugOptions &debugOptions=DebugOptions()) |
| virtual void | simplifyActions (ActionDictDict &fieldActions) |
| virtual bool | shouldBeRemoved (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) |
| Performs physical execution of this action. | |
Protected Attributes | |
| QString | m_propertyName |
| QVariant | m_newValue |
Constructor & Destructor Documentation
|
||||||||||||||||||||
|
|
|
|
|
|
|
|
Member Function Documentation
|
|
Reimplemented from KexiDB::AlterTableHandler::ActionBase. Definition at line 193 of file alter.cpp. References KexiDB::AlterTableHandler::FieldActionBase::fieldName(), KexiDB::AlterTableHandler::FieldActionBase::m_fieldUID, m_newValue, and m_propertyName. Referenced by simplifyActions(). |
|
||||||||||||
|
Performs physical execution of this action. Many of the properties must be applied using a separate algorithm.
Reimplemented from KexiDB::AlterTableHandler::ActionBase. Definition at line 392 of file alter.cpp. References KexiDB::AlterTableHandler::alteringTypeForProperty(), KexiDB::FieldList::field(), field, KexiDB::AlterTableHandler::FieldActionBase::fieldName(), m_propertyName, newValue(), KexiDB::AlterTableHandler::SchemaAlteringRequired, and KexiDB::setFieldProperty(). |
|
|
|
|
After calling simplifyActions() for each action, shouldBeRemoved() is called for them as an additional step. This is used for ChangeFieldPropertyAction items so actions that do not change property values are removed. Reimplemented from KexiDB::AlterTableHandler::ActionBase. Definition at line 364 of file alter.cpp. References KexiDB::AlterTableHandler::FieldActionBase::fieldName(), and m_newValue. |
|
|
Legend: A,B==fields, P==property, [....]==action, (..,..,..) group of actions, <...> internal operation. Case 1. (special) when new action=[rename A to B] and exists=[rename B to C] => remove [rename B to C] and set result to new [rename A to C] and go to 1b. Case 1b. when new action=[rename A to B] and actions exist like [set property P to C in field B] or like [delete field B] or like [move field B] => change B to A for all these actions Case 2. when new action=[change property in field A] (property != name) and exists=[remove A] or exists=[change property in field A] => do not add [change property in field A] because it will be removed anyway or the property will change Reimplemented from KexiDB::AlterTableHandler::ActionBase. Definition at line 291 of file alter.cpp. References createActionDict(), debugString(), KexiDB::AlterTableHandler::FieldActionBase::fieldName(), foreach_dict, KexiDBDbg, m_propertyName, newValue(), and KexiDB::AlterTableHandler::FieldActionBase::uid(). |
|
|
Reimplemented from KexiDB::AlterTableHandler::ActionBase. Definition at line 187 of file alter.cpp. References KexiDB::AlterTableHandler::alteringTypeForProperty(), m_propertyName, and KexiDB::AlterTableHandler::ActionBase::setAlteringRequirements(). |
|
||||||||||||||||
|
Reimplemented from KexiDB::AlterTableHandler::ActionBase. Definition at line 370 of file alter.cpp. References KexiDB::AlterTableHandler::alteringTypeForProperty(), cancelled, m_propertyName, KexiDB::Field::name(), newValue(), KexiDB::FieldList::renameField(), KexiDB::AlterTableHandler::SchemaAlteringRequired, and KexiDB::setFieldProperty(). |
Member Data Documentation
|
|
Definition at line 297 of file alter.h. Referenced by debugString(), and shouldBeRemoved(). |
|
|
Definition at line 296 of file alter.h. Referenced by debugString(), execute(), simplifyActions(), updateAlteringRequirements(), and updateTableSchema(). |
The documentation for this class was generated from the following files:
