Class: GitlabQuality::TestTooling::CodeCoverage::ClickHouse::CategoryOwnersTable
- Inherits:
-
Table
- Object
- Table
- GitlabQuality::TestTooling::CodeCoverage::ClickHouse::CategoryOwnersTable
- Defined in:
- lib/gitlab_quality/test_tooling/code_coverage/click_house/category_owners_table.rb
Constant Summary collapse
- TABLE_NAME =
"category_owners"- MissingMappingError =
Class.new(StandardError)
Constants inherited from Table
Instance Method Summary collapse
-
#owners(feature_category_name) ⇒ Hash
Owners of particular feature category as group, stage and section.
- #truncate ⇒ Object
Methods inherited from Table
Constructor Details
This class inherits a constructor from GitlabQuality::TestTooling::CodeCoverage::ClickHouse::Table
Instance Method Details
#owners(feature_category_name) ⇒ Hash
Owners of particular feature category as group, stage and section
26 27 28 29 30 |
# File 'lib/gitlab_quality/test_tooling/code_coverage/click_house/category_owners_table.rb', line 26 def owners(feature_category_name) records.fetch(feature_category_name) rescue KeyError raise(MissingMappingError, "Feature category '#{feature_category_name}' not found in table '#{table_name}'") end |
#truncate ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/gitlab_quality/test_tooling/code_coverage/click_house/category_owners_table.rb', line 14 def truncate logger.debug("#{LOG_PREFIX} Truncating table #{full_table_name} ...") client.query("TRUNCATE TABLE #{full_table_name}") logger.info("#{LOG_PREFIX} Successfully truncated table #{full_table_name}") end |