HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_IORMSchemaEditor Class Reference

#include <UT_ORMSchemaEditor.h>

+ Inheritance diagram for UT_IORMSchemaEditor:

Public Member Functions

virtual ~UT_IORMSchemaEditor ()
 
 UT_NON_COPYABLE (UT_IORMSchemaEditor)
 
virtual void deleteModel (const UT_ORMModelState &model, bool handle_autom2m=true)
 
virtual void createModel (const UT_ORMModelState &model)
 
virtual void addField (const UT_ORMModelState &model, const UT_ORMModelStateField &field)
 
virtual void removeField (const UT_ORMModelState &model, const UT_ORMModelStateField &field)
 
virtual void renameField (const UT_ORMModelState &model, const UT_ORMModelStateField &from_field, const UT_ORMModelStateField &to_field)
 
virtual void addConstraint (const UT_ORMModelState &model, UT_IORMConstraint *constraint)
 
virtual void alterDBTable (const UT_ORMModelState &old_model, const UT_ORMModelState &new_model)
 
virtual void alterField (const UT_ORMModelState &model, const UT_ORMModelStateField &old_field, const UT_ORMModelStateField &new_field)
 
UT_StringHolder uniqueSql (const UT_ORMModelState &model, const UT_StringArray &fields, const UT_StringHolder &name, const UT_StringHolder &condition)
 
UT_UniquePtr< UT_ORMDDLStatementcreateUniqueSql (const UT_ORMModelState &model, const UT_StringArray &fields, const UT_StringHolder &name, const UT_StringHolder &condition) const
 
UT_UniquePtr< UT_ORMDDLStatementdeleteUniqueSql (const UT_ORMModelState &model, const UT_StringHolder &name, const UT_StringHolder &condition) const
 
const UT_StringArraycollectedSql () const
 
UT_ErrorCode error () const
 
UT_SqlDatabaseconnection ()
 

Protected Member Functions

 UT_IORMSchemaEditor (UT_SqlOrm &orm, bool collect_sql=false)
 
UT_StringHolder columnSql (const UT_ORMModelState &model, const UT_ORMModelStateField &field)
 
void execute (const UT_StringHolder &sql)
 
UT_StringHolder tableSql (const UT_ORMModelState &model)
 
UT_StringHolder typeString_ (UT_ORMColumnType col_type) const
 

Protected Attributes

UT_SqlOrmmyORM
 
UT_StringHolder mySqlDeleteTable
 
UT_Map< UT_ORMColumnType,
UT_StringHolder
myColumnTypeToDBType
 
UT_Array< UT_UniquePtr
< UT_IORMDDLReference > > 
myDeferredSql
 
UT_ErrorCode myErrorCode
 
UT_StringArray myCollectedSql
 
bool myCollectSql = false
 
UT_UniquePtr
< UT_AutoSqlTransaction
myTransaction
 

Detailed Description

Definition at line 26 of file UT_ORMSchemaEditor.h.

Constructor & Destructor Documentation

virtual UT_IORMSchemaEditor::~UT_IORMSchemaEditor ( )
virtual
UT_IORMSchemaEditor::UT_IORMSchemaEditor ( UT_SqlOrm orm,
bool  collect_sql = false 
)
protected

Member Function Documentation

virtual void UT_IORMSchemaEditor::addConstraint ( const UT_ORMModelState model,
UT_IORMConstraint constraint 
)
virtual

Reimplemented in UT_ORMSqliteSchemaEditor.

virtual void UT_IORMSchemaEditor::addField ( const UT_ORMModelState model,
const UT_ORMModelStateField field 
)
virtual

Reimplemented in UT_ORMSqliteSchemaEditor.

virtual void UT_IORMSchemaEditor::alterDBTable ( const UT_ORMModelState old_model,
const UT_ORMModelState new_model 
)
virtual

Reimplemented in UT_ORMSqliteSchemaEditor.

virtual void UT_IORMSchemaEditor::alterField ( const UT_ORMModelState model,
const UT_ORMModelStateField old_field,
const UT_ORMModelStateField new_field 
)
virtual

Reimplemented in UT_ORMSqliteSchemaEditor.

const UT_StringArray& UT_IORMSchemaEditor::collectedSql ( ) const
inline

Definition at line 72 of file UT_ORMSchemaEditor.h.

UT_StringHolder UT_IORMSchemaEditor::columnSql ( const UT_ORMModelState model,
const UT_ORMModelStateField field 
)
protected
UT_SqlDatabase& UT_IORMSchemaEditor::connection ( )
virtual void UT_IORMSchemaEditor::createModel ( const UT_ORMModelState model)
virtual
UT_UniquePtr<UT_ORMDDLStatement> UT_IORMSchemaEditor::createUniqueSql ( const UT_ORMModelState model,
const UT_StringArray fields,
const UT_StringHolder name,
const UT_StringHolder condition 
) const
virtual void UT_IORMSchemaEditor::deleteModel ( const UT_ORMModelState model,
bool  handle_autom2m = true 
)
virtual
UT_UniquePtr<UT_ORMDDLStatement> UT_IORMSchemaEditor::deleteUniqueSql ( const UT_ORMModelState model,
const UT_StringHolder name,
const UT_StringHolder condition 
) const
UT_ErrorCode UT_IORMSchemaEditor::error ( ) const
void UT_IORMSchemaEditor::execute ( const UT_StringHolder sql)
protected
virtual void UT_IORMSchemaEditor::removeField ( const UT_ORMModelState model,
const UT_ORMModelStateField field 
)
virtual

Reimplemented in UT_ORMSqliteSchemaEditor.

virtual void UT_IORMSchemaEditor::renameField ( const UT_ORMModelState model,
const UT_ORMModelStateField from_field,
const UT_ORMModelStateField to_field 
)
virtual
UT_StringHolder UT_IORMSchemaEditor::tableSql ( const UT_ORMModelState model)
protected
UT_StringHolder UT_IORMSchemaEditor::typeString_ ( UT_ORMColumnType  col_type) const
protected
UT_StringHolder UT_IORMSchemaEditor::uniqueSql ( const UT_ORMModelState model,
const UT_StringArray fields,
const UT_StringHolder name,
const UT_StringHolder condition 
)
UT_IORMSchemaEditor::UT_NON_COPYABLE ( UT_IORMSchemaEditor  )

Member Data Documentation

UT_StringArray UT_IORMSchemaEditor::myCollectedSql
protected

Definition at line 97 of file UT_ORMSchemaEditor.h.

bool UT_IORMSchemaEditor::myCollectSql = false
protected

Definition at line 98 of file UT_ORMSchemaEditor.h.

UT_Map<UT_ORMColumnType, UT_StringHolder> UT_IORMSchemaEditor::myColumnTypeToDBType
protected

Definition at line 91 of file UT_ORMSchemaEditor.h.

UT_Array<UT_UniquePtr<UT_IORMDDLReference> > UT_IORMSchemaEditor::myDeferredSql
protected

Definition at line 93 of file UT_ORMSchemaEditor.h.

UT_ErrorCode UT_IORMSchemaEditor::myErrorCode
protected

Definition at line 95 of file UT_ORMSchemaEditor.h.

UT_SqlOrm& UT_IORMSchemaEditor::myORM
protected

Definition at line 87 of file UT_ORMSchemaEditor.h.

UT_StringHolder UT_IORMSchemaEditor::mySqlDeleteTable
protected

Definition at line 89 of file UT_ORMSchemaEditor.h.

UT_UniquePtr<UT_AutoSqlTransaction> UT_IORMSchemaEditor::myTransaction
protected

Definition at line 100 of file UT_ORMSchemaEditor.h.


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