From 453cac0b77ec9b80fe12b468ce9388702d088c4d Mon Sep 17 00:00:00 2001 From: Arsen Mirzaev Tatyano-Muradovich Date: Thu, 13 Feb 2025 08:52:44 +0300 Subject: [PATCH] resolved #1 --- mirzaev/arangodb/system/collection.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/mirzaev/arangodb/system/collection.php b/mirzaev/arangodb/system/collection.php index 0c033fe..0a529f4 100755 --- a/mirzaev/arangodb/system/collection.php +++ b/mirzaev/arangodb/system/collection.php @@ -12,7 +12,8 @@ use mirzaev\arangodb\connection, // Library for ArangoDB use ArangoDBClient\Statement as _statement, ArangoDBClient\Document as _document, - ArangoDBClient\CollectionHandler as _collection_handler; + ArangoDBClient\CollectionHandler as _collection_handler, + ArangoDBClient\Cursor as cursor; // Built-in libraries use exception; @@ -85,11 +86,12 @@ class collection * * @param string $query Query (AQL) * @param array $parameters Binded parameters for placeholders [placholder => parameter] + * @param bool $flat Not implement record? * @param array &$errors Registry of errors * * @return _document|array|string|int|null Instance of the document */ - public static function execute(string $query, array $parameters = [], array &$errors = []): _document|string|array|int|null + public static function execute(string $query, array $parameters = [], bool $flat = false, array &$errors = []): _document|string|array|int|null { try { // Statement instance initialization @@ -97,8 +99,9 @@ class collection connection::$session, [ 'query' => $query, - "batchSize" => 1000, - "sanitize" => true + 'batchSize' => 1000, + 'sanitize' => true, + cursor::ENTRY_FLAT => $flat ] );