module Sequel::Dataset::ColumnsLimit1
Constants
- COLUMNS_CLONE_OPTIONS
Public Instance Methods
columns!()
click to toggle source
Use a limit of 1 instead of a limit of 0 when getting the columns.
# File lib/sequel/adapters/utils/columns_limit_1.rb, line 9 def columns! ds = clone(COLUMNS_CLONE_OPTIONS) ds.each{break} if cols = ds.cache[:_columns] self.columns = cols else [] end end