Module Sequel::Plugins::EagerEach::EagerDatasetMethods
In: lib/sequel/plugins/eager_each.rb

Methods added to eagerly loaded datasets when the eager_each plugin is in use.

Methods

all   each  

Public Instance methods

Clone the dataset and set a flag to let each know not to call all, to avoid the infinite loop.

[Source]

    # File lib/sequel/plugins/eager_each.rb, line 37
37:         def all(&block)
38:           if opts[:all_called]
39:             super
40:           else
41:             clone(:all_called=>true).all(&block)
42:           end
43:         end

Call all instead of each unless each is being called by all.

[Source]

    # File lib/sequel/plugins/eager_each.rb, line 27
27:         def each(&block)
28:           if opts[:all_called]
29:             super
30:           else
31:             all(&block)
32:           end
33:         end

[Validate]