HDK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
UT_ORMMigrationBuilder.h
Go to the documentation of this file.
1
/*
2
* PROPRIETARY INFORMATION. This software is proprietary to
3
* Side Effects Software Inc., and is not to be reproduced,
4
* transmitted, or disclosed in any way without written permission.
5
*
6
* NAME: UT_ORMMigrationBuilder.h
7
*
8
* COMMENTS:
9
*
10
* The UT_ORMMigrationBuilder is the object that defines all of the
11
* various migrations that are required given a set of model metas. The
12
* model metas are based on the currently registerd and yet to be built
13
* models in the UT_SQLORM object. This means during the lifetime of a
14
* program multiple builders could be generated each defining a subset of
15
* all model meta objects of a program.
16
*
17
* The migration builder also tries to verify the various operations make
18
* sense for a given model. For example, trying to drop a column that
19
* doesnt exist given the current steps of the migration for a model. The
20
* migration also tries to verify that the final result of the migration
21
* matches the current table as defined in the build step. These all help
22
* to ensure that the database and the current program are in sync with
23
* each other.
24
*
25
* See UT_SQLORM for detailed information on the entire system.
26
*/
27
28
#ifndef __UT_ORMMIGRATIONBUILDER_H__
29
#define __UT_ORMMIGRATIONBUILDER_H__
30
31
#include "
UT_API.h
"
32
33
#include "
UT_StringHolder.h
"
34
#include "
UT_Array.h
"
35
#include "
UT_UniquePtr.h
"
36
#include "
UT_Map.h
"
37
#include "
UT_NonCopyable.h
"
38
#include "
UT_ORMColumn.h
"
39
#include "
UT_ErrorCode.h
"
40
#include "
UT_ORMMigration.h
"
41
42
class
UT_IORMOperation
;
43
class
UT_ORMCreateTableOperation
;
44
class
UT_ORMDropTableOperation
;
45
class
UT_ORMAddFieldOperation
;
46
class
UT_ORMRenameFieldOperation
;
47
class
UT_ORMRemoveFieldOperation
;
48
class
UT_ORMMigrationBuilder
;
49
class
UT_ORMModelMeta
;
50
class
UT_ORMMigrationResult
;
51
52
class
UT_API
UT_ORMMigrationBuilder
53
{
54
public
:
55
UT_ORMMigrationBuilder
() =
default
;
56
UT_NON_COPYABLE
(
UT_ORMMigrationBuilder
);
57
~
UT_ORMMigrationBuilder
();
58
59
UT_ORMMigration
& addMigration(
60
const
UT_StringHolder
& model_mig_name,
61
const
UT_StringHolder
& mig_name);
62
63
const
UT_Array<UT_SharedPtr<UT_ORMMigration>
>&
migrations
()
const
64
{
65
return
myMigrations;
66
}
67
68
const
UT_StringHolder
&
errorMessage
()
const
{
return
myErrorMessage; }
69
const
UT_ErrorCode
&
errorCode
()
const
{
return
myErrorCode; }
70
71
private
:
72
UT_Array<UT_SharedPtr<UT_ORMMigration>
> myMigrations;
73
UT_StringHolder
myErrorMessage;
74
UT_ErrorCode
myErrorCode;
75
};
76
77
#endif // __UT_ORMMIGRATIONBUILDER_H__
UT_ORMMigrationBuilder::errorMessage
const UT_StringHolder & errorMessage() const
Definition:
UT_ORMMigrationBuilder.h:68
UT_ORMMigrationBuilder
Definition:
UT_ORMMigrationBuilder.h:52
UT_ORMMigrationBuilder::migrations
const UT_Array< UT_SharedPtr< UT_ORMMigration > > & migrations() const
Definition:
UT_ORMMigrationBuilder.h:63
UT_ORMCreateTableOperation
Definition:
UT_ORMOperation.h:54
UT_ORMMigration.h
UT_API.h
UT_API
#define UT_API
Definition:
UT_API.h:14
UT_Array.h
UT_Array
Definition:
BV_KDOPTree.h:18
UT_StringHolder
Definition:
UT_StringHolder.h:1009
UT_ORMMigrationBuilder::errorCode
const UT_ErrorCode & errorCode() const
Definition:
UT_ORMMigrationBuilder.h:69
UT_Map.h
UT_ORMMigrationResult
Definition:
UT_ORMMigrationResult.h:22
UT_ErrorCode.h
UT_NON_COPYABLE
#define UT_NON_COPYABLE(CLASS)
Define deleted copy constructor and assignment operator inside a class.
Definition:
UT_NonCopyable.h:31
UT_IORMOperation
Definition:
UT_ORMOperation.h:32
UT_ORMColumn.h
UT_NonCopyable.h
UT_ErrorCode
std::error_code UT_ErrorCode
Definition:
UT_ErrorCode.h:20
UT_ORMModelMeta
Definition:
UT_ORMModelMeta.h:45
UT_UniquePtr.h
UT_StringHolder.h
UT_ORMRemoveFieldOperation
Definition:
UT_ORMOperation.h:210
UT_ORMRenameFieldOperation
Definition:
UT_ORMOperation.h:241
UT_ORMMigration
Definition:
UT_ORMMigration.h:25
UT_ORMAddFieldOperation
Definition:
UT_ORMOperation.h:178
UT_ORMDropTableOperation
Definition:
UT_ORMOperation.h:120
UT
UT_ORMMigrationBuilder.h
Generated on Wed Aug 27 2025 03:08:42 for HDK by
1.8.6