Class: ArcFurnace::AbstractJoin
- Defined in:
- lib/arc-furnace/abstract_join.rb
Instance Attribute Summary
Attributes inherited from Node
#error_handler, #node_id, #params
Instance Method Summary collapse
- #advance ⇒ Object
-
#initialize(source:, hash:, key_column: nil) ⇒ AbstractJoin
constructor
The source is a source, the hash is a hash, and one can optionally pass the key column to get the primary key for each source entity, the default is equijoin semantics–the key of the hash is used.
- #value ⇒ Object
Methods inherited from Source
#close, #empty?, #finalize, #prepare, #row
Constructor Details
#initialize(source:, hash:, key_column: nil) ⇒ AbstractJoin
The source is a source, the hash is a hash, and one can optionally pass the key column to get the primary key for each source entity, the default is equijoin semantics–the key of the hash is used.
10 11 12 13 14 15 16 17 18 |
# File 'lib/arc-furnace/abstract_join.rb', line 10 def initialize(source: , hash:, key_column: nil) if source.is_a?(::ArcFurnace::Source) && hash.is_a?(::ArcFurnace::Hash) @hash = hash @source = source @key_column = key_column || hash.key_column else raise 'Must be passed one Hash and one Source!' end end |
Instance Method Details
#advance ⇒ Object
27 28 29 |
# File 'lib/arc-furnace/abstract_join.rb', line 27 def advance raise "Unimplemented!" end |
#value ⇒ Object
20 21 22 23 24 25 |
# File 'lib/arc-furnace/abstract_join.rb', line 20 def value if @value.nil? && !empty? advance end @value end |