mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Fixed #12690 -- Fixed SQL template used for Oracle's with SDO_RELATE function, added truncate_params attribute to spatial backend, and re-enabled the relate lookup tests. Thanks, jtiai, for the bug report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12300 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -57,7 +57,7 @@ class SDORelate(SpatialFunction):
|
||||
"Class for using SDO_RELATE."
|
||||
masks = 'TOUCH|OVERLAPBDYDISJOINT|OVERLAPBDYINTERSECT|EQUAL|INSIDE|COVEREDBY|CONTAINS|COVERS|ANYINTERACT|ON'
|
||||
mask_regex = re.compile(r'^(%s)(\+(%s))*$' % (masks, masks), re.I)
|
||||
sql_template = "%(function)s(%(geo_col)s, %(geometry)s, 'mask=%(mask)s)' = 'TRUE'"
|
||||
sql_template = "%(function)s(%(geo_col)s, %(geometry)s, 'mask=%(mask)s') = 'TRUE'"
|
||||
relate_func = 'SDO_RELATE'
|
||||
def __init__(self, mask):
|
||||
if not self.mask_regex.match(mask):
|
||||
@@ -128,6 +128,8 @@ class OracleOperations(DatabaseOperations, BaseSpatialOperations):
|
||||
gis_terms += geometry_functions.keys()
|
||||
gis_terms = dict([(term, None) for term in gis_terms])
|
||||
|
||||
truncate_params = {'relate' : None}
|
||||
|
||||
def __init__(self, connection):
|
||||
super(OracleOperations, self).__init__()
|
||||
self.connection = connection
|
||||
|
||||
Reference in New Issue
Block a user