KexiDB::AlterTableHandler::FieldActionBase Class Reference

#include <alter.h>

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

Public Member Functions

 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
 
virtual TQString debugString (const DebugOptions &debugOptions=DebugOptions())
 
void debug (const DebugOptions &debugOptions=DebugOptions())
 

Protected Attributes

int m_fieldUID
 

Additional Inherited Members

- Protected Member Functions inherited from KexiDB::AlterTableHandler::ActionBase
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)
 

Detailed Description

Abstract base class used for implementing table field-related actions.

Definition at line 232 of file alter.h.

Constructor & Destructor Documentation

◆ FieldActionBase() [1/2]

AlterTableHandler::FieldActionBase::FieldActionBase ( const TQString &  fieldName,
int  uid 
)

Definition at line 94 of file alter.cpp.

◆ FieldActionBase() [2/2]

AlterTableHandler::FieldActionBase::FieldActionBase ( bool  )

Definition at line 101 of file alter.cpp.

◆ ~FieldActionBase()

AlterTableHandler::FieldActionBase::~FieldActionBase ( )
virtual

Definition at line 107 of file alter.cpp.

Member Function Documentation

◆ fieldName()

TQString KexiDB::AlterTableHandler::FieldActionBase::fieldName ( ) const
inline
Returns
field name for this action

Definition at line 239 of file alter.h.

◆ setFieldName()

void KexiDB::AlterTableHandler::FieldActionBase::setFieldName ( const TQString &  fieldName)
inline

Sets field name for this action.

Definition at line 253 of file alter.h.

◆ uid()

int KexiDB::AlterTableHandler::FieldActionBase::uid ( ) const
inline
Returns
field's unique identifier This id is needed because in the meantime there can be more than one field sharing the same name, so we need to identify them unambiguously. After the (valid) altering is completed all the names will be unique.

Example scenario when user exchanged the field names:

  1. At the beginning: [field A], [field B]
  2. Rename the 1st field to B: [field B], [field B]
  3. Rename the 2nd field to A: [field B], [field A]

Definition at line 250 of file alter.h.

Member Data Documentation

◆ m_fieldUID

int KexiDB::AlterTableHandler::FieldActionBase::m_fieldUID
protected

field's unique identifier,

See also
uid()

Definition at line 258 of file alter.h.


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