Package com.arangodb.model
Enum OverwriteMode
- All Implemented Interfaces:
Serializable
,Comparable<OverwriteMode>
- Since:
- ArangoDB 3.7
- Author:
- Michele Rastelli
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionif a document with the specified _key value exists already, return a unique constraint violation error so that the insert operation fails.if a document with the specified _key value exists already, nothing will be done and no write operation will be carried out.if a document with the specified _key value exists already, it will be overwritten with the specified document value.if a document with the specified _key value exists already, it will be patched (partially updated) with the specified document value. -
Method Summary
Modifier and TypeMethodDescriptiongetValue()
static OverwriteMode
Returns the enum constant of this type with the specified name.static OverwriteMode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
ignore
if a document with the specified _key value exists already, nothing will be done and no write operation will be carried out. The insert operation will return success in this case. This mode does not support returning the old document version using RETURN OLD. When using RETURN NEW, null will be returned in case the document already existed. -
replace
if a document with the specified _key value exists already, it will be overwritten with the specified document value. This mode will also be used when no overwrite mode is specified but the overwrite flag is set to true. -
update
if a document with the specified _key value exists already, it will be patched (partially updated) with the specified document value. The overwrite mode can be further controlled via the keepNull and mergeObjects parameters. -
conflict
if a document with the specified _key value exists already, return a unique constraint violation error so that the insert operation fails. This is also the default behavior in case the overwrite mode is not set, and the overwrite flag is false or not set either.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getValue
-