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

Revert "Merge pull request #628 from jzelenkov/fix-postresql-oid"

This reverts commit 2a29613a, reversing
changes made to c5c45940.
parent 1a7aa608
No related branches found
No related tags found
No related merge requests found
......@@ -194,16 +194,13 @@ module Geocoder::Store
else
clause = (columns || full_column_name("*"))
end
identifierType = using_postgresql? ? "::character(255)" : ""
if distance
clause += ", " unless clause.empty?
clause += "'#{distance}'#{identifierType} AS #{distance_column}"
clause += "#{distance} AS #{distance_column}"
end
if bearing
clause += ", " unless clause.empty?
clause += "'#{bearing}'#{identifierType} AS #{bearing_column}"
clause += "#{bearing} AS #{bearing_column}"
end
clause
end
......@@ -225,11 +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