5 Commits
1.2.0 ... 1.3.0

Author SHA1 Message Date
d0ce9e47af удалили компосер лок 2023-12-21 23:26:50 +07:00
b2088df8fb забыл что сделал 2023-12-21 23:20:32 +07:00
cb1388722c added to .gitignore 2023-07-10 06:47:42 +07:00
root
11be80b0ad remove composer.lock 2023-07-09 16:45:49 +00:00
root
48a8908afd PHP 8.2 2023-07-09 16:42:01 +00:00
5 changed files with 163 additions and 2246 deletions

2
.gitignore vendored
View File

@@ -1 +1,3 @@
vendor
composer.lock
!.gitignore

View File

@@ -28,7 +28,7 @@
}
],
"require": {
"php": "^8.1",
"php": "^8.2",
"triagens/arangodb": "~3.8"
},
"require-dev": {

2098
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -68,25 +68,32 @@ class collection
*
* @param _connection $session Сессия соединения с базой данных
* @param string $query AQL-запрос
* @param array $binds Binds for query [bind => value]
*
* @return _document|array|string|int|null Инстанция документа
*/
public static function search(_connection $session, string $query): _document|string|array|int|null
public static function search(_connection $session, string $query, array $binds = []): _document|string|array|int|null
{
// Поиск журнала
$journal = (new _statement(
// Statement instance initialization
$instance = new _statement(
$session,
[
'query' => $query,
"batchSize" => 1000,
"sanitize" => true
]
))->execute();
);
// Binds application
$instance->bind($binds);
// Sending the request
$response = $instance->execute();
// Инициализация буфера вывода
$buffer = [];
foreach ($journal as $key => $value) {
foreach ($response->getAll() as $key => $value) {
$buffer[$key] = $value;
}

View File

@@ -61,7 +61,10 @@ class document
$document = new _document();
}
foreach (['created' => time()] + $data as $key => $value) {
// Инициализация даты создания
$created = time();
foreach (['created' => $created, 'updated' => $created] + $data as $key => $value) {
// Перебор параметров
// Запись в инстанцию документа
@@ -102,6 +105,9 @@ class document
// Инициализация обработчика вершин
$documents = new _document_handler($session);
// Запись даты обновления в инстанцию документа
$document->set('updated', time());
// Запись в базу данных
return $documents->update($document);
}