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.
30 31 32 33 34 35 36 37 38 39 |
# File 'lib/sequel/extensions/columns_introspection.rb', line 30 def columns if cols = _columns return cols end if (pcs = probable_columns) && pcs.all? self.columns = pcs else super end end |