module Torque::PostgreSQL::Relation::Merger
Private Instance Methods
merge_auxiliary_statements()
click to toggle source
Merge auxiliary statements activated by with
# File lib/torque/postgresql/relation/merger.rb, line 34 def merge_auxiliary_statements return if other.auxiliary_statements_values.blank? current = relation.auxiliary_statements_values.map{ |cte| cte.class } other.auxiliary_statements_values.each do |other| next if current.include?(other.class) relation.auxiliary_statements_values += [other] current << other.class end end
merge_distinct_on()
click to toggle source
Merge distinct on columns
# File lib/torque/postgresql/relation/merger.rb, line 28 def merge_distinct_on return if other.distinct_on_values.blank? relation.distinct_on_values += other.distinct_on_values end
merge_inheritance()
click to toggle source
Merge settings related to inheritance tables
# File lib/torque/postgresql/relation/merger.rb, line 46 def merge_inheritance relation.itself_only_value = true if other.itself_only_value.present? if other.cast_records_value.present? relation.cast_records_value += other.cast_records_value relation.cast_records_value.uniq! end end
merge_select_extra()
click to toggle source
Merge extra select columns
# File lib/torque/postgresql/relation/merger.rb, line 22 def merge_select_extra relation.select_extra_values.concat(other.select_extra_values).uniq! \ if other.select_extra_values.present? end