Skip to content

Commit

Permalink
Implement versionAttribute
Browse files Browse the repository at this point in the history
Fixes DE-783.
  • Loading branch information
pluma4345 committed Mar 19, 2024
1 parent 54ca077 commit 987d9e0
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ This driver uses semantic versioning:
- A change in the major version (e.g. 1.Y.Z -> 2.0.0) indicates _breaking_
changes that require changes in your code to upgrade.

## [Unreleased]

### Added

- Added the `versionAttribute` option to the document operation options types (DE-783)

## [8.8.0]

### Changed
Expand Down Expand Up @@ -1788,6 +1794,7 @@ For a detailed list of changes between pre-release versions of v7 see the

Graph methods now only return the relevant part of the response body.

[unreleased]: https://github.com/arangodb/arangojs/compare/v8.8.0...HEAD
[8.8.0]: https://github.com/arangodb/arangojs/compare/v8.7.0...v8.8.0
[8.7.0]: https://github.com/arangodb/arangojs/compare/v8.6.0...v8.7.0
[8.6.0]: https://github.com/arangodb/arangojs/compare/v8.5.0...v8.6.0
Expand Down
21 changes: 21 additions & 0 deletions src/collection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,13 @@ export type CollectionInsertOptions = {
* Default: `false`
*/
refillIndexCaches?: boolean;
/**
* If set, the attribute with the name specified by the option is looked up
* in the stored document and the attribute value is compared numerically to
* the value of the versioning attribute in the supplied document that is
* supposed to update/replace it.
*/
versionAttribute?: string;
};

/**
Expand Down Expand Up @@ -796,6 +803,13 @@ export type CollectionReplaceOptions = {
* Default: `false`
*/
refillIndexCaches?: boolean;
/**
* If set, the attribute with the name specified by the option is looked up
* in the stored document and the attribute value is compared numerically to
* the value of the versioning attribute in the supplied document that is
* supposed to update/replace it.
*/
versionAttribute?: string;
};

/**
Expand Down Expand Up @@ -864,6 +878,13 @@ export type CollectionUpdateOptions = {
* Default: `false`
*/
refillIndexCaches?: boolean;
/**
* If set, the attribute with the name specified by the option is looked up
* in the stored document and the attribute value is compared numerically to
* the value of the versioning attribute in the supplied document that is
* supposed to update/replace it.
*/
versionAttribute?: string;
};

/**
Expand Down

0 comments on commit 987d9e0

Please sign in to comment.