kexi

KexiDB::AlterTableHandler::InsertFieldAction Class Reference

#include <alter.h>

Inheritance diagram for KexiDB::AlterTableHandler::InsertFieldAction:

KexiDB::AlterTableHandler::FieldActionBase KexiDB::AlterTableHandler::ActionBase

List of all members.


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::Fieldfield () 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.

Definition at line 606 of file alter.cpp.

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.

Definition at line 667 of file alter.cpp.

void AlterTableHandler::InsertFieldAction::updateAlteringRequirements (  )  [protected, virtual]

Todo:
sometimes add DataConversionRequired (e.g. when relationships require removing orphaned records) ?

Todo:

Reimplemented from KexiDB::AlterTableHandler::ActionBase.

Definition at line 575 of file alter.cpp.

tristate AlterTableHandler::InsertFieldAction::execute ( Connection conn,
TableSchema table 
) [protected, virtual]

Performs physical execution of this action.

Todo:

Reimplemented from KexiDB::AlterTableHandler::ActionBase.

Definition at line 678 of file alter.cpp.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys