Method: Sequel::Dataset#unfiltered

Defined in:
lib/sequel/dataset/query.rb

#unfilteredObject

Returns a copy of the dataset with no filters (HAVING or WHERE clause) applied.

DB[:items].group(:a).having(a: 1).where(:b).unfiltered
# SELECT * FROM items GROUP BY a


1033
1034
1035
1036
# File 'lib/sequel/dataset/query.rb', line 1033

def unfiltered
  return self unless opts[:where] || opts[:having]
  cached_dataset(:_unfiltered_ds){clone(:where => nil, :having => nil)}
end