Skip to content

Commit 34bb08f

Browse files
committed
[DE-563] Add index cache refilling options
1 parent a7165fe commit 34bb08f

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ This driver uses semantic versioning:
3939

4040
These attributes were added in ArangoDB 3.10.4.
4141

42+
- Added `refillIndexCaches` option to document operation options types
43+
44+
This option was added in ArangoDB 3.11.
45+
4246
- Added `x-arango-driver` header
4347

4448
The arangojs driver now correctly identifies itself to ArangoDB, allowing the

src/collection.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -707,6 +707,14 @@ export type CollectionInsertOptions = {
707707
* Default: `true`
708708
*/
709709
mergeObjects?: boolean;
710+
/**
711+
* If set to `true`, new entries will be added to in-memory index caches if
712+
* document insertions affect the edge index or cache-enabled persistent
713+
* indexes.
714+
*
715+
* Default: `false`
716+
*/
717+
refillIndexCaches?: boolean;
710718
};
711719

712720
/**
@@ -752,6 +760,14 @@ export type CollectionReplaceOptions = {
752760
* `_rev` matches the given revision.
753761
*/
754762
ifMatch?: string;
763+
/**
764+
* If set to `true`, existing entries in in-memory index caches will be
765+
* updated if document replacements affect the edge index or cache-enabled
766+
* persistent indexes.
767+
*
768+
* Default: `false`
769+
*/
770+
refillIndexCaches?: boolean;
755771
};
756772

757773
/**
@@ -812,6 +828,14 @@ export type CollectionUpdateOptions = {
812828
* `_rev` matches the given revision.
813829
*/
814830
ifMatch?: string;
831+
/**
832+
* If set to `true`, existing entries in in-memory index caches will be
833+
* updated if document updates affect the edge index or cache-enabled
834+
* persistent indexes.
835+
*
836+
* Default: `false`
837+
*/
838+
refillIndexCaches?: boolean;
815839
};
816840

817841
/**
@@ -843,6 +867,14 @@ export type CollectionRemoveOptions = {
843867
* `_rev` matches the given revision.
844868
*/
845869
ifMatch?: string;
870+
/**
871+
* If set to `true`, existing entries in in-memory index caches will be
872+
* deleted if document removals affect the edge index or cache-enabled
873+
* persistent indexes.
874+
*
875+
* Default: `false`
876+
*/
877+
refillIndexCaches?: boolean;
846878
};
847879

848880
/**

0 commit comments

Comments
 (0)