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

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

# Convert any ActiveRecord::Relation to a Gitlab::SQL::CTE
module AsCte
  extend ActiveSupport::Concern

  class_methods do
    def as_cte(name, **opts)
      Gitlab::SQL::CTE.new(name, all, **opts)
    end
  end
end