File tree Expand file tree Collapse file tree 14 files changed +211
-1
lines changed Expand file tree Collapse file tree 14 files changed +211
-1
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,36 @@ public function setProcedure(string $procedure): self
64
64
return $ this ;
65
65
}
66
66
67
+ /**
68
+ * Returns the variables to yield.
69
+ *
70
+ * @return Variable[]
71
+ */
72
+ public function getYieldVariables (): array
73
+ {
74
+ return $ this ->yieldVariables ;
75
+ }
76
+
77
+ /**
78
+ * Returns the procedure to call.
79
+ *
80
+ * @return string|null
81
+ */
82
+ public function getProcedure (): ?string
83
+ {
84
+ return $ this ->procedure ;
85
+ }
86
+
87
+ /**
88
+ * Returns the arguments of the procedure.
89
+ *
90
+ * @return AnyType[]
91
+ */
92
+ public function getArguments (): array
93
+ {
94
+ return $ this ->arguments ;
95
+ }
96
+
67
97
/**
68
98
* Sets the arguments to pass to this procedure call. This overwrites any previously passed
69
99
* arguments.
Original file line number Diff line number Diff line change @@ -48,6 +48,16 @@ public function addPattern(StructuralType $pattern): self
48
48
return $ this ;
49
49
}
50
50
51
+ /**
52
+ * Returns the patterns of the create clause.
53
+ *
54
+ * @return StructuralType[]
55
+ */
56
+ public function getPatterns (): array
57
+ {
58
+ return $ this ->patterns ;
59
+ }
60
+
51
61
/**
52
62
* @inheritDoc
53
63
*/
Original file line number Diff line number Diff line change @@ -72,6 +72,26 @@ public function addNode(NodeType $node): self
72
72
return $ this ;
73
73
}
74
74
75
+ /**
76
+ * Returns whether the deletion detaches the relationships.
77
+ *
78
+ * @return bool
79
+ */
80
+ public function detachesDeletion (): bool
81
+ {
82
+ return $ this ->detach ;
83
+ }
84
+
85
+ /**
86
+ * Returns the nodes to delete.
87
+ *
88
+ * @return AnyType[]
89
+ */
90
+ public function getNodes (): array
91
+ {
92
+ return $ this ->nodes ;
93
+ }
94
+
75
95
/**
76
96
* @inheritDoc
77
97
*/
Original file line number Diff line number Diff line change @@ -37,6 +37,16 @@ class LimitClause extends Clause
37
37
*/
38
38
private ?NumeralType $ limit ;
39
39
40
+ /**
41
+ * Returns the actual limit of the clause.
42
+ *
43
+ * @return NumeralType|null
44
+ */
45
+ public function getLimit (): ?NumeralType
46
+ {
47
+ return $ this ->limit ;
48
+ }
49
+
40
50
/**
41
51
* Sets the expression that returns the limit.
42
52
*
Original file line number Diff line number Diff line change @@ -35,6 +35,16 @@ class MatchClause extends Clause
35
35
*/
36
36
private array $ patterns = [];
37
37
38
+ /**
39
+ * Returns the patterns to match.
40
+ *
41
+ * @return StructuralType[]
42
+ */
43
+ public function getPatterns (): array
44
+ {
45
+ return $ this ->patterns ;
46
+ }
47
+
38
48
/**
39
49
* Add a pattern to the match clause.
40
50
*
Original file line number Diff line number Diff line change @@ -45,6 +45,36 @@ class MergeClause extends Clause
45
45
*/
46
46
private ?Clause $ matchClause ;
47
47
48
+ /**
49
+ * Returns the clause to execute when the pattern is matched.
50
+ *
51
+ * @return Clause|null
52
+ */
53
+ public function getOnCreateClause (): ?Clause
54
+ {
55
+ return $ this ->createClause ;
56
+ }
57
+
58
+ /**
59
+ * Returns the clause to execute when the pattern is matched.
60
+ *
61
+ * @return Clause|null
62
+ */
63
+ public function getOnMatchClause (): ?Clause
64
+ {
65
+ return $ this ->matchClause ;
66
+ }
67
+
68
+ /**
69
+ * Returns the pattern to MERGE.
70
+ *
71
+ * @return StructuralType|null
72
+ */
73
+ public function getPattern (): ?StructuralType
74
+ {
75
+ return $ this ->pattern ;
76
+ }
77
+
48
78
/**
49
79
* Sets the pattern to merge.
50
80
*
Original file line number Diff line number Diff line change @@ -35,6 +35,16 @@ class OptionalMatchClause extends Clause
35
35
*/
36
36
private array $ patterns = [];
37
37
38
+ /**
39
+ * Returns the patterns to optionally match.
40
+ *
41
+ * @return StructuralType[]
42
+ */
43
+ public function getPatterns (): array
44
+ {
45
+ return $ this ->patterns ;
46
+ }
47
+
38
48
/**
39
49
* Add a pattern to the optional match clause.
40
50
*
Original file line number Diff line number Diff line change @@ -57,6 +57,26 @@ public function addProperty(Property $property): self
57
57
return $ this ;
58
58
}
59
59
60
+ /**
61
+ * Returns the properties to order.
62
+ *
63
+ * @return Property[]
64
+ */
65
+ public function getProperties (): array
66
+ {
67
+ return $ this ->properties ;
68
+ }
69
+
70
+ /**
71
+ * Returns whether the ordering is in descending order.
72
+ *
73
+ * @return bool
74
+ */
75
+ public function isDescending (): bool
76
+ {
77
+ return $ this ->descending ;
78
+ }
79
+
60
80
/**
61
81
* Set to sort in a DESCENDING order.
62
82
*
Original file line number Diff line number Diff line change @@ -38,6 +38,16 @@ class RemoveClause extends Clause
38
38
*/
39
39
private array $ expressions = [];
40
40
41
+ /**
42
+ * Returns the expressions in the REMOVE clause.
43
+ *
44
+ * @return Label[]|Property[]
45
+ */
46
+ public function getExpressions (): array
47
+ {
48
+ return $ this ->expressions ;
49
+ }
50
+
41
51
/**
42
52
* Add an expression to the REMOVE clause. This expression usually returns a property (a.b) or a label (a:b).
43
53
*
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ class ReturnClause extends Clause
39
39
private bool $ distinct = false ;
40
40
41
41
/**
42
- * @var array The expressions to return
42
+ * @var AnyType[] The expressions to return
43
43
*/
44
44
private array $ columns = [];
45
45
@@ -57,6 +57,26 @@ public function setDistinct(bool $distinct = true): self
57
57
return $ this ;
58
58
}
59
59
60
+ /**
61
+ * Returns the columns to return. Aliased columns have string keys instead of integers.
62
+ *
63
+ * @return AnyType[]
64
+ */
65
+ public function getColumns (): array
66
+ {
67
+ return $ this ->columns ;
68
+ }
69
+
70
+ /**
71
+ * Returns whether the returned results are distinct.
72
+ *
73
+ * @return bool
74
+ */
75
+ public function isDistinct (): bool
76
+ {
77
+ return $ this ->distinct ;
78
+ }
79
+
60
80
/**
61
81
* Add a new column to this RETURN clause.
62
82
*
You can’t perform that action at this time.
0 commit comments