File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,10 @@ This driver uses semantic versioning:
2222
2323## Added
2424
25+ - Added ` returnOld ` and ` mergeObjects ` to ` CollectionInsertOptions ` type
26+
27+ These options are only available when using ` overwriteMode ` .
28+
2529- Added caching options to ` InvertedIndex ` and ` ArangoSearchView ` types
2630
2731 These options were added in ArangoDB 3.10.2.
Original file line number Diff line number Diff line change @@ -683,13 +683,30 @@ export type CollectionInsertOptions = {
683683 * Default: `false`
684684 */
685685 returnNew ?: boolean ;
686+ /**
687+ * If set to `true`, the complete old document will be returned as the `old`
688+ * property on the result object. Has no effect if `silent` is set to `true`.
689+ * This option is only available when `overwriteMode` is set to `"update"` or
690+ * `"replace"`.
691+ *
692+ * Default: `false`
693+ */
694+ returnOld ?: boolean ;
686695 /**
687696 * Defines what should happen if a document with the same `_key` or `_id`
688697 * already exists, instead of throwing an exception.
689698 *
690699 * Default: `"conflict"
691700 */
692701 overwriteMode ?: "ignore" | "update" | "replace" | "conflict" ;
702+ /**
703+ * If set to `false`, object properties that already exist in the old
704+ * document will be overwritten rather than merged when an existing document
705+ * with the same `_key` or `_id` is updated. This does not affect arrays.
706+ *
707+ * Default: `true`
708+ */
709+ mergeObjects ?: boolean ;
693710} ;
694711
695712/**
You can’t perform that action at this time.
0 commit comments