diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-19 12:08:55 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-19 12:08:55 +0300 |
commit | 541758119cb1a4e029a2d0fb0551f52f6cf9a511 (patch) | |
tree | e4c12b348f5cc115d96ed38a1b71a9e47e593ed0 /lib/gitlab/database.rb | |
parent | 6733a7a15ceefcf4802e44f96d66a9ddd7881635 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/database.rb')
-rw-r--r-- | lib/gitlab/database.rb | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/lib/gitlab/database.rb b/lib/gitlab/database.rb index b4edc363a59..77d7d7e19c1 100644 --- a/lib/gitlab/database.rb +++ b/lib/gitlab/database.rb @@ -161,24 +161,6 @@ module Gitlab end end - def self.nulls_order(field, direction = :asc, nulls_order = :nulls_last) - raise ArgumentError unless [:nulls_last, :nulls_first].include?(nulls_order) - raise ArgumentError unless [:asc, :desc].include?(direction) - - case nulls_order - when :nulls_last then nulls_last_order(field, direction) - when :nulls_first then nulls_first_order(field, direction) - end - end - - def self.nulls_last_order(field, direction = 'ASC') - Arel.sql("#{field} #{direction} NULLS LAST") - end - - def self.nulls_first_order(field, direction = 'ASC') - Arel.sql("#{field} #{direction} NULLS FIRST") - end - def self.random "RANDOM()" end |