module Sequel::Plugins::ColumnSelect::ClassMethods

Private Instance Methods

convert_input_dataset(ds) click to toggle source

If the underlying dataset selects from a single table and has no explicit selection, explicitly select all columns from that table, qualifying them with table’s name.

Calls superclass method
   # File lib/sequel/plugins/column_select.rb
42 def convert_input_dataset(ds)
43   ds = super
44   unless ds.opts[:select]
45     if db.supports_schema_parsing?
46       cols = check_non_connection_error(false){db.schema(ds)}
47       if cols
48         cols = cols.map{|c, _| c}
49       end
50     end
51 
52     if cols ||= check_non_connection_error(false){ds.columns}
53       ds = ds.select(*cols.map{|c| Sequel.qualify(ds.first_source, Sequel.identifier(c))})
54     end
55   end
56   ds
57 end