Class ComputedValue


  • public final class ComputedValue
    extends Object
    Since:
    ArangoDB 3.10
    • Constructor Detail

      • ComputedValue

        public ComputedValue()
    • Method Detail

      • name

        public ComputedValue name​(String name)
        Parameters:
        name - (required) 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.
        Returns:
        this
      • expression

        public ComputedValue expression​(String expression)
        Parameters:
        expression - (required) An AQL RETURN operation with an expression that computes the desired value. See Computed Value Expressions for details.
        Returns:
        this
      • overwrite

        public ComputedValue overwrite​(Boolean overwrite)
        Parameters:
        overwrite - (required) Whether the computed value shall take precedence over a user-provided or existing attribute.
        Returns:
        this
      • computeOn

        public ComputedValue computeOn​(ComputedValue.ComputeOn... computeOn)
        Parameters:
        computeOn - (optional) An array of operations to define on which write operations the value shall be computed. The default is ["insert", "update", "replace"].
        Returns:
        this
      • keepNull

        public ComputedValue keepNull​(Boolean keepNull)
        Parameters:
        keepNull - (optional) 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.
        Returns:
        this
      • failOnWarning

        public ComputedValue failOnWarning​(Boolean failOnWarning)
        Parameters:
        failOnWarning - (optional) Whether to let the write operation fail if the expression produces a warning. The default is false.
        Returns:
        this
      • getName

        public String getName()
      • getExpression

        public String getExpression()
      • getOverwrite

        public Boolean getOverwrite()
      • getKeepNull

        public Boolean getKeepNull()
      • getFailOnWarning

        public Boolean getFailOnWarning()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object