mirror of
https://github.com/appwrite/appwrite.git
synced 2026-11-18 20:36:03 +00:00
Merge pull request #27 from utopia-php/feat-aggregate-options
Add options params on aggregate function
This commit is contained in:
1 file changed
+4
-3
+4
-3
@@ -756,17 +756,18 @@ class Client
|
||||
*
|
||||
* @param string $collection
|
||||
* @param array $pipeline
|
||||
* @param array $options
|
||||
*
|
||||
* @return stdClass
|
||||
* @throws Exception
|
||||
*/
|
||||
public function aggregate(string $collection, array $pipeline): stdClass
|
||||
public function aggregate(string $collection, array $pipeline, array $options = []): stdClass
|
||||
{
|
||||
return $this->query([
|
||||
return $this->query(array_merge([
|
||||
self::COMMAND_AGGREGATE => $collection,
|
||||
'pipeline' => $pipeline,
|
||||
'cursor' => $this->toObject([]),
|
||||
]);
|
||||
], $options));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user