Module: Sequel::GraphEach

Defined in:
lib/sequel/extensions/graph_each.rb

Instance Method Summary collapse

Instance Method Details

#eachObject

Call graph_each for graphed datasets that are not being eager graphed.



26
27
28
29
30
31
32
# File 'lib/sequel/extensions/graph_each.rb', line 26

def each
  if @opts[:graph] && !@opts[:eager_graph]
    graph_each{|r| yield r}
  else
    super
  end
end

#with_sql_each(sql) ⇒ Object

Call graph_each for graphed datasets that are not being eager graphed.



35
36
37
38
39
40
41
# File 'lib/sequel/extensions/graph_each.rb', line 35

def with_sql_each(sql)
  if @opts[:graph] && !@opts[:eager_graph]
    graph_each(sql){|r| yield r}
  else
    super
  end
end