Class: Igniter::Store::ScatterRule
- Inherits:
-
Struct
- Object
- Struct
- Igniter::Store::ScatterRule
- 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
-
#partition_by ⇒ Object
Returns the value of attribute partition_by.
-
#rule ⇒ Object
Returns the value of attribute rule.
-
#source_store ⇒ Object
Returns the value of attribute source_store.
-
#target_store ⇒ Object
Returns the value of attribute target_store.
Instance Attribute Details
#partition_by ⇒ Object
Returns the value of attribute partition_by
76 77 78 |
# File 'lib/igniter/store/access_path.rb', line 76 def partition_by @partition_by end |
#rule ⇒ Object
Returns the value of attribute rule
76 77 78 |
# File 'lib/igniter/store/access_path.rb', line 76 def rule @rule end |
#source_store ⇒ Object
Returns the value of attribute source_store
76 77 78 |
# File 'lib/igniter/store/access_path.rb', line 76 def source_store @source_store end |
#target_store ⇒ Object
Returns the value of attribute target_store
76 77 78 |
# File 'lib/igniter/store/access_path.rb', line 76 def target_store @target_store end |