Commit 690170a8 authored by Claude Paroz's avatar Claude Paroz
Browse files

Removed unused quoting/encoding in gis db backend

parent 7e5ebcce
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -90,8 +90,6 @@ class BaseSpatialOperations(object):

    # For quoting column values, rather than columns.
    def geo_quote_name(self, name):
        if isinstance(name, six.text_type):
            name = name.encode('ascii')
        return "'%s'" % name

    # GeometryField operations
+0 −14
Original line number Diff line number Diff line
@@ -3,20 +3,6 @@ A collection of utility routines and classes used by the spatial
backends.
"""

from django.utils import six

def gqn(val):
    """
    The geographic quote name function; used for quoting tables and
    geometries (they use single rather than the double quotes of the
    backend quotename function).
    """
    if isinstance(val, six.string_types):
        if isinstance(val, six.text_type): val = val.encode('ascii')
        return "'%s'" % val
    else:
        return str(val)

class SpatialOperation(object):
    """
    Base class for generating spatial SQL.