class Perpetuity::Postgres::QueryUnion

Attributes

lhs[R]
rhs[R]

Public Class Methods

new(lhs, rhs) click to toggle source
# File lib/perpetuity/postgres/query_union.rb, line 8
def initialize lhs, rhs
  @lhs = lhs
  @rhs = rhs
end

Public Instance Methods

&(other) click to toggle source
# File lib/perpetuity/postgres/query_union.rb, line 21
def & other
  QueryIntersection.new(self, other)
end
to_db() click to toggle source
# File lib/perpetuity/postgres/query_union.rb, line 13
def to_db
  "(#{lhs.to_db} OR #{rhs.to_db})"
end
|(other) click to toggle source
# File lib/perpetuity/postgres/query_union.rb, line 17
def | other
  QueryUnion.new(self, other)
end