Method: Sequel::Dataset#having
- Defined in:
- lib/sequel/dataset/query.rb
#having(*cond, &block) ⇒ Object
Returns a copy of the dataset with the HAVING conditions changed. See #where for argument types.
DB[:items].group(:sum).having(sum: 10)
# SELECT * FROM items GROUP BY sum HAVING (sum = 10)
433 434 435 |
# File 'lib/sequel/dataset/query.rb', line 433 def having(*cond, &block) add_filter(:having, cond, &block) end |