Method: Sequel::Dataset#select_all
- Defined in:
- lib/sequel/dataset/query.rb
#select_all(*tables) ⇒ Object
Returns a copy of the dataset selecting the wildcard if no arguments are given. If arguments are given, treat them as tables and select all columns (using the wildcard) from each table.
DB[:items].select(:a).select_all # SELECT * FROM items
DB[:items].select_all(:items) # SELECT items.* FROM items
DB[:items].select_all(:items, :foo) # SELECT items.*, foo.* FROM items
936 937 938 939 940 941 942 943 |
# File 'lib/sequel/dataset/query.rb', line 936 def select_all(*tables) if tables.empty? return self unless opts[:select] cached_dataset(:_select_all_ds){clone(:select => nil)} else select(*tables.map{|t| i, a = split_alias(t); a || i}.map!{|t| SQL::ColumnAll.new(t)}.freeze) end end |