@@ -41,9 +41,10 @@ abstract class FunctionCall implements QueryConvertable
41
41
*
42
42
* @param string $functionName The name of the function to call
43
43
* @param AnyType[] $parameters The parameters to pass to the function call
44
- * @return FunctionCall
44
+ *
45
+ * @return RawFunction
45
46
*/
46
- public static function raw (string $ functionName , array $ parameters ): FunctionCall
47
+ public static function raw (string $ functionName , array $ parameters ): RawFunction
47
48
{
48
49
return new RawFunction ($ functionName , $ parameters );
49
50
}
@@ -56,9 +57,10 @@ public static function raw(string $functionName, array $parameters): FunctionCal
56
57
* @param Variable $variable A variable that can be used from within the predicate
57
58
* @param ListType $list A list
58
59
* @param AnyType $predicate A predicate that is tested against all items in the list
59
- * @return FunctionCall
60
+ *
61
+ * @return All
60
62
*/
61
- public static function all (Variable $ variable , ListType $ list , AnyType $ predicate ): FunctionCall
63
+ public static function all (Variable $ variable , ListType $ list , AnyType $ predicate ): All
62
64
{
63
65
return new All ($ variable , $ list , $ predicate );
64
66
}
@@ -72,9 +74,9 @@ public static function all(Variable $variable, ListType $list, AnyType $predicat
72
74
* @param ListType $list A list
73
75
* @param AnyType $predicate A predicate that is tested against all items in the list
74
76
*
75
- * @return FunctionCall
77
+ * @return Any
76
78
*/
77
- public static function any (Variable $ variable , ListType $ list , AnyType $ predicate ): FunctionCall
79
+ public static function any (Variable $ variable , ListType $ list , AnyType $ predicate ): Any
78
80
{
79
81
return new Any ($ variable , $ list , $ predicate );
80
82
}
@@ -85,9 +87,10 @@ public static function any(Variable $variable, ListType $list, AnyType $predicat
85
87
* exists(input :: ANY?) :: (BOOLEAN?)
86
88
*
87
89
* @param AnyType $expression A pattern or property
88
- * @return FunctionCall
90
+ *
91
+ * @return Exists
89
92
*/
90
- public static function exists (AnyType $ expression ): FunctionCall
93
+ public static function exists (AnyType $ expression ): Exists
91
94
{
92
95
return new Exists ($ expression );
93
96
}
@@ -100,9 +103,10 @@ public static function exists(AnyType $expression): FunctionCall
100
103
* isEmpty(input :: STRING?) :: (BOOLEAN?) - to check whether a string is empty
101
104
*
102
105
* @param ListType|MapType|StringType $list An expression that returns a list
103
- * @return FunctionCall
106
+ *
107
+ * @return IsEmpty
104
108
*/
105
- public static function isEmpty (AnyType $ list ): FunctionCall
109
+ public static function isEmpty (AnyType $ list ): IsEmpty
106
110
{
107
111
return new IsEmpty ($ list );
108
112
}
@@ -116,9 +120,9 @@ public static function isEmpty(AnyType $list): FunctionCall
116
120
* @param ListType $list A list
117
121
* @param AnyType $predicate A predicate that is tested against all items in the list
118
122
*
119
- * @return FunctionCall
123
+ * @return None
120
124
*/
121
- public static function none (Variable $ variable , ListType $ list , AnyType $ predicate ): FunctionCall
125
+ public static function none (Variable $ variable , ListType $ list , AnyType $ predicate ): None
122
126
{
123
127
return new None ($ variable , $ list , $ predicate );
124
128
}
@@ -132,13 +136,103 @@ public static function none(Variable $variable, ListType $list, AnyType $predica
132
136
* @param ListType $list A list
133
137
* @param AnyType $predicate A predicate that is tested against all items in the list
134
138
*
135
- * @return FunctionCall
139
+ * @return Single
136
140
*/
137
- public static function single (Variable $ variable , ListType $ list , AnyType $ predicate ): FunctionCall
141
+ public static function single (Variable $ variable , ListType $ list , AnyType $ predicate ): Single
138
142
{
139
143
return new Single ($ variable , $ list , $ predicate );
140
144
}
141
145
146
+ /**
147
+ * Calls the "point()" function. The signature of the "point()" function is:
148
+ *
149
+ * point(input :: MAP?) :: (POINT?)
150
+ *
151
+ * @param MapType $map The map to use for constructing the point
152
+ * @note You probably want to use the Literal class instead of this function
153
+ *
154
+ * @return Point
155
+ */
156
+ public static function point (MapType $ map ): Point
157
+ {
158
+ return new Point ($ map );
159
+ }
160
+
161
+ /**
162
+ * Calls the "date()" function. The signature of the "date()" function is:
163
+ *
164
+ * date(input = DEFAULT_TEMPORAL_ARGUMENT :: ANY?) :: (DATE?)
165
+ *
166
+ * @param AnyType|null $value The input to the date function, from which to construct the date
167
+ * @note You probably want to use the Literal class instead of this function
168
+ *
169
+ * @return Date
170
+ */
171
+ public static function date (?AnyType $ value = null ): Date
172
+ {
173
+ return new Date ($ value );
174
+ }
175
+
176
+ /**
177
+ * Calls the "datetime()" function. The signature of the "datetime()" function is:
178
+ *
179
+ * datetime(input = DEFAULT_TEMPORAL_ARGUMENT :: ANY?) :: (DATETIME?)
180
+ *
181
+ * @param AnyType|null $value The input to the datetime function, from which to construct the datetime
182
+ * @note You probably want to use the Literal class instead of this function
183
+ *
184
+ * @return DateTime
185
+ */
186
+ public static function datetime (?AnyType $ value = null ): DateTime
187
+ {
188
+ return new DateTime ($ value );
189
+ }
190
+
191
+ /**
192
+ * Calls the "localdatetime()" function. The signature of the "localdatetime()" function is:
193
+ *
194
+ * datetime(input = DEFAULT_TEMPORAL_ARGUMENT :: ANY?) :: (LOCALDATETIME?)
195
+ *
196
+ * @param AnyType|null $value The input to the localdatetime function, from which to construct the localdatetime
197
+ * @note You probably want to use the Literal class instead of this function
198
+ *
199
+ * @return LocalDateTime
200
+ */
201
+ public static function localdatetime (?AnyType $ value = null ): LocalDateTime
202
+ {
203
+ return new LocalDateTime ($ value );
204
+ }
205
+
206
+ /**
207
+ * Calls the "localtime()" function. The signature of the "localtime()" function is:
208
+ *
209
+ * localtime(input = DEFAULT_TEMPORAL_ARGUMENT :: ANY?) :: (LOCALTIME?)
210
+ *
211
+ * @param AnyType|null $value The input to the localtime function, from which to construct the localtime
212
+ * @note You probably want to use the Literal class instead of this function
213
+ *
214
+ * @return LocalTime
215
+ */
216
+ public static function localtime (?AnyType $ value = null ): LocalTime
217
+ {
218
+ return new LocalTime ($ value );
219
+ }
220
+
221
+ /**
222
+ * Calls the "time()" function. The signature of the "time()" function is:
223
+ *
224
+ * time(input = DEFAULT_TEMPORAL_ARGUMENT :: ANY?) :: (TIME?)
225
+ *
226
+ * @param AnyType|null $value The input to the localtime function, from which to construct the time
227
+ * @note You probably want to use the Literal class instead of this function
228
+ *
229
+ * @return Time
230
+ */
231
+ public static function time (?AnyType $ value = null ): Time
232
+ {
233
+ return new Time ($ value );
234
+ }
235
+
142
236
/**
143
237
* @inheritDoc
144
238
*/
0 commit comments