-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjoin_clause.cpp
More file actions
137 lines (109 loc) · 2.98 KB
/
join_clause.cpp
File metadata and controls
137 lines (109 loc) · 2.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
#include "stdafx.h"
#include "join_clause.h"
void orm::sql::swap(orm::sql::join_clause &left, orm::sql::join_clause &right)
{
using std::swap;
swap(left._destinationColumn, right._destinationColumn);
swap(left._destinationTable, right._destinationTable);
swap(left._isOuterJoin, right._isOuterJoin);
swap(left._sourceColumn, right._sourceColumn);
swap(left._sourceTable, right._sourceTable);
}
orm::sql::join_clause::join_clause() :
_isOuterJoin(false)
{
}
orm::sql::join_clause::join_clause(const orm::sql::join_clause &other) :
_isOuterJoin(other._isOuterJoin)
, _sourceTable(other._sourceTable)
, _sourceColumn(other._sourceColumn)
, _destinationTable(other._destinationTable)
, _destinationColumn(other._destinationColumn)
{
}
orm::sql::join_clause::join_clause(orm::sql::join_clause &&other) :
orm::sql::join_clause()
{
swap(*this, other);
}
orm::sql::join_clause::~join_clause()
{
}
orm::sql::join_clause &orm::sql::join_clause::operator =(orm::sql::join_clause other)
{
swap(*this, other);
return *this;
}
bool orm::sql::join_clause::operator ==(const orm::sql::join_clause &other) const
{
bool result = (this == &other);
if (this != &other)
{
result = (_sourceTable == other._sourceTable)
&& (_sourceColumn == other._sourceColumn)
&& (_destinationTable == other._destinationTable)
&& (_destinationColumn == other._destinationColumn);
}
return result;
}
bool orm::sql::join_clause::operator !=(const orm::sql::join_clause &other) const
{
bool result = !(*this == other);
return result;
}
void orm::sql::join_clause::SetIsOuterJoin(const bool isOuterJoin)
{
_isOuterJoin = isOuterJoin;
}
bool orm::sql::join_clause::IsOuterJoin() const
{
return _isOuterJoin;
}
void orm::sql::join_clause::SetSourceTable(const orm::sql::sql_table &sourceTable)
{
_sourceTable = sourceTable;
}
orm::sql::sql_table &orm::sql::join_clause::GetSourceTable()
{
return _sourceTable;
}
const orm::sql::sql_table &orm::sql::join_clause::GetSourceTable() const
{
return _sourceTable;
}
void orm::sql::join_clause::SetSourceColumn(const orm::sql::sql_column &sourceColumn)
{
_sourceColumn = sourceColumn;
}
orm::sql::sql_column &orm::sql::join_clause::GetSourceColumn()
{
return _sourceColumn;
}
const orm::sql::sql_column &orm::sql::join_clause::GetSourceColumn() const
{
return _sourceColumn;
}
void orm::sql::join_clause::SetDestinationTable(const orm::sql::sql_table &destinationTable)
{
_destinationTable = destinationTable;
}
orm::sql::sql_table &orm::sql::join_clause::GetDestinationTable()
{
return _destinationTable;
}
const orm::sql::sql_table &orm::sql::join_clause::GetDestinationTable() const
{
return _destinationTable;
}
void orm::sql::join_clause::SetDestinationColumn(const orm::sql::sql_column &destinationColumn)
{
_destinationColumn = destinationColumn;
}
orm::sql::sql_column &orm::sql::join_clause::GetDestinationColumn()
{
return _destinationColumn;
}
const orm::sql::sql_column &orm::sql::join_clause::GetDestinationColumn() const
{
return _destinationColumn;
}