Methods

Class/Module Index [+]

Quicksearch

Sequel::Dataset::DatasetSourceAlias

Public Instance Methods

from(*source, &block) click to toggle source

Preprocess the list of sources and attempt to alias any datasets in the sources to the first source of the resepctive dataset.

# File lib/sequel/extensions/dataset_source_alias.rb, line 45
def from(*source, &block)
  virtual_row_columns(source, block)
  table_aliases = []
  source = source.map do |s|
    case s
    when Dataset
      s = dataset_source_alias_expression(s, table_aliases)
    when Symbol, String, SQL::AliasedExpression, SQL::Identifier, SQL::QualifiedIdentifier
      table_aliases << alias_symbol(s)
    end
    s
  end
  super(*source, &nil)
end
join_table(type, table, expr=nil, options=OPTS) click to toggle source

If a Dataset is given as the table argument, attempt to alias it to its source.

# File lib/sequel/extensions/dataset_source_alias.rb, line 62
def join_table(type, table, expr=nil, options=OPTS)
  if table.is_a?(Dataset) && !options[:table_alias]
    table = dataset_source_alias_expression(table)
  end
  super
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.