Class: Ci::DailyBuildGroupReportResult

Inherits:
ApplicationRecord show all
Extended by:
Gitlab::Ci::Model
Defined in:
app/models/ci/daily_build_group_report_result.rb

Constant Summary collapse

PARAM_TYPES =
%w[coverage].freeze

Class Method Summary collapse

Methods included from Gitlab::Ci::Model

model_name, table_name_prefix

Methods inherited from ApplicationRecord

at_most, id_in, id_not_in, iid_in, pluck_primary_key, primary_key_in, safe_ensure_unique, safe_find_or_create_by, safe_find_or_create_by!, underscore, without_order

Class Method Details

.recent_results(attrs, limit: nil) ⇒ Object


18
19
20
# File 'app/models/ci/daily_build_group_report_result.rb', line 18

def self.recent_results(attrs, limit: nil)
  where(attrs).order(date: :desc, group_name: :asc).limit(limit)
end

.upsert_reports(data) ⇒ Object


14
15
16
# File 'app/models/ci/daily_build_group_report_result.rb', line 14

def self.upsert_reports(data)
  upsert_all(data, unique_by: :index_daily_build_group_report_results_unique_columns) if data.any?
end