Skip to content
Snippets Groups Projects
Commit 564d70a2 authored by Alex Reisner's avatar Alex Reisner
Browse files

Revert "Merge pull request #637 from jzelenkov/fix-postgres-oid"

This reverts commit 1098046f, reversing
changes made to 8c066874.
parent 7d4a01c1
No related branches found
No related tags found
No related merge requests found
......@@ -196,19 +196,11 @@ module Geocoder::Store
end
if distance
clause += ", " unless clause.empty?
if using_postgresql?
clause += "'#{distance}'::character(255) AS #{distance_column}"
else
clause += "#{distance} AS #{distance_column}"
end
clause += "#{distance} AS #{distance_column}"
end
if bearing
clause += ", " unless clause.empty?
if using_postgresql?
clause += "'#{bearing}'::character(255) AS #{bearing_column}"
else
clause += "#{bearing} AS #{bearing_column}"
end
clause += "#{bearing} AS #{bearing_column}"
end
clause
end
......@@ -230,10 +222,6 @@ module Geocoder::Store
connection.adapter_name.match(/sqlite/i)
end
def using_postgresql?
connection.adapter_name.match(/postgres/i)
end
##
# Value which can be passed to where() to produce no results.
#
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment