Module: Sequel::Plugins::TacticalEagerLoading::InstanceMethods
- Defined in:
- lib/sequel/plugins/tactical_eager_loading.rb
Instance Attribute Summary collapse
-
#retrieved_by ⇒ Object
The dataset that retrieved this object, set if the object was reteived via Dataset#all.
-
#retrieved_with ⇒ Object
All model objects retrieved with this object, set if the object was reteived via Dataset#all.
Instance Method Summary collapse
-
#marshallable! ⇒ Object
Remove retrieved_by and retrieved_with when marshalling.
Instance Attribute Details
#retrieved_by ⇒ Object
The dataset that retrieved this object, set if the object was reteived via Dataset#all.
32 33 34 |
# File 'lib/sequel/plugins/tactical_eager_loading.rb', line 32 def retrieved_by @retrieved_by end |
#retrieved_with ⇒ Object
All model objects retrieved with this object, set if the object was reteived via Dataset#all.
36 37 38 |
# File 'lib/sequel/plugins/tactical_eager_loading.rb', line 36 def retrieved_with @retrieved_with end |
Instance Method Details
#marshallable! ⇒ Object
Remove retrieved_by and retrieved_with when marshalling. retrieved_by contains unmarshallable objects, and retrieved_with can be very large and is not helpful without retrieved_by.
41 42 43 44 45 |
# File 'lib/sequel/plugins/tactical_eager_loading.rb', line 41 def marshallable! @retrieved_by = nil @retrieved_with = nil super end |