Class: Tableflip::Strategy

Inherits:
Object
  • Object
show all
Defined in:
lib/tableflip/strategy.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize {|_self| ... } ⇒ Strategy

Instance Methods =====================================================

Yields:

  • (_self)

Yield Parameters:



26
27
28
29
30
31
32
33
34
35
# File 'lib/tableflip/strategy.rb', line 26

def initialize
  @actions = [ ]
  @tables = [ ]
  @exclude_columns = [ ]
  @fuzz_intensity = 1
  @block_size = 10000
  @migrate_method = :replace

  yield(self) if (block_given?)
end

Instance Attribute Details

#actionsObject

Properties ===========================================================



6
7
8
# File 'lib/tableflip/strategy.rb', line 6

def actions
  @actions
end

#block_sizeObject

Returns the value of attribute block_size.



7
8
9
# File 'lib/tableflip/strategy.rb', line 7

def block_size
  @block_size
end

#completeObject

Returns the value of attribute complete.



8
9
10
# File 'lib/tableflip/strategy.rb', line 8

def complete
  @complete
end

#config_pathObject

Returns the value of attribute config_path.



9
10
11
# File 'lib/tableflip/strategy.rb', line 9

def config_path
  @config_path
end

#debug_queriesObject

Returns the value of attribute debug_queries.



10
11
12
# File 'lib/tableflip/strategy.rb', line 10

def debug_queries
  @debug_queries
end

#encodingObject

Returns the value of attribute encoding.



11
12
13
# File 'lib/tableflip/strategy.rb', line 11

def encoding
  @encoding
end

#exclude_columnsObject

Returns the value of attribute exclude_columns.



12
13
14
# File 'lib/tableflip/strategy.rb', line 12

def exclude_columns
  @exclude_columns
end

#fuzz_intensityObject

Returns the value of attribute fuzz_intensity.



13
14
15
# File 'lib/tableflip/strategy.rb', line 13

def fuzz_intensity
  @fuzz_intensity
end

#messageObject

Returns the value of attribute message.



14
15
16
# File 'lib/tableflip/strategy.rb', line 14

def message
  @message
end

#migrate_methodObject

Returns the value of attribute migrate_method.



15
16
17
# File 'lib/tableflip/strategy.rb', line 15

def migrate_method
  @migrate_method
end

#persistObject

Returns the value of attribute persist.



16
17
18
# File 'lib/tableflip/strategy.rb', line 16

def persist
  @persist
end

#source_envObject

Returns the value of attribute source_env.



17
18
19
# File 'lib/tableflip/strategy.rb', line 17

def source_env
  @source_env
end

#tablesObject

Returns the value of attribute tables.



18
19
20
# File 'lib/tableflip/strategy.rb', line 18

def tables
  @tables
end

#target_envObject

Returns the value of attribute target_env.



19
20
21
# File 'lib/tableflip/strategy.rb', line 19

def target_env
  @target_env
end

#whereObject

Returns the value of attribute where.



20
21
22
# File 'lib/tableflip/strategy.rb', line 20

def where
  @where
end

Instance Method Details

#complete?Boolean

Returns:

  • (Boolean)


41
42
43
# File 'lib/tableflip/strategy.rb', line 41

def complete?
  !!@complete
end

#debug_queries?Boolean

Returns:

  • (Boolean)


45
46
47
# File 'lib/tableflip/strategy.rb', line 45

def debug_queries?
  !!@debug_queries
end

#persist?Boolean

Returns:

  • (Boolean)


37
38
39
# File 'lib/tableflip/strategy.rb', line 37

def persist?
  !!@persist
end