Preprocess the list of sources and attempt to alias any datasets in the sources to the first source of the respective dataset.
# File lib/sequel/extensions/dataset_source_alias.rb, line 50 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
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 67 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