Module: Sequel::Plugins::TacticalEagerLoading::InstanceMethods

Defined in:
lib/sequel/plugins/tactical_eager_loading.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#retrieved_byObject

The dataset that retrieved this object, set if the object was reteived via Dataset#all.


123
124
125
# File 'lib/sequel/plugins/tactical_eager_loading.rb', line 123

def retrieved_by
  @retrieved_by
end

#retrieved_withObject

All model objects retrieved with this object, set if the object was reteived via Dataset#all.


127
128
129
# File 'lib/sequel/plugins/tactical_eager_loading.rb', line 127

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.


132
133
134
135
136
# File 'lib/sequel/plugins/tactical_eager_loading.rb', line 132

def marshallable!
  @retrieved_by = nil
  @retrieved_with = nil
  super
end