You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thrownewClientException('Got an invalid response from the server');
429
403
}
@@ -433,10 +407,111 @@ public function insert($collection, $document, array $options = [])
433
407
return$document->getId();
434
408
}
435
409
410
+
411
+
/**
412
+
* insert multiple document into a collection
413
+
*
414
+
* This will add the documents to the collection and return the documents' metadata
415
+
*
416
+
* This will throw if the documents cannot be saved
417
+
*
418
+
* @throws Exception
419
+
*
420
+
* @param mixed $collection - collection id as string or number
421
+
* @param array $documents - the documents to be added, always an array
422
+
* @param array $options - optional, array of options
423
+
* <p>Options are :<br>
424
+
* <li>'createCollection' - create the collection if it does not yet exist.</li>
425
+
* <li>'waitForSync' - if set to true, then all removal operations will instantly be synchronised to disk / If this is not specified, then the collection's default sync behavior will be applied.</li>
426
+
* <li>'keepNull' - can be used to instruct ArangoDB to delete existing attributes on update instead setting their values to null. Defaults to true (keep attributes when set to null). only useful with overwriteMode = update</li>
427
+
* <li>'mergeObjects' - if true, updates to object attributes will merge the previous and the new objects. if false, replaces the object attribute with the new value. only useful with overwriteMode = update</li>
428
+
* <li>'overwriteMode' - determines overwrite behavior in case a document with the same _key already exists. possible values: 'ignore', 'update', 'replace', 'conflict'.</li>
429
+
* <li>'overwrite' - deprecated: if set to true, will turn the insert into a replace operation if a document with the specified key already exists.</li>
430
+
* <li>'returnNew' - if set to true, then the newly created document will be returned.</li>
431
+
* <li>'returnOld' - if set to true, then the updated/replaced document will be returned - useful only when using overwriteMode = insert/update.</li>
432
+
* <li>'silent' - whether or not to return information about the created document (e.g. _key and _rev).</li>
433
+
* </p>
434
+
*
435
+
* @return array - array of document metadata (one entry per document)
0 commit comments