Welcome to mirror list, hosted at ThFree Co, Russian Federation.

active_record_instrumentation.rb « marginalia « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 452f472bf6ae5a7b9dc742a00839b841271624fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
# frozen_string_literal: true

# Patch to annotate sql only when the feature is enabled.
module Gitlab
  module Marginalia
    module ActiveRecordInstrumentation
      def annotate_sql(sql)
        Gitlab::Marginalia.enabled ? super(sql) : sql
      end
    end
  end
end