Module: Sequel::Plugins::ConcurrentEagerLoading::DatasetMethods

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

Instance Method Summary collapse

Instance Method Details

#eager_load_concurrentlyObject

Return a cloned dataset that will eager load associated results concurrently using the async thread pool.



124
125
126
127
128
# File 'lib/sequel/plugins/concurrent_eager_loading.rb', line 124

def eager_load_concurrently
  cached_dataset(:_eager_load_concurrently) do
    clone(:eager_load_concurrently=>true)
  end
end

#eager_load_seriallyObject

Return a cloned dataset that will noteager load associated results concurrently using the async thread pool. Only useful if the current dataset has been marked as loading concurrently, or loading concurrently is the model’s default behavior.



133
134
135
136
137
# File 'lib/sequel/plugins/concurrent_eager_loading.rb', line 133

def eager_load_serially
  cached_dataset(:_eager_load_serially) do
    clone(:eager_load_concurrently=>false)
  end
end