KDbAlterTableHandler::ActionBase

Search for usage in LXR

KDbAlterTableHandler::ActionBase Class Reference

#include <KDbAlter.h>

Inheritance diagram for KDbAlterTableHandler::ActionBase:

Classes

class  DebugOptions
 

Public Member Functions

void debug (const DebugOptions &debugOptions=DebugOptions())
 
virtual QString debugString (const DebugOptions &debugOptions=DebugOptions())
 
bool isNull () const
 
ChangeFieldPropertyActiontoChangeFieldPropertyAction ()
 
InsertFieldActiontoInsertFieldAction ()
 
MoveFieldPositionActiontoMoveFieldPositionAction ()
 
RemoveFieldActiontoRemoveFieldAction ()
 

Protected Member Functions

 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)
 

Detailed Description

Abstract base class used for implementing all the AlterTable actions.

Definition at line 158 of file KDbAlter.h.

Constructor & Destructor Documentation

◆ ~ActionBase()

KDbAlterTableHandler::ActionBase::~ActionBase ( )
virtual

Definition at line 67 of file KDbAlter.cpp.

◆ ActionBase()

KDbAlterTableHandler::ActionBase::ActionBase ( bool null)
explicitprotected

, used for constructing null action

Definition at line 60 of file KDbAlter.cpp.

Member Function Documentation

◆ alteringRequirements()

int KDbAlterTableHandler::ActionBase::alteringRequirements ( ) const
inlineprotected

Definition at line 204 of file KDbAlter.h.

◆ debug()

void KDbAlterTableHandler::ActionBase::debug ( const DebugOptions & debugOptions = DebugOptions())
Todo
add QDebug operator <<

Definition at line 99 of file KDbAlter.cpp.

◆ debugString()

virtual QString KDbAlterTableHandler::ActionBase::debugString ( const DebugOptions & debugOptions = DebugOptions())
inlinevirtual

Definition at line 188 of file KDbAlter.h.

◆ isNull()

bool KDbAlterTableHandler::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 170 of file KDbAlter.h.

◆ setAlteringRequirements()

void KDbAlterTableHandler::ActionBase::setAlteringRequirements ( int alteringRequirements)
inlineprotected

Sets requirements for altering; used internally by KDbAlterTableHandler object.

Definition at line 200 of file KDbAlter.h.

◆ shouldBeRemoved()

virtual bool KDbAlterTableHandler::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 KDbAlterTableHandler::ChangeFieldPropertyAction.

Definition at line 221 of file KDbAlter.h.

◆ simplifyActions()

virtual void KDbAlterTableHandler::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 KDbAlterTableHandler::ChangeFieldPropertyAction, KDbAlterTableHandler::InsertFieldAction, KDbAlterTableHandler::MoveFieldPositionAction, and KDbAlterTableHandler::RemoveFieldAction.

Definition at line 213 of file KDbAlter.h.

◆ toChangeFieldPropertyAction()

KDbAlterTableHandler::ChangeFieldPropertyAction & KDbAlterTableHandler::ActionBase::toChangeFieldPropertyAction ( )

Definition at line 71 of file KDbAlter.cpp.

◆ toInsertFieldAction()

KDbAlterTableHandler::InsertFieldAction & KDbAlterTableHandler::ActionBase::toInsertFieldAction ( )

Definition at line 85 of file KDbAlter.cpp.

◆ toMoveFieldPositionAction()

KDbAlterTableHandler::MoveFieldPositionAction & KDbAlterTableHandler::ActionBase::toMoveFieldPositionAction ( )

Definition at line 92 of file KDbAlter.cpp.

◆ toRemoveFieldAction()

KDbAlterTableHandler::RemoveFieldAction & KDbAlterTableHandler::ActionBase::toRemoveFieldAction ( )

Definition at line 78 of file KDbAlter.cpp.

◆ updateAlteringRequirements()

virtual void KDbAlterTableHandler::ActionBase::updateAlteringRequirements ( )
inlineprotectedvirtual

◆ updateTableSchema()

virtual tristate KDbAlterTableHandler::ActionBase::updateTableSchema ( KDbTableSchema * table,
KDbField * field,
QHash< QString, QString > * fieldHash )
inlineprotectedvirtual

Reimplemented in KDbAlterTableHandler::InsertFieldAction.

Definition at line 225 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.