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

where_constraints.rb « relation_parsers « names_suggestions « metrics « usage « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9f82906721418d1664ec9ff2fb355259ddac096b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# frozen_string_literal: true

module Gitlab
  module Usage
    module Metrics
      module NamesSuggestions
        module RelationParsers
          class WhereConstraints < ::Arel::Visitors::PostgreSQL
            # rubocop:disable Naming/MethodName
            def visit_Arel_Nodes_SelectCore(object, collector)
              collect_nodes_for(object.wheres, collector, "") || collector
            end
            # rubocop:enable Naming/MethodName

            def quote(value)
              value.to_s
            end

            def quote_table_name(name)
              name.to_s
            end

            def quote_column_name(name)
              name.to_s
            end
          end
        end
      end
    end
  end
end