Module | Sequel::ColumnsIntrospection
In: | lib/sequel/extensions/columns_introspection.rb

### Methods

columns

### Public Instance methods

columns()

Attempt to guess the columns that will be returned if there are columns selected, in order to skip a database query to retrieve the columns. This should work with Symbols, SQL::Identifiers, SQL::QualifiedIdentifiers, and SQL::AliasedExpressions.

[Source]

        # File lib/sequel/extensions/columns_introspection.rb, line 20
    20:     def columns
    21:       return @columns if @columns
    22:       return columns_without_introspection unless cols = opts[:select] and !cols.empty?
    23:       probable_columns = cols.map{|c| probable_column_name(c)}
    24:       if probable_columns.all?
    25:         @columns = probable_columns
    26:       else
    27:         columns_without_introspection
    28:       end
    29:     end

[Validate]