KDbAlterTableHandler::RemoveFieldAction

Search for usage in LXR

KDbAlterTableHandler::RemoveFieldAction Class Reference

#include <KDbAlter.h>

Inheritance diagram for KDbAlterTableHandler::RemoveFieldAction:

Public Member Functions

 RemoveFieldAction (const QString &fieldName, int uid)
 
QString debugString (const DebugOptions &debugOptions=DebugOptions()) override
 
void simplifyActions (ActionDictDict *fieldActions) override
 
tristate updateTableSchema (KDbTableSchema *table, KDbField *field, QHash< QString, QString > *fieldHash) override
 
- Public Member Functions inherited from KDbAlterTableHandler::FieldActionBase
 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())
 
bool isNull () const
 
ChangeFieldPropertyActiontoChangeFieldPropertyAction ()
 
InsertFieldActiontoInsertFieldAction ()
 
MoveFieldPositionActiontoMoveFieldPositionAction ()
 
RemoveFieldActiontoRemoveFieldAction ()
 

Protected Member Functions

 RemoveFieldAction (bool null)
 
tristate execute (KDbConnection *conn, KDbTableSchema *table) override
 
void updateAlteringRequirements () override
 
- Protected Member Functions inherited from KDbAlterTableHandler::FieldActionBase
 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)
 

Additional Inherited Members

- Protected Attributes inherited from KDbAlterTableHandler::FieldActionBase
int m_fieldUID
 

Detailed Description

Defines an action for removing a single table field.

Definition at line 335 of file KDbAlter.h.

Constructor & Destructor Documentation

◆ RemoveFieldAction()

KDbAlterTableHandler::RemoveFieldAction::RemoveFieldAction ( bool  null)
explicitprotected

, used for constructing null action

Definition at line 489 of file KDbAlter.cpp.

Member Function Documentation

◆ execute()

tristate KDbAlterTableHandler::RemoveFieldAction::execute ( KDbConnection conn,
KDbTableSchema table 
)
overrideprotectedvirtual

Performs physical execution of this action.

Todo:

Reimplemented from KDbAlterTableHandler::ActionBase.

Definition at line 540 of file KDbAlter.cpp.

◆ simplifyActions()

void KDbAlterTableHandler::RemoveFieldAction::simplifyActions ( ActionDictDict fieldActions)
overridevirtual

Legend: A,B==objects, P==property, [....]==action, (..,..,..) group of actions, <...> internal operation. Preconditions: we assume there cannot be such case encountered: ([remove A], [do something related on A]) (except for [remove A], [insert A]) General Case: it's safe to always insert a [remove A] action.

Todo:
not checked

Reimplemented from KDbAlterTableHandler::ActionBase.

Definition at line 521 of file KDbAlter.cpp.

◆ updateAlteringRequirements()

void KDbAlterTableHandler::RemoveFieldAction::updateAlteringRequirements ( )
overrideprotectedvirtual
Todo:
sometimes add DataConversionRequired (e.g. when relationships require removing orphaned records) ?
Todo:

Reimplemented from KDbAlterTableHandler::ActionBase.

Definition at line 498 of file KDbAlter.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sat Sep 23 2023 04:11:25 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.