Module | Sequel::FilterHaving |
In: |
lib/sequel/extensions/filter_having.rb
|
Operate on HAVING clause if HAVING clause already present.
# File lib/sequel/extensions/filter_having.rb, line 20 20: def and(*cond, &block) 21: if @opts[:having] 22: having(*cond, &block) 23: else 24: super 25: end 26: end
Operate on HAVING clause if HAVING clause already present.
# File lib/sequel/extensions/filter_having.rb, line 29 29: def exclude(*cond, &block) 30: if @opts[:having] 31: exclude_having(*cond, &block) 32: else 33: super 34: end 35: end
Operate on HAVING clause if HAVING clause already present.
# File lib/sequel/extensions/filter_having.rb, line 38 38: def filter(*cond, &block) 39: if @opts[:having] 40: having(*cond, &block) 41: else 42: super 43: end 44: end
Operate on HAVING clause if HAVING clause already present.
# File lib/sequel/extensions/filter_having.rb, line 47 47: def or(*cond, &block) 48: if having = @opts[:having] 49: cond = cond.first if cond.size == 1 50: clone(:having => SQL::BooleanExpression.new(:OR, having, filter_expr(cond, &block))) 51: else 52: super 53: end 54: end