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

Methods

all   columns   each  

Public Instance methods

If eager loading, 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 46
46:         def all(&block)
47:           if use_eager_all?
48:             clone(:all_called=>true).all(&block)
49:           else
50:             super
51:           end
52:         end

Don‘t call all when attempting to load the columns.

[Source]

    # File lib/sequel/plugins/eager_each.rb, line 26
26:         def columns
27:           if use_eager_all?
28:             clone(:all_called=>true).columns
29:           else
30:             super
31:           end
32:         end

Call all instead of each if eager loading, uless each is being called by all.

[Source]

    # File lib/sequel/plugins/eager_each.rb, line 36
36:         def each(&block)
37:           if use_eager_all?
38:             all(&block)
39:           else
40:             super
41:           end
42:         end

[Validate]