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

postgres_cte_as_materialized.rb « initializers « config - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: fd6e7b48c25df2846ed6bcda00eec55be8d04fce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# frozen_string_literal: true

# This patch adds support for AS MATERIALIZED in Arel, see Gitlab::Database::AsWithMaterialized for more info
module Arel
  module Visitors
    class Arel::Visitors::PostgreSQL
      def visit_Gitlab_Database_AsWithMaterialized(obj, collector) # rubocop:disable Naming/MethodName
        collector = visit obj.left, collector
        collector << " AS "
        visit obj.right, collector
      end
    end
  end
end