Method: Sequel::Dataset#select_append
- Defined in:
- lib/sequel/dataset/query.rb
#select_append(*columns, &block) ⇒ Object
Returns a copy of the dataset with the given columns added to the existing selected columns. If no columns are currently selected, it will select the columns given in addition to *.
DB[:items].select(:a).select(:b) # SELECT b FROM items
DB[:items].select(:a).select_append(:b) # SELECT a, b FROM items
DB[:items].select_append(:b) # SELECT *, b FROM items
952 953 954 955 |
# File 'lib/sequel/dataset/query.rb', line 952 def select_append(*columns, &block) virtual_row_columns(columns, block) select(*(_current_select(true) + columns)) end |