diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-05 03:09:16 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-05 03:09:16 +0300 |
commit | 4fd77e112fac07c5b904668b7d5f500589f8d2d5 (patch) | |
tree | a7f82bdc0eaba09f1aaafc484509bfe4b664c954 /app/models/concerns/from_union.rb | |
parent | 8a55c3263f1f37fdc9ee772bc0d38133dfe94495 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/concerns/from_union.rb')
-rw-r--r-- | app/models/concerns/from_union.rb | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/app/models/concerns/from_union.rb b/app/models/concerns/from_union.rb index e25d603b802..be6744f1b2a 100644 --- a/app/models/concerns/from_union.rb +++ b/app/models/concerns/from_union.rb @@ -37,27 +37,6 @@ module FromUnion # rubocop: disable Gitlab/Union extend FromSetOperator define_set_operator Gitlab::SQL::Union - - alias_method :from_union_set_operator, :from_union - def from_union(members, remove_duplicates: true, alias_as: table_name) - if Feature.enabled?(:sql_set_operators) - from_union_set_operator(members, remove_duplicates: remove_duplicates, alias_as: alias_as) - else - # The original from_union method. - standard_from_union(members, remove_duplicates: remove_duplicates, alias_as: alias_as) - end - end - - private - - def standard_from_union(members, remove_duplicates: true, alias_as: table_name) - union = Gitlab::SQL::Union - .new(members, remove_duplicates: remove_duplicates) - .to_sql - - from(Arel.sql("(#{union}) #{alias_as}")) - end - # rubocop: enable Gitlab/Union end end |