From 46d630a2c0e144351b834b8465a7878d51e8ff6c Mon Sep 17 00:00:00 2001 From: mdipierro Date: Sun, 8 Dec 2013 08:26:00 -0600 Subject: [PATCH] ST_DWithin for postgres --- VERSION | 2 +- gluon/dal.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 4ed1ee08..3ea3d0a0 100644 --- a/VERSION +++ b/VERSION @@ -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 diff --git a/gluon/dal.py b/gluon/dal.py index 94a16620..63f76304 100644 --- a/gluon/dal.py +++ b/gluon/dal.py @@ -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'):