Annotation Interface ArangoComputedValueDefinition
@Repeatable(ArangoComputedValueDefinitions.class)
@Retention(RUNTIME)
@Target(TYPE)
public @interface ArangoComputedValueDefinition
Annotation to define computed values of a collection.
- See Also:
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptioncom.arangodb.model.ComputedValue.ComputeOn[]
boolean
boolean
boolean
-
Element Details
-
name
String name- Returns:
- The name of the target attribute. Can only be a top-level attribute, but you may return a nested object. Cannot be _key, _id, _rev, _from, _to, or a shard key attribute.
- See Also:
-
ComputedValue.name(String)
- Default:
- ""
-
expression
String expression- Returns:
- An AQL RETURN operation with an expression that computes the desired value. If empty, the computed value data definition will not be set on collection creation.
- See Also:
-
ComputedValue.expression(String)
- Default:
- ""
-
overwrite
boolean overwrite- Returns:
- Whether the computed value shall take precedence over a user-provided or existing attribute. The default is false.
- See Also:
-
ComputedValue.overwrite(Boolean)
- Default:
- false
-
computeOn
com.arangodb.model.ComputedValue.ComputeOn[] computeOn- Returns:
- An array of operations to define on which write operations the value shall be computed. The default is ["insert", "update", "replace"].
- See Also:
-
ComputedValue.computeOn(ComputedValue.ComputeOn...)
- Default:
- {insert, update, replace}
-
keepNull
boolean keepNull- Returns:
- Whether the target attribute shall be set if the expression evaluates to null. You can set the option to false to not set (or unset) the target attribute if the expression returns null. The default is true.
- See Also:
-
ComputedValue.keepNull(Boolean)
- Default:
- true
-
failOnWarning
boolean failOnWarning- Returns:
- Whether to let the write operation fail if the expression produces a warning. The default is false.
- See Also:
-
ComputedValue.failOnWarning(Boolean)
- Default:
- false
-