forked from manhcuongbk56/cypher-go-dsl
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoperations.go
More file actions
47 lines (34 loc) · 1.27 KB
/
operations.go
File metadata and controls
47 lines (34 loc) · 1.27 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
package cypher
func OperationConcat(op1 Expression, op2 Expression) Operation {
return OperationCreate(op1, CONCAT, op2)
}
func OperationAdd(op1 Expression, op2 Expression) Operation {
return OperationCreate(op1, ADDITION, op2)
}
func OperationSubtract(op1 Expression, op2 Expression) Operation {
return OperationCreate(op1, SUBTRACTION, op2)
}
func OperationMultiply(op1 Expression, op2 Expression) Operation {
return OperationCreate(op1, MULTIPLICATION, op2)
}
func OperationDivide(op1 Expression, op2 Expression) Operation {
return OperationCreate(op1, DIVISION, op2)
}
func OperationRemainder(op1 Expression, op2 Expression) Operation {
return OperationCreate(op1, MODULO_DIVISION, op2)
}
func OperationPow(op1 Expression, op2 Expression) Operation {
return OperationCreate(op1, EXPONENTIATION, op2)
}
func OperationSet(target Expression, value Expression) Operation {
return OperationCreate(target, SET, value)
}
func OperationMutate(target Expression, value Expression) Operation {
return OperationCreate(target, MUTATE, value)
}
func OperationSetLabel(target Node, label ...string) Operation {
return OperationCreate2(target, SET_LABEL, label...)
}
func OperationRemove(target Node, label ...string) Operation {
return OperationCreate2(target, REMOVE_LABEL, label...)
}