KexiDB::AlterTableHandler::ActionBase Class Reference

#include <alter.h>

Inheritance diagram for KexiDB::AlterTableHandler::ActionBase:
KexiDB::AlterTableHandler::FieldActionBase KexiDB::AlterTableHandler::ChangeFieldPropertyAction KexiDB::AlterTableHandler::InsertFieldAction KexiDB::AlterTableHandler::MoveFieldPositionAction KexiDB::AlterTableHandler::RemoveFieldAction

Classes

class  DebugOptions
 

Public Member Functions

 ActionBase (bool null=false)
 
ChangeFieldPropertyAction & toChangeFieldPropertyAction ()
 
RemoveFieldAction & toRemoveFieldAction ()
 
InsertFieldAction & toInsertFieldAction ()
 
MoveFieldPositionAction & toMoveFieldPositionAction ()
 
bool isNull () const
 
virtual TQString debugString (const DebugOptions &debugOptions=DebugOptions())
 
void debug (const DebugOptions &debugOptions=DebugOptions())
 

Protected Member Functions

void setAlteringRequirements (int alteringRequirements)
 
int alteringRequirements () const
 
virtual void updateAlteringRequirements ()
 
virtual void simplifyActions (ActionDictDict &fieldActions)
 
virtual bool shouldBeRemoved (ActionDictDict &fieldActions)
 
virtual tristate updateTableSchema (TableSchema &table, Field *field, TQMap< TQString, TQString > &fieldMap)
 

Friends

class AlterTableHandler
 

Detailed Description

Abstract base class used for implementing all the AlterTable actions.

Definition at line 157 of file alter.h.

Constructor & Destructor Documentation

◆ ActionBase()

AlterTableHandler::ActionBase::ActionBase ( bool  null = false)

Definition at line 53 of file alter.cpp.

◆ ~ActionBase()

AlterTableHandler::ActionBase::~ActionBase ( )
virtual

Definition at line 60 of file alter.cpp.

Member Function Documentation

◆ alteringRequirements()

int KexiDB::AlterTableHandler::ActionBase::alteringRequirements ( ) const
inlineprotected

Definition at line 196 of file alter.h.

◆ debug()

void KexiDB::AlterTableHandler::ActionBase::debug ( const DebugOptions &  debugOptions = DebugOptions())
inline

Definition at line 187 of file alter.h.

◆ debugString()

virtual TQString KexiDB::AlterTableHandler::ActionBase::debugString ( const DebugOptions &  debugOptions = DebugOptions())
inlinevirtual

Definition at line 185 of file alter.h.

◆ isNull()

bool KexiDB::AlterTableHandler::ActionBase::isNull ( ) const
inline
Returns
true if the action is NULL; used in the Table Designer for temporarily collecting actions that have no effect at all.

Definition at line 169 of file alter.h.

◆ setAlteringRequirements()

void KexiDB::AlterTableHandler::ActionBase::setAlteringRequirements ( int  alteringRequirements)
inlineprotected

Sets requirements for altering; used internally by AlterTableHandler object.

Definition at line 193 of file alter.h.

◆ shouldBeRemoved()

virtual bool KexiDB::AlterTableHandler::ActionBase::shouldBeRemoved ( ActionDictDict &  fieldActions)
inlineprotectedvirtual

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 in KexiDB::AlterTableHandler::ChangeFieldPropertyAction.

Definition at line 209 of file alter.h.

◆ simplifyActions()

virtual void KexiDB::AlterTableHandler::ActionBase::simplifyActions ( ActionDictDict &  fieldActions)
inlineprotectedvirtual

Simplifies fieldActions dictionary. If this action has to be inserted Into the dictionary, an ActionDict is created first and then a copy of this action is inserted into it.

Reimplemented in KexiDB::AlterTableHandler::ChangeFieldPropertyAction, KexiDB::AlterTableHandler::RemoveFieldAction, KexiDB::AlterTableHandler::InsertFieldAction, and KexiDB::AlterTableHandler::MoveFieldPositionAction.

Definition at line 203 of file alter.h.

◆ toChangeFieldPropertyAction()

AlterTableHandler::ChangeFieldPropertyAction & AlterTableHandler::ActionBase::toChangeFieldPropertyAction ( )

Definition at line 64 of file alter.cpp.

◆ toInsertFieldAction()

AlterTableHandler::InsertFieldAction & AlterTableHandler::ActionBase::toInsertFieldAction ( )

Definition at line 78 of file alter.cpp.

◆ toMoveFieldPositionAction()

AlterTableHandler::MoveFieldPositionAction & AlterTableHandler::ActionBase::toMoveFieldPositionAction ( )

Definition at line 85 of file alter.cpp.

◆ toRemoveFieldAction()

AlterTableHandler::RemoveFieldAction & AlterTableHandler::ActionBase::toRemoveFieldAction ( )

Definition at line 71 of file alter.cpp.

◆ updateAlteringRequirements()

virtual void KexiDB::AlterTableHandler::ActionBase::updateAlteringRequirements ( )
inlineprotectedvirtual

◆ updateTableSchema()

virtual tristate KexiDB::AlterTableHandler::ActionBase::updateTableSchema ( TableSchema &  table,
Field *  field,
TQMap< TQString, TQString > &  fieldMap 
)
inlineprotectedvirtual

Reimplemented in KexiDB::AlterTableHandler::InsertFieldAction.

Definition at line 212 of file alter.h.

Friends And Related Symbol Documentation

◆ AlterTableHandler

friend class AlterTableHandler
friend

Definition at line 228 of file alter.h.


The documentation for this class was generated from the following files: