Class/Module Index [+]

Quicksearch

Sequel::Plugins::ManyThroughMany::ManyThroughManyAssociationReflection

The AssociationReflection subclass for many_through_many associations.

Public Instance Methods

associated_key_table() click to toggle source

The table containing the column to use for the associated key when eagerly loading

# File lib/sequel/plugins/many_through_many.rb, line 51
def associated_key_table
  self[:associated_key_table] = self[:final_reverse_edge][:alias]
end
default_associated_key_alias() click to toggle source

The default associated key alias(es) to use when eager loading associations via eager.

# File lib/sequel/plugins/many_through_many.rb, line 57
def default_associated_key_alias
  self[:uses_left_composite_keys] ? (0...self[:through].first[:left].length).map{|i| :"x_foreign_key_#{i}_x"} : :x_foreign_key_x
end
eager_loading_predicate_key() click to toggle source

The hash key to use for the eager loading predicate (left side of IN (1, 2, 3))

# File lib/sequel/plugins/many_through_many.rb, line 62
def eager_loading_predicate_key
  self[:eager_loading_predicate_key] ||= begin
    calculate_edges
    e = self[:edges].first
    f = self[:final_reverse_edge]
    qualify(f[:alias], e[:right])
  end
end
edges() click to toggle source

The list of joins to use when eager graphing

# File lib/sequel/plugins/many_through_many.rb, line 72
def edges
  self[:edges] || calculate_edges || self[:edges]
end
reciprocal() click to toggle source

Many through many associations don't have a reciprocal

# File lib/sequel/plugins/many_through_many.rb, line 77
def reciprocal
  nil
end
reverse_edges() click to toggle source

The list of joins to use when lazy loading or eager loading

# File lib/sequel/plugins/many_through_many.rb, line 82
def reverse_edges
  self[:reverse_edges] || calculate_edges || self[:reverse_edges]
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.