-
Notifications
You must be signed in to change notification settings - Fork 5
/
built_in_function.go
130 lines (102 loc) · 3.11 KB
/
built_in_function.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
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
package cypher
type Predicate struct {
implementationName string
}
func (p Predicate) getImplementationName() string {
return p.implementationName
}
func (p Predicate) isAggregate() bool {
return false
}
var ALL = Predicate{implementationName: "all"}
var ANY = Predicate{implementationName: "any"}
var EXISTS = Predicate{implementationName: "exists"}
var NONE = Predicate{implementationName: "none"}
var SINGLE = Predicate{implementationName: "single"}
type Scalars struct {
implementationName string
}
func (s Scalars) getImplementationName() string {
return s.implementationName
}
func (s Scalars) isAggregate() bool {
return false
}
var COALESCE = Scalars{implementationName: "coalesce"}
var END_NODE = Scalars{implementationName: "endNode"}
var HEAD = Scalars{implementationName: "head"}
var ID = Scalars{implementationName: "id"}
var LAST = Scalars{implementationName: "last"}
var PROPERTIES = Scalars{implementationName: "properties"}
var SHORTEST_PATH = Scalars{implementationName: "shortestPath"}
var SIZE = Scalars{implementationName: "size"}
var START_NODE = Scalars{implementationName: "startNode"}
var TYPE = Scalars{implementationName: "type"}
type Strings struct {
implementationName string
}
func (s Strings) getImplementationName() string {
return s.implementationName
}
func (s Strings) isAggregate() bool {
return false
}
var TO_LOWER = Strings{implementationName: "toLower"}
type Spatials struct {
implementationName string
}
func (s Spatials) getImplementationName() string {
return s.implementationName
}
func (s Spatials) isAggregate() bool {
return false
}
var POINT = Spatials{implementationName: "point"}
var DISTANCE = Spatials{implementationName: "distance"}
type Aggregates struct {
implementationName string
}
func (a Aggregates) getImplementationName() string {
return a.implementationName
}
func (a Aggregates) isAggregate() bool {
return true
}
var AVG = Aggregates{"avg"}
var COLLECT = Aggregates{"collect"}
var COUNT = Aggregates{"count"}
var MAX = Aggregates{"max"}
var MIN = Aggregates{"min"}
var PERCENTILE_CONT = Aggregates{"percentileCont"}
var PERCENTILE_DISC = Aggregates{"percentileDisc"}
var ST_DEV = Aggregates{"stDev"}
var ST_DEV_P = Aggregates{"stDevP"}
var SUM = Aggregates{"sum"}
type Lists struct {
implementationName string
}
func (l Lists) getImplementationName() string {
return l.implementationName
}
func (l Lists) isAggregate() bool {
return false
}
var LABELS = Lists{implementationName: "labels"}
var NODES = Lists{implementationName: "nodes"}
var RANGE = Lists{implementationName: "range"}
var RELATIONSHIPS = Lists{implementationName: "relationships"}
type Temporals struct {
implementationName string
}
func (t Temporals) getImplementationName() string {
return t.implementationName
}
func (t Temporals) isAggregate() bool {
return false
}
var DATE = Temporals{implementationName: "date"}
var DATETIME = Temporals{implementationName: "datetime"}
var LOCALDATETIME = Temporals{implementationName: "localdatetime"}
var LOCALTIME = Temporals{implementationName: "localtime"}
var TIME = Temporals{implementationName: "time"}
var DURATION = Temporals{implementationName: "duration"}