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 25 25: def and(*cond, &block) 26: if @opts[:having] 27: having(*cond, &block) 28: else 29: super 30: end 31: end
Operate on HAVING clause if HAVING clause already present.
# File lib/sequel/extensions/filter_having.rb, line 34 34: def exclude(*cond, &block) 35: if @opts[:having] 36: exclude_having(*cond, &block) 37: else 38: super 39: end 40: end
Operate on HAVING clause if HAVING clause already present.
# File lib/sequel/extensions/filter_having.rb, line 43 43: def filter(*cond, &block) 44: if @opts[:having] 45: having(*cond, &block) 46: else 47: super 48: end 49: end
Operate on HAVING clause if HAVING clause already present.
# File lib/sequel/extensions/filter_having.rb, line 52 52: def or(*cond, &block) 53: if having = @opts[:having] 54: cond = cond.first if cond.size == 1 55: clone(:having => SQL::BooleanExpression.new(:OR, having, filter_expr(cond, &block))) 56: else 57: super 58: end 59: end