Package com.arangodb.model
Class DocumentCreateOptions
java.lang.Object
com.arangodb.model.TransactionalOptions<DocumentCreateOptions>
com.arangodb.model.DocumentCreateOptions
- Author:
- Mark Vollmary, Michele Rastelli
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionmergeObjects
(Boolean mergeObjects) Only considered ifoverwriteMode(OverwriteMode)
is set toOverwriteMode.update
overwriteMode
(OverwriteMode overwriteMode) refillIndexCaches
(Boolean refillIndexCaches) versionAttribute
(String versionAttribute) Only applicable ifoverwriteMode(OverwriteMode)
is set toOverwriteMode.update
orOverwriteMode.replace
.waitForSync
(Boolean waitForSync) Methods inherited from class com.arangodb.model.TransactionalOptions
getStreamTransactionId, streamTransactionId
-
Constructor Details
-
DocumentCreateOptions
public DocumentCreateOptions()
-
-
Method Details
-
getWaitForSync
-
waitForSync
- Parameters:
waitForSync
- Wait until document has been synced to disk.- Returns:
- options
-
getReturnNew
-
returnNew
- Parameters:
returnNew
- Return additionally the complete new document under the attribute new in the result.- Returns:
- options
-
getReturnOld
-
returnOld
- Parameters:
returnOld
- Additionally return the complete old document under the attribute old in the result.- Returns:
- options
- Since:
- ArangoDB 3.4
-
getOverwriteMode
-
overwriteMode
- Parameters:
overwriteMode
- This parameter can be set to replace or update. If given it sets implicitly the overwrite flag. In case it is set to update, the replace-insert becomes an update-insert. Otherwise this option follows the rules of the overwrite parameter.- Returns:
- options
- Since:
- ArangoDB 3.7
-
getSilent
-
silent
- Parameters:
silent
- If set to true, an empty object will be returned as response. No meta-data will be returned for the created document. This option can be used to save some network traffic.- Returns:
- options
-
getMergeObjects
-
mergeObjects
Only considered ifoverwriteMode(OverwriteMode)
is set toOverwriteMode.update
- Parameters:
mergeObjects
- Controls whether objects (not arrays) will be merged if present in both the existing and the patch document. If set to false, the value in the patch document will overwrite the existing document's value. If set to true, objects will be merged. The default is true.- Returns:
- options
- Since:
- ArangoDB 3.7
-
getKeepNull
-
keepNull
- Parameters:
keepNull
- If the intention is to delete existing attributes with the update-insert command, the URL query parameter keepNull can be used with a value of false. This will modify the behavior of the patch command to remove any attributes from the existing document that are contained in the patch document with an attribute value of null. This option controls the update-insert behavior only.- Returns:
- options
- Since:
- ArangoDB 3.7
-
getRefillIndexCaches
-
refillIndexCaches
- Parameters:
refillIndexCaches
- Whether to add a new entry to the in-memory edge cache if an edge document is inserted.- Returns:
- options
- Since:
- ArangoDB 3.11
-
getVersionAttribute
-
versionAttribute
Only applicable ifoverwriteMode(OverwriteMode)
is set toOverwriteMode.update
orOverwriteMode.replace
. You can use theversionAttribute
option for external versioning support. 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. If the version number in the new document is higher (rounded down to a whole number) than in the document that already exists in the database, then the update/replace operation is performed normally. This is also the case if the new versioning attribute has a non-numeric value, if it is a negative number, or if the attribute doesn't exist in the supplied or stored document. If the version number in the new document is lower or equal to what exists in the database, the operation is not performed and the existing document thus not changed. No error is returned in this case. The attribute can only be a top-level attribute. You can check if _oldRev (if present) and _rev are different to determine if the document has been changed.- Parameters:
versionAttribute
- the attribute name to use for versioning- Returns:
- options
- Since:
- ArangoDB 3.12
-