Class: Gitlab::CycleAnalytics::CodeEventFetcher

Inherits:
BaseEventFetcher show all
Includes:
CodeHelper
Defined in:
lib/gitlab/cycle_analytics/code_event_fetcher.rb

Constant Summary

Constants inherited from BaseEventFetcher

BaseEventFetcher::MAX_EVENTS

Constants included from Database::Median

Database::Median::NotSupportedError

Instance Attribute Summary

Attributes inherited from BaseEventFetcher

#options, #projections, #query, #stage

Instance Method Summary collapse

Methods included from CodeHelper

#stage_query

Methods inherited from BaseEventFetcher

#fetch, #order

Methods included from GroupProjectsProvider

#group, #project, #projects

Methods included from Database::DateTime

#subtract_datetimes, #subtract_datetimes_diff

Methods included from Database::Median

#extract_median, #extract_medians, #median_datetime, #median_datetimes, #pg_median_datetime_sql

Methods included from MetricsTables

#build_table, #issue_metrics_table, #issue_table, #mr_closing_issues_table, #mr_diff_commits_table, #mr_diff_table, #mr_metrics_table, #mr_table, #projects_table, #routes_table, #user_table

Constructor Details

#initialize(*args) ⇒ CodeEventFetcher

Returns a new instance of CodeEventFetcher.


8
9
10
11
12
13
14
15
16
17
18
# File 'lib/gitlab/cycle_analytics/code_event_fetcher.rb', line 8

def initialize(*args)
  @projections = [mr_table[:title],
                  mr_table[:iid],
                  mr_table[:id],
                  mr_table[:created_at],
                  mr_table[:state_id],
                  mr_table[:author_id]]
  @order = mr_table[:created_at]

  super(*args)
end