@@ -1758,6 +1758,7 @@ def insert_many(
1758
1758
keep_none : Optional [bool ] = None ,
1759
1759
merge : Optional [bool ] = None ,
1760
1760
refill_index_caches : Optional [bool ] = None ,
1761
+ version_attribute : Optional [str ] = None ,
1761
1762
) -> Result [Union [bool , List [Union [Json , ArangoServerError ]]]]:
1762
1763
"""Insert multiple documents.
1763
1764
@@ -1812,6 +1813,9 @@ def insert_many(
1812
1813
index caches if document insertions affect the edge index or
1813
1814
cache-enabled persistent indexes.
1814
1815
:type refill_index_caches: bool | None
1816
+ param version_attribute: support for simple external versioning to
1817
+ document operations.
1818
+ :type version_attribute: str
1815
1819
:return: List of document metadata (e.g. document keys, revisions) and
1816
1820
any exception, or True if parameter **silent** was set to True.
1817
1821
:rtype: [dict | ArangoServerError] | bool
@@ -1834,6 +1838,8 @@ def insert_many(
1834
1838
params ["keepNull" ] = keep_none
1835
1839
if merge is not None :
1836
1840
params ["mergeObjects" ] = merge
1841
+ if version_attribute is not None :
1842
+ params ["versionAttribute" ] = version_attribute
1837
1843
1838
1844
# New in ArangoDB 3.9.6 and 3.10.2
1839
1845
if refill_index_caches is not None :
@@ -1880,6 +1886,7 @@ def update_many(
1880
1886
silent : bool = False ,
1881
1887
refill_index_caches : Optional [bool ] = None ,
1882
1888
raise_on_document_error : bool = False ,
1889
+ version_attribute : Optional [str ] = None ,
1883
1890
) -> Result [Union [bool , List [Union [Json , ArangoServerError ]]]]:
1884
1891
"""Update multiple documents.
1885
1892
@@ -1932,6 +1939,9 @@ def update_many(
1932
1939
as opposed to returning the error as an object in the result list.
1933
1940
Defaults to False.
1934
1941
:type raise_on_document_error: bool
1942
+ param version_attribute: support for simple external versioning to
1943
+ document operations.
1944
+ :type version_attribute: str
1935
1945
:return: List of document metadata (e.g. document keys, revisions) and
1936
1946
any exceptions, or True if parameter **silent** was set to True.
1937
1947
:rtype: [dict | ArangoError] | bool
@@ -1948,6 +1958,8 @@ def update_many(
1948
1958
}
1949
1959
if sync is not None :
1950
1960
params ["waitForSync" ] = sync
1961
+ if version_attribute is not None :
1962
+ params ["versionAttribute" ] = version_attribute
1951
1963
1952
1964
# New in ArangoDB 3.9.6 and 3.10.2
1953
1965
if refill_index_caches is not None :
@@ -2084,6 +2096,7 @@ def replace_many(
2084
2096
sync : Optional [bool ] = None ,
2085
2097
silent : bool = False ,
2086
2098
refill_index_caches : Optional [bool ] = None ,
2099
+ version_attribute : Optional [str ] = None ,
2087
2100
) -> Result [Union [bool , List [Union [Json , ArangoServerError ]]]]:
2088
2101
"""Replace multiple documents.
2089
2102
@@ -2125,6 +2138,9 @@ def replace_many(
2125
2138
index caches if document operations affect the edge index or
2126
2139
cache-enabled persistent indexes.
2127
2140
:type refill_index_caches: bool | None
2141
+ param version_attribute: support for simple external versioning to
2142
+ document operations.
2143
+ :type version_attribute: str
2128
2144
:return: List of document metadata (e.g. document keys, revisions) and
2129
2145
any exceptions, or True if parameter **silent** was set to True.
2130
2146
:rtype: [dict | ArangoServerError] | bool
@@ -2139,6 +2155,8 @@ def replace_many(
2139
2155
}
2140
2156
if sync is not None :
2141
2157
params ["waitForSync" ] = sync
2158
+ if version_attribute is not None :
2159
+ params ["versionAttribute" ] = version_attribute
2142
2160
2143
2161
# New in ArangoDB 3.9.6 and 3.10.2
2144
2162
if refill_index_caches is not None :
@@ -2613,6 +2631,7 @@ def insert(
2613
2631
keep_none : Optional [bool ] = None ,
2614
2632
merge : Optional [bool ] = None ,
2615
2633
refill_index_caches : Optional [bool ] = None ,
2634
+ version_attribute : Optional [str ] = None ,
2616
2635
) -> Result [Union [bool , Json ]]:
2617
2636
"""Insert a new document.
2618
2637
@@ -2651,6 +2670,9 @@ def insert(
2651
2670
index caches if document insertions affect the edge index or
2652
2671
cache-enabled persistent indexes.
2653
2672
:type refill_index_caches: bool | None
2673
+ param version_attribute: support for simple external versioning to
2674
+ document operations.
2675
+ :type version_attribute: str
2654
2676
:return: Document metadata (e.g. document key, revision) or True if
2655
2677
parameter **silent** was set to True.
2656
2678
:rtype: bool | dict
@@ -2672,6 +2694,8 @@ def insert(
2672
2694
params ["keepNull" ] = keep_none
2673
2695
if merge is not None :
2674
2696
params ["mergeObjects" ] = merge
2697
+ if version_attribute is not None :
2698
+ params ["versionAttribute" ] = version_attribute
2675
2699
2676
2700
# New in ArangoDB 3.9.6 and 3.10.2
2677
2701
if refill_index_caches is not None :
@@ -2710,6 +2734,7 @@ def update(
2710
2734
sync : Optional [bool ] = None ,
2711
2735
silent : bool = False ,
2712
2736
refill_index_caches : Optional [bool ] = None ,
2737
+ version_attribute : Optional [str ] = None ,
2713
2738
) -> Result [Union [bool , Json ]]:
2714
2739
"""Update a document.
2715
2740
@@ -2740,6 +2765,9 @@ def update(
2740
2765
index caches if document insertions affect the edge index or
2741
2766
cache-enabled persistent indexes.
2742
2767
:type refill_index_caches: bool | None
2768
+ param version_attribute: support for simple external versioning
2769
+ to document operations.
2770
+ :type version_attribute: str
2743
2771
:return: Document metadata (e.g. document key, revision) or True if
2744
2772
parameter **silent** was set to True.
2745
2773
:rtype: bool | dict
@@ -2758,6 +2786,9 @@ def update(
2758
2786
if sync is not None :
2759
2787
params ["waitForSync" ] = sync
2760
2788
2789
+ if version_attribute is not None :
2790
+ params ["versionAttribute" ] = version_attribute
2791
+
2761
2792
# New in ArangoDB 3.9.6 and 3.10.2
2762
2793
if refill_index_caches is not None :
2763
2794
params ["refillIndexCaches" ] = refill_index_caches
@@ -2793,6 +2824,7 @@ def replace(
2793
2824
sync : Optional [bool ] = None ,
2794
2825
silent : bool = False ,
2795
2826
refill_index_caches : Optional [bool ] = None ,
2827
+ version_attribute : Optional [str ] = None ,
2796
2828
) -> Result [Union [bool , Json ]]:
2797
2829
"""Replace a document.
2798
2830
@@ -2818,6 +2850,9 @@ def replace(
2818
2850
index caches if document insertions affect the edge index or
2819
2851
cache-enabled persistent indexes.
2820
2852
:type refill_index_caches: bool | None
2853
+ param version_attribute: support for simple external versioning to
2854
+ document operations.
2855
+ :type version_attribute: str
2821
2856
:return: Document metadata (e.g. document key, revision) or True if
2822
2857
parameter **silent** was set to True.
2823
2858
:rtype: bool | dict
@@ -2834,6 +2869,9 @@ def replace(
2834
2869
if sync is not None :
2835
2870
params ["waitForSync" ] = sync
2836
2871
2872
+ if version_attribute is not None :
2873
+ params ["versionAttribute" ] = version_attribute
2874
+
2837
2875
# New in ArangoDB 3.9.6 and 3.10.2
2838
2876
if refill_index_caches is not None :
2839
2877
params ["refillIndexCaches" ] = refill_index_caches
0 commit comments