File: columns_introspection.rb [sequel-4.23.0 Documentation]

Last Modified
  2015-08-01 07:51:30 +0000
Requires

## Description

The columns_introspection extension attempts to introspect the selected columns for a dataset before issuing a query. If it thinks it can guess correctly at the columns the query will use, it will return the columns without issuing a database query.

This method is not fool-proof, it's possible that some databases will use column names that Sequel does not expect. Also, it may not correctly handle all cases.

To attempt to introspect columns for a single dataset:

    ds = ds.extension(:columns_introspection)

To attempt to introspect columns for all datasets on a single database:

    DB.extension(:columns_introspection)