Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
8e7972d933 | ||
e7da9978d0 |
0
.gitignore
vendored
Normal file → Executable file
0
.gitignore
vendored
Normal file → Executable file
2
composer.json
Normal file → Executable file
2
composer.json
Normal file → Executable file
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mirzaev/arangodb",
|
||||
"description": "Реализация управления хранилищем данных ArangoDB",
|
||||
"description": "Simple PHP-framework for ArangoDB",
|
||||
"readme": "README.md",
|
||||
"keywords": [
|
||||
"ArangoDB"
|
||||
|
0
composer.lock
generated
Normal file → Executable file
0
composer.lock
generated
Normal file → Executable file
6
mirzaev/arangodb/system/collection.php
Normal file → Executable file
6
mirzaev/arangodb/system/collection.php
Normal file → Executable file
@@ -69,9 +69,9 @@ class collection
|
||||
* @param _connection $session Сессия соединения с базой данных
|
||||
* @param string $query AQL-запрос
|
||||
*
|
||||
* @return _document|null Инстанция документа
|
||||
* @return _document|array|string|int|null Инстанция документа
|
||||
*/
|
||||
public static function search(_connection $session, string $query): ?_document
|
||||
public static function search(_connection $session, string $query): _document|string|array|int|null
|
||||
{
|
||||
// Поиск журнала
|
||||
$journal = (new _statement(
|
||||
@@ -90,7 +90,7 @@ class collection
|
||||
$buffer[$key] = $value;
|
||||
}
|
||||
|
||||
return $buffer[0] ?? null;
|
||||
return is_array($buffer) && count($buffer) > 1 ? $buffer : $buffer[0] ?? null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
0
mirzaev/arangodb/system/connection.php
Normal file → Executable file
0
mirzaev/arangodb/system/connection.php
Normal file → Executable file
0
mirzaev/arangodb/system/document.php
Normal file → Executable file
0
mirzaev/arangodb/system/document.php
Normal file → Executable file
0
mirzaev/arangodb/system/terminal.php
Normal file → Executable file
0
mirzaev/arangodb/system/terminal.php
Normal file → Executable file
Reference in New Issue
Block a user