Module: Sequel::ColumnsIntrospection
- Defined in:
- lib/sequel/extensions/columns_introspection.rb
Instance Method Summary collapse
-
#columns ⇒ Object
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.
Instance Method Details
#columns ⇒ Object
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.
26 27 28 29 30 31 32 33 |
# File 'lib/sequel/extensions/columns_introspection.rb', line 26 def columns return @columns if @columns if (pcs = probable_columns) && pcs.all? @columns = pcs else super end end |