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
Copy file name to clipboardExpand all lines: terminusdb_client/client/Client.py
+17-1Lines changed: 17 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1480,6 +1480,8 @@ def insert_document(
1480
1480
last_data_version: Optional[str] =None,
1481
1481
compress: Union[str, int] =1024,
1482
1482
raw_json: bool=False,
1483
+
merge_repeats: bool=False,
1484
+
overwrite: bool=False,
1483
1485
) ->None:
1484
1486
"""Inserts the specified document(s)
1485
1487
@@ -1499,6 +1501,10 @@ def insert_document(
1499
1501
If it is an integer, size of the data larger than this (in bytes) will be compress with gzip in the request (assume encoding as UTF-8, 0 = always compress). If it is `never` it will never compress the data.
1500
1502
raw_json : bool
1501
1503
Update as raw json
1504
+
merge_repeats : bool
1505
+
If True, duplicate document IDs in the same request are silently accepted instead of causing an error.
1506
+
overwrite : bool
1507
+
If True, existing documents with the same ID will be overwritten instead of causing an error. This enables upsert behavior.
"""Updates the specified document(s). Add the document if not existed.
1672
1685
@@ -1682,14 +1695,17 @@ def update_document(
1682
1695
Last version before the update, used to check if the document has been changed unknowingly
1683
1696
compress : str or int
1684
1697
If it is an integer, size of the data larger than this (in bytes) will be compress with gzip in the request (assume encoding as UTF-8, 0 = always compress). If it is `never` it will never compress the data.
1698
+
merge_repeats : bool
1699
+
If True, duplicate document IDs in the same request are silently accepted instead of causing an error.
0 commit comments