kexi
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 261 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 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 | |
QString | m_propertyName |
QVariant | m_newValue |
Member Function Documentation
void AlterTableHandler::ChangeFieldPropertyAction::simplifyActions | ( | ActionDictDict & | fieldActions | ) | [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.
tristate AlterTableHandler::ChangeFieldPropertyAction::execute | ( | Connection & | conn, | |
TableSchema & | table | |||
) | [protected, virtual] |
Performs physical execution of this action.
Many of the properties must be applied using a separate algorithm.
- Todo:
- errmsg
Reimplemented from KexiDB::AlterTableHandler::ActionBase.
The documentation for this class was generated from the following files: