Class: Igniter::Store::ScatterRule

Inherits:
Struct
  • Object
show all
Defined in:
lib/igniter/store/access_path.rb

Overview

Scatter derivation rule: when a fact is written to source_store, extract partition_by field from its value to determine the target key, then call rule.(partition_key, existing_value, new_fact) → Hash | nil to update exactly one entry in target_store.

Unlike Gather (DerivationRule), Scatter is 1-source → 1-index-entry: the rule accumulates into an existing value rather than re-evaluating the full source set. rule returning nil skips the write.

Instance Attribute Summary collapse

Instance Attribute Details

#partition_byObject

Returns the value of attribute partition_by

Returns:

  • (Object)

    the current value of partition_by



76
77
78
# File 'lib/igniter/store/access_path.rb', line 76

def partition_by
  @partition_by
end

#ruleObject

Returns the value of attribute rule

Returns:

  • (Object)

    the current value of rule



76
77
78
# File 'lib/igniter/store/access_path.rb', line 76

def rule
  @rule
end

#source_storeObject

Returns the value of attribute source_store

Returns:

  • (Object)

    the current value of source_store



76
77
78
# File 'lib/igniter/store/access_path.rb', line 76

def source_store
  @source_store
end

#target_storeObject

Returns the value of attribute target_store

Returns:

  • (Object)

    the current value of target_store



76
77
78
# File 'lib/igniter/store/access_path.rb', line 76

def target_store
  @target_store
end