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

#alignObject



33
34
35
36
37
38
39
40
41
42
# 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.comp = @comp
  @comp.alignment = alignment
  alignment
end

#get_comparison_stateObject



44
45
46
# File 'lib/lib/coopy/compare_table.rb', line 44

def get_comparison_state 
  @comp
end

#get_indexesObject



660
661
662
# File 'lib/lib/coopy/compare_table.rb', line 660

def get_indexes 
  @indexes
end

#runObject



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_indexesObject



656
657
658
# File 'lib/lib/coopy/compare_table.rb', line 656

def store_indexes 
  @indexes = Array.new
end