Class: SequelMapper::ManyToManyAssociation::JoinedDataset
- Defined in:
- lib/sequel_mapper/many_to_many_association.rb
Defined Under Namespace
Classes: JoinedRecord
Instance Method Summary collapse
-
#initialize(records, join_records) ⇒ JoinedDataset
constructor
A new instance of JoinedDataset.
- #join(_relation_name, _conditions) ⇒ Object
- #where(criteria) ⇒ Object
Methods inherited from Dataset
Constructor Details
#initialize(records, join_records) ⇒ JoinedDataset
Returns a new instance of JoinedDataset.
62 63 64 65 |
# File 'lib/sequel_mapper/many_to_many_association.rb', line 62 def initialize(records, join_records) @records = records @join_records = join_records end |
Instance Method Details
#join(_relation_name, _conditions) ⇒ Object
67 68 69 70 71 72 |
# File 'lib/sequel_mapper/many_to_many_association.rb', line 67 def join(_relation_name, _conditions) # TODO: This works for the current test suite but is probably too # simplistic. Perhaps if the dataset was aware of its join conditions # it would be able to intellegently skip joining or delegate self end |
#where(criteria) ⇒ Object
74 75 76 77 78 79 80 |
# File 'lib/sequel_mapper/many_to_many_association.rb', line 74 def where(criteria) self.class.new( *decompose_set( find_like_sequel(criteria) ) ) end |