Sha256: 1a1aa112fdaa5b195b072a04053c52ffe0f4047fd73d61d26d3a41040108f3e7
Contents?: true
Size: 881 Bytes
Versions: 22
Compression:
Stored size: 881 Bytes
Contents
module Neo4j module Wrapper module Rule module Functions class Sum < Function # Updates the function's value. # Called after the transactions commits and a property has been changed on a node. # # ==== Arguments # * rule_name :: the name of the rule group # * rule_node :: the node which contains the value of this function # * old_value new value :: the changed value of the property (when the transaction commits) def update(rule_name, rule_node, old_value, new_value) key = rule_node_property(rule_name) rule_node[key] ||= 0 old_value ||= 0 new_value ||= 0 rule_node[key] += new_value - old_value end def self.function_name :sum end end end end end end
Version data entries
22 entries across 22 versions & 1 rubygems