Class: Gitlab::Database::GitlabSchemaInfo
- Inherits:
-
Struct
- Object
- Struct
- Gitlab::Database::GitlabSchemaInfo
- Defined in:
- lib/gitlab/database/gitlab_schema_info.rb
Instance Attribute Summary collapse
-
#allow_cross_foreign_keys ⇒ Object
Returns the value of attribute allow_cross_foreign_keys.
-
#allow_cross_joins ⇒ Object
Returns the value of attribute allow_cross_joins.
-
#allow_cross_transactions ⇒ Object
Returns the value of attribute allow_cross_transactions.
-
#description ⇒ Object
Returns the value of attribute description.
-
#file_path ⇒ Object
Returns the value of attribute file_path.
-
#name ⇒ Object
Returns the value of attribute name.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ GitlabSchemaInfo
constructor
A new instance of GitlabSchemaInfo.
Constructor Details
#initialize ⇒ GitlabSchemaInfo
Returns a new instance of GitlabSchemaInfo.
14 15 16 17 18 19 20 |
# File 'lib/gitlab/database/gitlab_schema_info.rb', line 14 def initialize(*) super self.name = name.to_sym self.allow_cross_joins = allow_cross_joins&.map(&:to_sym)&.freeze self.allow_cross_transactions = allow_cross_transactions&.map(&:to_sym)&.freeze self.allow_cross_foreign_keys = allow_cross_foreign_keys&.map(&:to_sym)&.freeze end |
Instance Attribute Details
#allow_cross_foreign_keys ⇒ Object
Returns the value of attribute allow_cross_foreign_keys
5 6 7 |
# File 'lib/gitlab/database/gitlab_schema_info.rb', line 5 def allow_cross_foreign_keys @allow_cross_foreign_keys end |
#allow_cross_joins ⇒ Object
Returns the value of attribute allow_cross_joins
5 6 7 |
# File 'lib/gitlab/database/gitlab_schema_info.rb', line 5 def allow_cross_joins @allow_cross_joins end |
#allow_cross_transactions ⇒ Object
Returns the value of attribute allow_cross_transactions
5 6 7 |
# File 'lib/gitlab/database/gitlab_schema_info.rb', line 5 def allow_cross_transactions @allow_cross_transactions end |
#description ⇒ Object
Returns the value of attribute description
5 6 7 |
# File 'lib/gitlab/database/gitlab_schema_info.rb', line 5 def description @description end |
#file_path ⇒ Object
Returns the value of attribute file_path
5 6 7 |
# File 'lib/gitlab/database/gitlab_schema_info.rb', line 5 def file_path @file_path end |
#name ⇒ Object
Returns the value of attribute name
5 6 7 |
# File 'lib/gitlab/database/gitlab_schema_info.rb', line 5 def name @name end |
Class Method Details
.load_file(yaml_file) ⇒ Object
22 23 24 25 |
# File 'lib/gitlab/database/gitlab_schema_info.rb', line 22 def self.load_file(yaml_file) content = YAML.load_file(yaml_file) new(**content.deep_symbolize_keys.merge(file_path: yaml_file)) end |