Commit 53760bb8 authored by Tiago Botelho's avatar Tiago Botelho

removes redundant code from gitlab database file

parent 2429a109
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment