summaryrefslogtreecommitdiff
path: root/lib/gitlab/database.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/database.rb')
-rw-r--r--lib/gitlab/database.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/gitlab/database.rb b/lib/gitlab/database.rb
index d160cadc2d0..f3f417c1a63 100644
--- a/lib/gitlab/database.rb
+++ b/lib/gitlab/database.rb
@@ -24,7 +24,7 @@ module Gitlab
def self.nulls_last_order(field, direction = 'ASC')
order = "#{field} #{direction}"
- if Gitlab::Database.postgresql?
+ if postgresql?
order << ' NULLS LAST'
else
# `field IS NULL` will be `0` for non-NULL columns and `1` for NULL
@@ -38,7 +38,7 @@ module Gitlab
def self.nulls_first_order(field, direction = 'ASC')
order = "#{field} #{direction}"
- if Gitlab::Database.postgresql?
+ if postgresql?
order << ' NULLS FIRST'
else
# `field IS NULL` will be `0` for non-NULL columns and `1` for NULL
@@ -50,7 +50,7 @@ module Gitlab
end
def self.random
- Gitlab::Database.postgresql? ? "RANDOM()" : "RAND()"
+ postgresql? ? "RANDOM()" : "RAND()"
end
def true_value