debian-mirror-gitlab/app/models/concerns/as_cte.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
248 B
Ruby
Raw Normal View History

2022-07-23 23:45:48 +05:30
# 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