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.
74 75 76 |
# File 'lib/sequel/plugins/tactical_eager_loading.rb', line 74 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.
78 79 80 |
# File 'lib/sequel/plugins/tactical_eager_loading.rb', line 78 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.
83 84 85 86 87 |
# File 'lib/sequel/plugins/tactical_eager_loading.rb', line 83 def marshallable! @retrieved_by = nil @retrieved_with = nil super end |