Commit f8a1de50 authored by Julien Cristau's avatar Julien Cristau
Browse files

add ST_EXTENT aggregate function

parent c20dff50fee3
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
# psql <database> -f /usr/share/postgresql/9.1/contrib/postgis-1.5/spatial_ref_sys.sql # psql <database> -f /usr/share/postgresql/9.1/contrib/postgis-1.5/spatial_ref_sys.sql
# cubicweb-ctl db-init <instance> # cubicweb-ctl db-init <instance>
from logilab.database import FunctionDescr from logilab.database import FunctionDescr, AggrFunctionDescr
from logilab.database import get_db_helper from logilab.database import get_db_helper
from logilab.database.sqlgen import SQLExpression from logilab.database.sqlgen import SQLExpression
...@@ -302,6 +302,11 @@ class ST_M(FunctionDescr): ...@@ -302,6 +302,11 @@ class ST_M(FunctionDescr):
rtype = 'Float' rtype = 'Float'
class ST_EXTENT(AggrFunctionDescr):
supported_backends = ('postgres',)
rtype = 'Geometry'
register_function(ST_EQUALS) register_function(ST_EQUALS)
register_function(ST_INTERSECTS) register_function(ST_INTERSECTS)
register_function(ST_INTERSECTION) register_function(ST_INTERSECTION)
...@@ -337,3 +342,4 @@ register_function(ST_X) ...@@ -337,3 +342,4 @@ register_function(ST_X)
register_function(ST_Y) register_function(ST_Y)
register_function(ST_Z) register_function(ST_Z)
register_function(ST_M) register_function(ST_M)
register_function(ST_EXTENT)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment