KDbAlterTableHandler::FieldActionBase

Search for usage in LXR

KDbAlterTableHandler::FieldActionBase Class Reference

#include <KDbAlter.h>

Inheritance diagram for KDbAlterTableHandler::FieldActionBase:

Public Member Functions

 FieldActionBase (const QString &fieldName, int uid)
 
QString fieldName () const
 
void setFieldName (const QString &fieldName)
 
int uid () const
 
- Public Member Functions inherited from KDbAlterTableHandler::ActionBase
void debug (const DebugOptions &debugOptions=DebugOptions())
 
virtual QString debugString (const DebugOptions &debugOptions=DebugOptions())
 
bool isNull () const
 
ChangeFieldPropertyActiontoChangeFieldPropertyAction ()
 
InsertFieldActiontoInsertFieldAction ()
 
MoveFieldPositionActiontoMoveFieldPositionAction ()
 
RemoveFieldActiontoRemoveFieldAction ()
 

Protected Member Functions

 FieldActionBase (bool null)
 
- Protected Member Functions inherited from KDbAlterTableHandler::ActionBase
 ActionBase (bool null)
 
int alteringRequirements () const
 
void setAlteringRequirements (int alteringRequirements)
 
virtual bool shouldBeRemoved (ActionDictDict *fieldActions)
 
virtual void simplifyActions (ActionDictDict *fieldActions)
 
virtual void updateAlteringRequirements ()
 
virtual tristate updateTableSchema (KDbTableSchema *table, KDbField *field, QHash< QString, QString > *fieldHash)
 

Protected Attributes

int m_fieldUID
 

Detailed Description

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

Definition at line 248 of file KDbAlter.h.

Constructor & Destructor Documentation

◆ FieldActionBase() [1/2]

KDbAlterTableHandler::FieldActionBase::FieldActionBase ( const QString & fieldName,
int uid )

Definition at line 107 of file KDbAlter.cpp.

◆ ~FieldActionBase()

KDbAlterTableHandler::FieldActionBase::~FieldActionBase ( )
override

Definition at line 120 of file KDbAlter.cpp.

◆ FieldActionBase() [2/2]

KDbAlterTableHandler::FieldActionBase::FieldActionBase ( bool null)
explicitprotected

, used for constructing null action

Definition at line 114 of file KDbAlter.cpp.

Member Function Documentation

◆ fieldName()

QString KDbAlterTableHandler::FieldActionBase::fieldName ( ) const
inline
Returns
field name for this action

Definition at line 255 of file KDbAlter.h.

◆ setFieldName()

void KDbAlterTableHandler::FieldActionBase::setFieldName ( const QString & fieldName)
inline

Sets field name for this action.

Definition at line 273 of file KDbAlter.h.

◆ uid()

int KDbAlterTableHandler::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 268 of file KDbAlter.h.

Member Data Documentation

◆ m_fieldUID

int KDbAlterTableHandler::FieldActionBase::m_fieldUID
protected

field's unique identifier,

See also
uid()

Definition at line 282 of file KDbAlter.h.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jul 26 2024 11:59:39 by doxygen 1.11.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.