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.



32
33
34
# File 'lib/sequel/plugins/tactical_eager_loading.rb', line 32

def retrieved_by
  @retrieved_by
end

#retrieved_withObject

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