ST_DWithin for postgres

This commit is contained in:
mdipierro
2013-12-08 08:26:00 -06:00
parent 09277868d2
commit 46d630a2c0
2 changed files with 7 additions and 1 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.8.2-stable+timestamp.2013.12.07.20.46.12
Version 2.8.2-stable+timestamp.2013.12.08.08.24.55
+6
View File
@@ -2976,6 +2976,12 @@ class PostgreSQLAdapter(BaseAdapter):
"""
return 'ST_Within(%s,%s)' %(self.expand(first), self.expand(second, first.type))
def ST_DWITHIN(self, first, second):
"""
http://postgis.org/docs/ST_Within.html
"""
return 'ST_DWithin(%s,%s)' %(self.expand(first), self.expand(second, first.type))
def represent(self, obj, fieldtype):
field_is_type = fieldtype.startswith
if field_is_type('geo'):