Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
11be80b0ad | ||
![]() |
48a8908afd | ||
![]() |
8f5f5b44de | ||
![]() |
8e7972d933 | ||
e7da9978d0 | |||
4daa93799e |
2
.gitignore
vendored
Normal file → Executable file
2
.gitignore
vendored
Normal file → Executable file
@@ -1 +1,3 @@
|
|||||||
vendor
|
vendor
|
||||||
|
composer.lock
|
||||||
|
!.gitignore
|
||||||
|
11
LICENSE
Normal file
11
LICENSE
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
||||||
|
Version 2, December 2004
|
||||||
|
|
||||||
|
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
|
||||||
|
|
||||||
|
Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed.
|
||||||
|
|
||||||
|
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
||||||
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
|
0. You just DO WHAT THE FUCK YOU WANT TO.
|
3
README.md
Normal file
3
README.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# PHP 8.2 Framework for working with ArangoDB
|
||||||
|
|
||||||
|
🤟 Very simple and flexible, easy to scale and integrate
|
16
composer.json
Normal file → Executable file
16
composer.json
Normal file → Executable file
@@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "mirzaev/arangodb",
|
"name": "mirzaev/arangodb",
|
||||||
"description": "Реализация управления хранилищем данных ArangoDB",
|
"description": "Simple PHP-framework for ArangoDB",
|
||||||
|
"readme": "README.md",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"ArangoDB"
|
"ArangoDB"
|
||||||
],
|
],
|
||||||
@@ -15,8 +16,19 @@
|
|||||||
"role": "Developer"
|
"role": "Developer"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"support": {
|
||||||
|
"email": "arsen@mirzaev.sexy",
|
||||||
|
"wiki": "https://git.mirzaev.sexy/mirzaev/arangodb/manual",
|
||||||
|
"issues": "https://git.mirzaev.sexy/mirzaev/arangodb/issues"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"type": "funding",
|
||||||
|
"url": "https://fund.mirzaev.sexy"
|
||||||
|
}
|
||||||
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^8.1",
|
"php": "^8.2",
|
||||||
"triagens/arangodb": "~3.8"
|
"triagens/arangodb": "~3.8"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
|
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 _connection $session Сессия соединения с базой данных
|
||||||
* @param string $query AQL-запрос
|
* @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(
|
$journal = (new _statement(
|
||||||
@@ -90,7 +90,7 @@ class collection
|
|||||||
$buffer[$key] = $value;
|
$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