Sha256: a65b4391093df32ca0c7d1f323529af57af3d1f7e752b9c9dd26908c68143170
Contents?: true
Size: 560 Bytes
Versions: 46
Compression:
Stored size: 560 Bytes
Contents
# frozen-string-literal: true module Sequel class Dataset module ColumnsLimit1 COLUMNS_CLONE_OPTIONS = {:distinct => nil, :limit => 1, :offset=>nil, :where=>nil, :having=>nil, :order=>nil, :row_proc=>nil, :graph=>nil, :eager_graph=>nil}.freeze # Use a limit of 1 instead of a limit of 0 when # getting the columns. def columns! ds = clone(COLUMNS_CLONE_OPTIONS) ds.each{break} if cols = ds.cache[:_columns] self.columns = cols else [] end end end end end
Version data entries
46 entries across 46 versions & 2 rubygems