fixed st_x and st_y, thanks Paolo Valleri
This commit is contained in:
@@ -1 +1 @@
|
|||||||
Version 2.4.1-alpha.2+timestamp.2013.01.07.10.33.48
|
Version 2.4.1-alpha.2+timestamp.2013.01.08.08.48.34
|
||||||
|
|||||||
@@ -2582,6 +2582,18 @@ class PostgreSQLAdapter(BaseAdapter):
|
|||||||
"""
|
"""
|
||||||
return 'ST_AsText(%s)' %(self.expand(first))
|
return 'ST_AsText(%s)' %(self.expand(first))
|
||||||
|
|
||||||
|
def ST_X(self, first):
|
||||||
|
"""
|
||||||
|
http://postgis.org/docs/ST_X.html
|
||||||
|
"""
|
||||||
|
return 'ST_X(%s)' %(self.expand(first))
|
||||||
|
|
||||||
|
def ST_Y(self, first):
|
||||||
|
"""
|
||||||
|
http://postgis.org/docs/ST_Y.html
|
||||||
|
"""
|
||||||
|
return 'ST_Y(%s)' %(self.expand(first))
|
||||||
|
|
||||||
def ST_CONTAINS(self, first, second):
|
def ST_CONTAINS(self, first, second):
|
||||||
"""
|
"""
|
||||||
http://postgis.org/docs/ST_Contains.html
|
http://postgis.org/docs/ST_Contains.html
|
||||||
@@ -8417,6 +8429,14 @@ class Expression(object):
|
|||||||
db = self.db
|
db = self.db
|
||||||
return Expression(db, db._adapter.ST_ASTEXT, self, type='string')
|
return Expression(db, db._adapter.ST_ASTEXT, self, type='string')
|
||||||
|
|
||||||
|
def st_x(self):
|
||||||
|
db = self.db
|
||||||
|
return Expression(db, db._adapter.ST_X, self, type='string')
|
||||||
|
|
||||||
|
def st_y(self):
|
||||||
|
db = self.db
|
||||||
|
return Expression(db, db._adapter.ST_Y, self, type='string')
|
||||||
|
|
||||||
def st_distance(self, other):
|
def st_distance(self, other):
|
||||||
db = self.db
|
db = self.db
|
||||||
return Expression(db,db._adapter.ST_DISTANCE,self,other, 'double')
|
return Expression(db,db._adapter.ST_DISTANCE,self,other, 'double')
|
||||||
|
|||||||
Reference in New Issue
Block a user