#include <alter.h>
Public Member Functions | |
| ChangeFieldPropertyAction (const TQString &fieldName, const TQString &propertyName, const TQVariant &newValue, int uid) | |
| ChangeFieldPropertyAction (bool null) | |
| TQString | propertyName () const |
| TQVariant | newValue () const |
| virtual TQString | debugString (const DebugOptions &debugOptions=DebugOptions()) |
| virtual void | simplifyActions (ActionDictDict &fieldActions) |
| virtual bool | shouldBeRemoved (ActionDictDict &fieldActions) |
| virtual tristate | updateTableSchema (TableSchema &table, Field *field, TQMap< TQString, TQString > &fieldMap) |
Public Member Functions inherited from KexiDB::AlterTableHandler::FieldActionBase | |
| FieldActionBase (const TQString &fieldName, int uid) | |
| FieldActionBase (bool) | |
| TQString | fieldName () const |
| int | uid () const |
| void | setFieldName (const TQString &fieldName) |
Public Member Functions inherited from KexiDB::AlterTableHandler::ActionBase | |
| ActionBase (bool null=false) | |
| ChangeFieldPropertyAction & | toChangeFieldPropertyAction () |
| RemoveFieldAction & | toRemoveFieldAction () |
| InsertFieldAction & | toInsertFieldAction () |
| MoveFieldPositionAction & | toMoveFieldPositionAction () |
| bool | isNull () const |
| void | debug (const DebugOptions &debugOptions=DebugOptions()) |
Protected Member Functions | |
| virtual void | updateAlteringRequirements () |
| virtual tristate | execute (Connection &conn, TableSchema &table) |
Protected Member Functions inherited from KexiDB::AlterTableHandler::ActionBase | |
| void | setAlteringRequirements (int alteringRequirements) |
| int | alteringRequirements () const |
Protected Attributes | |
| TQString | m_propertyName |
| TQVariant | m_newValue |
Protected Attributes inherited from KexiDB::AlterTableHandler::FieldActionBase | |
| int | m_fieldUID |
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.
Constructor & Destructor Documentation
◆ ChangeFieldPropertyAction() [1/2]
| AlterTableHandler::ChangeFieldPropertyAction::ChangeFieldPropertyAction | ( | const TQString & | fieldName, |
| const TQString & | propertyName, | ||
| const TQVariant & | newValue, | ||
| int | uid | ||
| ) |
◆ ChangeFieldPropertyAction() [2/2]
| AlterTableHandler::ChangeFieldPropertyAction::ChangeFieldPropertyAction | ( | bool | null | ) |
◆ ~ChangeFieldPropertyAction()
|
virtual |
Member Function Documentation
◆ debugString()
|
virtual |
Reimplemented from KexiDB::AlterTableHandler::ActionBase.
◆ execute()
|
protectedvirtual |
Performs physical execution of this action.
Many of the properties must be applied using a separate algorithm.
- Todo:
- errmsg
Reimplemented from KexiDB::AlterTableHandler::ActionBase.
◆ newValue()
|
inline |
◆ propertyName()
|
inline |
◆ shouldBeRemoved()
|
virtual |
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.
◆ simplifyActions()
|
virtual |
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.
◆ updateAlteringRequirements()
|
protectedvirtual |
Reimplemented from KexiDB::AlterTableHandler::ActionBase.
◆ updateTableSchema()
|
virtual |
Reimplemented from KexiDB::AlterTableHandler::ActionBase.
Member Data Documentation
◆ m_newValue
|
protected |
◆ m_propertyName
|
protected |
The documentation for this class was generated from the following files:

Public Member Functions inherited from