Method: Sequel::Dataset::DatasetSourceAlias#from
- Defined in:
- lib/sequel/extensions/dataset_source_alias.rb
#from(*source, &block) ⇒ Object
Preprocess the list of sources and attempt to alias any datasets in the sources to the first source of the respective dataset.
50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# 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 |