KDbAlterTableHandler::InsertFieldAction
#include <KDbAlter.h>
Protected Member Functions | |
InsertFieldAction (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) |
Protected Attributes | |
int | m_index |
Protected Attributes inherited from KDbAlterTableHandler::FieldActionBase | |
int | m_fieldUID |
Detailed Description
Defines an action for inserting a single table field.
Definition at line 360 of file KDbAlter.h.
Constructor & Destructor Documentation
◆ InsertFieldAction() [1/4]
KDbAlterTableHandler::InsertFieldAction::InsertFieldAction | ( | int | fieldIndex, |
KDbField * | newField, | ||
int | uid ) |
Definition at line 550 of file KDbAlter.cpp.
◆ InsertFieldAction() [2/4]
KDbAlterTableHandler::InsertFieldAction::InsertFieldAction | ( | const InsertFieldAction & | action | ) |
copy ctor
Definition at line 559 of file KDbAlter.cpp.
◆ InsertFieldAction() [3/4]
KDbAlterTableHandler::InsertFieldAction::InsertFieldAction | ( | ) |
Creates null action.
Definition at line 566 of file KDbAlter.cpp.
◆ ~InsertFieldAction()
|
override |
Definition at line 578 of file KDbAlter.cpp.
◆ InsertFieldAction() [4/4]
|
explicitprotected |
, used for constructing null action
Definition at line 571 of file KDbAlter.cpp.
Member Function Documentation
◆ debugString()
|
overridevirtual |
Reimplemented from KDbAlterTableHandler::ActionBase.
Definition at line 599 of file KDbAlter.cpp.
◆ execute()
|
overrideprotectedvirtual |
Performs physical execution of this action.
Reimplemented from KDbAlterTableHandler::ActionBase.
Definition at line 703 of file KDbAlter.cpp.
◆ field()
|
inline |
Definition at line 379 of file KDbAlter.h.
◆ index()
|
inline |
Definition at line 373 of file KDbAlter.h.
◆ setField()
void KDbAlterTableHandler::InsertFieldAction::setField | ( | KDbField * | field | ) |
Definition at line 583 of file KDbAlter.cpp.
◆ setIndex()
|
inline |
Definition at line 376 of file KDbAlter.h.
◆ simplifyActions()
|
overridevirtual |
Legend: A,B==fields, P==property, [....]==action, (..,..,..) group of actions, <...> internal operation.
Case 1: there are "change property" actions after the Insert action. -> change the properties in the Insert action itself and remove the "change property" actions. Examples: [Insert A] && [rename A to B] => [Insert B] [Insert A] && [change property P in field A] => [Insert A with P altered] Comment: we need to do this reduction because otherwise we'd need to do psyhical altering right after [Insert A] if [rename A to B] follows.
- Todo
- not checked
Reimplemented from KDbAlterTableHandler::ActionBase.
Definition at line 624 of file KDbAlter.cpp.
◆ updateAlteringRequirements()
|
overrideprotectedvirtual |
- Todo
- sometimes add DataConversionRequired (e.g. when relationships require removing orphaned records) ?
Reimplemented from KDbAlterTableHandler::ActionBase.
Definition at line 591 of file KDbAlter.cpp.
◆ updateTableSchema()
|
overridevirtual |
- Todo
- add it only when there should be fixed value (e.g. default) set for this new field...
Reimplemented from KDbAlterTableHandler::ActionBase.
Definition at line 692 of file KDbAlter.cpp.
Member Data Documentation
◆ m_index
|
protected |
Definition at line 399 of file KDbAlter.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:38:31 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.