Module: ActiveRecord::FullTextSearch::CommandRecorder

Defined in:
lib/active_record/full_text_search/command_recorder.rb

Overview

ActiveRecord::Migration::CommandRecorder is a class used by reversible migrations. It captures the forward migration commands and translates them into their inverse by way of some simple metaprogramming.

The Migrator class uses CommandRecorder during the reverse migration instead of the connection object. Forward migration calls are translated to their inverse where possible, and then forwarded to the connetion. Irreversible migrations raise an exception.

Known schema statement methods are metaprogrammed into an inverse method like so:

create_table => invert_create_table

which returns:

[:drop_table, args.first]

Instance Method Summary collapse

Instance Method Details

#add_text_search_configuration_mappingping(*args, &block) ⇒ Object



53
54
55
# File 'lib/active_record/full_text_search/command_recorder.rb', line 53

def add_text_search_configuration_mappingping(*args, &block)
  record(:add_text_search_configuration_mappingping, args, &block)
end

#change_text_search_configuration_mapping(*args, &block) ⇒ Object



57
58
59
# File 'lib/active_record/full_text_search/command_recorder.rb', line 57

def change_text_search_configuration_mapping(*args, &block)
  record(:change_text_search_configuration_mapping, args, &block)
end

#change_text_search_dictionary_option(*args, &block) ⇒ Object



81
82
83
# File 'lib/active_record/full_text_search/command_recorder.rb', line 81

def change_text_search_dictionary_option(*args, &block)
  record(:change_text_search_dictionary_option, args, &block)
end

#create_function(*args, &block) ⇒ Object



25
26
27
# File 'lib/active_record/full_text_search/command_recorder.rb', line 25

def create_function(*args, &block)
  record(:create_function, args, &block)
end

#create_text_search_configuration(*args, &block) ⇒ Object



41
42
43
# File 'lib/active_record/full_text_search/command_recorder.rb', line 41

def create_text_search_configuration(*args, &block)
  record(:create_text_search_configuration, args, &block)
end

#create_text_search_dictionary(*args, &block) ⇒ Object



69
70
71
# File 'lib/active_record/full_text_search/command_recorder.rb', line 69

def create_text_search_dictionary(*args, &block)
  record(:create_text_search_dictionary, args, &block)
end

#create_text_search_parser(*args, &block) ⇒ Object



85
86
87
# File 'lib/active_record/full_text_search/command_recorder.rb', line 85

def create_text_search_parser(*args, &block)
  record(:create_text_search_parser, args, &block)
end

#create_text_search_template(*args, &block) ⇒ Object



97
98
99
# File 'lib/active_record/full_text_search/command_recorder.rb', line 97

def create_text_search_template(*args, &block)
  record(:create_text_search_template, args, &block)
end

#create_trigger(*args, &block) ⇒ Object



33
34
35
# File 'lib/active_record/full_text_search/command_recorder.rb', line 33

def create_trigger(*args, &block)
  record(:create_trigger, args, &block)
end

#drop_function(*args, &block) ⇒ Object



29
30
31
# File 'lib/active_record/full_text_search/command_recorder.rb', line 29

def drop_function(*args, &block)
  record(:drop_function, args, &block)
end

#drop_text_search_configuration(*args, &block) ⇒ Object



45
46
47
# File 'lib/active_record/full_text_search/command_recorder.rb', line 45

def drop_text_search_configuration(*args, &block)
  record(:drop_text_search_configuration, args, &block)
end

#drop_text_search_configuration_mapping(*args, &block) ⇒ Object



65
66
67
# File 'lib/active_record/full_text_search/command_recorder.rb', line 65

def drop_text_search_configuration_mapping(*args, &block)
  record(:drop_text_search_configuration_mapping, args, &block)
end

#drop_text_search_dictionary(*args, &block) ⇒ Object



73
74
75
# File 'lib/active_record/full_text_search/command_recorder.rb', line 73

def drop_text_search_dictionary(*args, &block)
  record(:drop_text_search_dictionary, args, &block)
end

#drop_text_search_parser(*args, &block) ⇒ Object



89
90
91
# File 'lib/active_record/full_text_search/command_recorder.rb', line 89

def drop_text_search_parser(*args, &block)
  record(:drop_text_search_parser, args, &block)
end

#drop_text_search_template(*args, &block) ⇒ Object



101
102
103
# File 'lib/active_record/full_text_search/command_recorder.rb', line 101

def drop_text_search_template(*args, &block)
  record(:drop_text_search_template, args, &block)
end

#drop_trigger(*args, &block) ⇒ Object



37
38
39
# File 'lib/active_record/full_text_search/command_recorder.rb', line 37

def drop_trigger(*args, &block)
  record(:drop_trigger, args, &block)
end

#rename_text_search_configuration(*args, &block) ⇒ Object



49
50
51
# File 'lib/active_record/full_text_search/command_recorder.rb', line 49

def rename_text_search_configuration(*args, &block)
  record(:rename_text_search_configuration, args, &block)
end

#rename_text_search_dictionary(*args, &block) ⇒ Object



77
78
79
# File 'lib/active_record/full_text_search/command_recorder.rb', line 77

def rename_text_search_dictionary(*args, &block)
  record(:rename_text_search_dictionary, args, &block)
end

#rename_text_search_parser(*args, &block) ⇒ Object



93
94
95
# File 'lib/active_record/full_text_search/command_recorder.rb', line 93

def rename_text_search_parser(*args, &block)
  record(:rename_text_search_parser, args, &block)
end

#rename_text_search_template(*args, &block) ⇒ Object



105
106
107
# File 'lib/active_record/full_text_search/command_recorder.rb', line 105

def rename_text_search_template(*args, &block)
  record(:rename_text_search_template, args, &block)
end

#replace_text_search_configuration_dictionary(*args, &block) ⇒ Object



61
62
63
# File 'lib/active_record/full_text_search/command_recorder.rb', line 61

def replace_text_search_configuration_dictionary(*args, &block)
  record(:replace_text_search_configuration_dictionary, args, &block)
end