-
Notifications
You must be signed in to change notification settings - Fork 0
/
branch.go
71 lines (63 loc) · 1.34 KB
/
branch.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
package liqu
type (
branch struct {
liqu *Liqu
root *branch
parent *branch
isCTE bool
slice bool
anonymous bool
as string
name string
where *ConditionBuilder
isSearched bool
order *OrderBuilder
groupBy *GroupByBuilder
source Source
limit *int
offset *int
registry *registry
branches []*branch
relations []branchRelation
selectedFields []string
aggregateFields []aggregateField
distinctFields map[string]bool
referencedFields map[string]bool
subQuery map[string]*SubQuery
joinDirection string
joinFields []branchJoinField
joinBranched []string
}
branchJoinField struct {
table string
field string
as string
cte bool
slice bool
}
aggregateField struct {
Func Aggregator
Field string
Alias string
}
branchRelation struct {
localField string
operator string
externalTable string
externalField string
parent bool
}
linkedCte struct {
op Operator
cte *Cte
field string
cteField string
trigger linkTrigger
}
joinOperator string
)
const (
leftJoin joinOperator = "LEFT"
InnerJoin = "INNER"
fullJoin = "FULL"
)