-
Notifications
You must be signed in to change notification settings - Fork 1
/
select_result.go
97 lines (70 loc) · 2.46 KB
/
select_result.go
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
package nqb
type SelectResult interface {
OrderByClause
Union() SelectClause
UnionAll() SelectClause
Intersect() SelectClause
IntersectAll() SelectClause
Except() SelectClause
ExceptAll() SelectClause
UnionClause(path SelectResult) SelectResult
UnionAllClause(path SelectResult) SelectResult
IntersectClause(path SelectResult) SelectResult
IntersectAllClause(path SelectResult) SelectResult
ExceptClause(path SelectResult) SelectResult
ExceptAllClause(path SelectResult) SelectResult
}
type defaultSelectResult struct {
*defaultOrderByClause
}
func newDefaultSelectResult(parent Statement) *defaultSelectResult {
return &defaultSelectResult{newDefaultOrderByClause(parent)}
}
func (c *defaultSelectResult) Union() SelectClause {
c.setElement(&unionElement{false, ""})
return newDefaultSelectClause(c)
}
func (c *defaultSelectResult) UnionAll() SelectClause {
c.setElement(&unionElement{true, ""})
return newDefaultSelectClause(c)
}
func (c *defaultSelectResult) Intersect() SelectClause {
c.setElement(&intersectElement{false, ""})
return newDefaultSelectClause(c)
}
func (c *defaultSelectResult) IntersectAll() SelectClause {
c.setElement(&intersectElement{true, ""})
return newDefaultSelectClause(c)
}
func (c *defaultSelectResult) Except() SelectClause {
c.setElement(&exceptElement{false, ""})
return newDefaultSelectClause(c)
}
func (c *defaultSelectResult) ExceptAll() SelectClause {
c.setElement(&exceptElement{true, ""})
return newDefaultSelectClause(c)
}
func (c *defaultSelectResult) UnionClause(path SelectResult) SelectResult {
c.setElement(&unionElement{false, path.String()})
return newDefaultSelectResult(c)
}
func (c *defaultSelectResult) UnionAllClause(path SelectResult) SelectResult {
c.setElement(&unionElement{true, path.String()})
return newDefaultSelectResult(c)
}
func (c *defaultSelectResult) IntersectClause(path SelectResult) SelectResult {
c.setElement(&intersectElement{false, path.String()})
return newDefaultSelectResult(c)
}
func (c *defaultSelectResult) IntersectAllClause(path SelectResult) SelectResult {
c.setElement(&intersectElement{true, path.String()})
return newDefaultSelectResult(c)
}
func (c *defaultSelectResult) ExceptClause(path SelectResult) SelectResult {
c.setElement(&exceptElement{false, path.String()})
return newDefaultSelectResult(c)
}
func (c *defaultSelectResult) ExceptAllClause(path SelectResult) SelectResult {
c.setElement(&exceptElement{true, path.String()})
return newDefaultSelectResult(c)
}