Compare commits
No commits in common. "stable" and "2.0.1" have entirely different histories.
|
@ -12,8 +12,7 @@ use mirzaev\arangodb\connection,
|
|||
// Library for ArangoDB
|
||||
use ArangoDBClient\Statement as _statement,
|
||||
ArangoDBClient\Document as _document,
|
||||
ArangoDBClient\CollectionHandler as _collection_handler,
|
||||
ArangoDBClient\Cursor as cursor;
|
||||
ArangoDBClient\CollectionHandler as _collection_handler;
|
||||
|
||||
// Built-in libraries
|
||||
use exception;
|
||||
|
@ -86,12 +85,11 @@ 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 = [], bool $flat = false, array &$errors = []): _document|string|array|int|null
|
||||
public static function execute(string $query, array $parameters = [], array &$errors = []): _document|string|array|int|null
|
||||
{
|
||||
try {
|
||||
// Statement instance initialization
|
||||
|
@ -99,9 +97,8 @@ class collection
|
|||
connection::$session,
|
||||
[
|
||||
'query' => $query,
|
||||
'batchSize' => 1000,
|
||||
'sanitize' => true,
|
||||
cursor::ENTRY_FLAT => $flat
|
||||
"batchSize" => 1000,
|
||||
"sanitize" => true
|
||||
]
|
||||
);
|
||||
|
||||
|
@ -182,10 +179,10 @@ class collection
|
|||
// Count and exit (success)
|
||||
return static::execute(
|
||||
<<<'AQL'
|
||||
RETURN LENGTH(@@collection)
|
||||
RETURN LENGTH(@collection)
|
||||
AQL,
|
||||
[
|
||||
'@collection' => $collection
|
||||
'collection' => $collection
|
||||
]
|
||||
);
|
||||
} catch (exception $e) {
|
||||
|
|
|
@ -51,7 +51,7 @@ class document
|
|||
bool $check = false,
|
||||
?terminal $terminal = null,
|
||||
array &$errors = []
|
||||
): string|null|false {
|
||||
): ?string {
|
||||
try {
|
||||
// Инициализация коллекции
|
||||
collection::initialize($collection, isset($data['_from'], $data['_to']) ? type::edge : type::document);
|
||||
|
|
Loading…
Reference in New Issue