Module: MigrationComments::ActiveRecord::ConnectionAdapters::AbstractAdapter
- Defined in:
- lib/migration_comments/active_record/connection_adapters/abstract_adapter.rb,
lib/migration_comments/active_record/connection_adapters/abstract_adapter/schema_creation.rb
Defined Under Namespace
Modules: SchemaCreation
Instance Method Summary collapse
- #comments_supported? ⇒ Boolean
-
#independent_comments? ⇒ Boolean
PostgreSQL style - comment-specific commands.
-
#inline_comments? ⇒ Boolean
SQLite style - embedded comments.
-
#remove_column_comment(table_name, column_name) ⇒ Object
Remove a comment on a column (if set).
-
#remove_table_comment(table_name) ⇒ Object
Remove a comment on a table (if set).
- #retrieve_column_comment(table_name, column_name) ⇒ Object
- #retrieve_column_comments(table_name, *column_names) ⇒ Object
- #retrieve_table_comment(table_name) ⇒ Object
- #set_column_comment(table_name, column_name, comment_text) ⇒ Object
- #set_table_comment(table_name, comment_text) ⇒ Object
Instance Method Details
#comments_supported? ⇒ Boolean
9 10 11 |
# File 'lib/migration_comments/active_record/connection_adapters/abstract_adapter.rb', line 9 def comments_supported? false end |
#independent_comments? ⇒ Boolean
PostgreSQL style - comment-specific commands
19 20 21 |
# File 'lib/migration_comments/active_record/connection_adapters/abstract_adapter.rb', line 19 def independent_comments? false end |
#inline_comments? ⇒ Boolean
SQLite style - embedded comments
14 15 16 |
# File 'lib/migration_comments/active_record/connection_adapters/abstract_adapter.rb', line 14 def inline_comments? false end |
#remove_column_comment(table_name, column_name) ⇒ Object
Remove a comment on a column (if set)
29 30 31 |
# File 'lib/migration_comments/active_record/connection_adapters/abstract_adapter.rb', line 29 def remove_column_comment(table_name, column_name) set_column_comment(table_name, column_name, nil) end |
#remove_table_comment(table_name) ⇒ Object
Remove a comment on a table (if set)
24 25 26 |
# File 'lib/migration_comments/active_record/connection_adapters/abstract_adapter.rb', line 24 def remove_table_comment(table_name) set_table_comment(table_name, nil) end |
#retrieve_column_comment(table_name, column_name) ⇒ Object
41 42 43 |
# File 'lib/migration_comments/active_record/connection_adapters/abstract_adapter.rb', line 41 def retrieve_column_comment(table_name, column_name) retrieve_column_comments(table_name, column_name)[column_name] end |
#retrieve_column_comments(table_name, *column_names) ⇒ Object
37 38 39 |
# File 'lib/migration_comments/active_record/connection_adapters/abstract_adapter.rb', line 37 def retrieve_column_comments(table_name, *column_names) {} end |
#retrieve_table_comment(table_name) ⇒ Object
33 34 35 |
# File 'lib/migration_comments/active_record/connection_adapters/abstract_adapter.rb', line 33 def retrieve_table_comment(table_name) nil end |
#set_column_comment(table_name, column_name, comment_text) ⇒ Object
6 7 |
# File 'lib/migration_comments/active_record/connection_adapters/abstract_adapter.rb', line 6 def set_column_comment(table_name, column_name, comment_text) end |
#set_table_comment(table_name, comment_text) ⇒ Object
3 4 |
# File 'lib/migration_comments/active_record/connection_adapters/abstract_adapter.rb', line 3 def set_table_comment(table_name, comment_text) end |