Class: Coopy::CompareTable

Inherits:
Object
  • Object
show all
Defined in:
lib/lib/coopy/compare_table.rb

Instance Method Summary collapse

Constructor Details

#initialize(comp) ⇒ CompareTable

Returns a new instance of CompareTable.



7
8
9
10
11
12
# File 'lib/lib/coopy/compare_table.rb', line 7

def initialize(comp)
  @comp = comp
  if comp.compare_flags != nil 
    comp.p = comp.compare_flags.parent if comp.compare_flags.parent != nil
  end
end

Instance Method Details

#align ⇒ Object



33
34
35
36
37
38
39
40
# File 'lib/lib/coopy/compare_table.rb', line 33

def align 
  while(!@comp.completed) 
    self.run
  end
  alignment = ::Coopy::Alignment.new
  self.align_core(alignment)
  alignment
end

#get_comparison_state ⇒ Object



42
43
44
# File 'lib/lib/coopy/compare_table.rb', line 42

def get_comparison_state 
  @comp
end

#get_indexes ⇒ Object



635
636
637
# File 'lib/lib/coopy/compare_table.rb', line 635

def get_indexes 
  @indexes
end

#run ⇒ Object



21
22
23
24
25
26
27
28
29
30
31
# File 'lib/lib/coopy/compare_table.rb', line 21

def run 
  if self.use_sql 
    @comp.completed = true
    return false
  end
  more = self.compare_core
  while(more && @comp.run_to_completion) 
    more = self.compare_core
  end
  !more
end

#store_indexes ⇒ Object



631
632
633
# File 'lib/lib/coopy/compare_table.rb', line 631

def store_indexes 
  @indexes = Array.new
end