# columns_introspection.rb

Path: | lib/sequel/extensions/columns_introspection.rb
Last Update: | Sun May 19 07:59:58 +0000 2013

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.

To attempt to introspect columns for a single dataset:

      ds.extension(:columns_introspection)

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

      DB.extension(:columns_introspection)

To attempt to introspect columns for all datasets on all databases:

      Sequel.extension :columns_introspection
      Sequel::Dataset.introspect_all_columns

[Validate]