Schema
Owner
postgres
Descriptions
There is no description for function _st_adjacentedges
Options
Option | Value |
---|---|
Returns |
integer [] |
Language |
|
Parameters |
atopology varchar anode integer anedge integer |
Definition
CREATE OR REPLACE FUNCTION topology._st_adjacentedges (
atopology varchar,
anode integer,
anedge integer
)
RETURNS integer [] AS
$span$
DECLARE
ret integer[];
BEGIN
WITH edgestar AS (
SELECT *, count(*) over () AS cnt
FROM topology.GetNodeEdges(atopology, anode)
)
SELECT ARRAY[ (
SELECT p.edge AS prev FROM edgestar p
WHERE p.sequence = CASE WHEN m.sequence-1 < 1 THEN cnt
ELSE m.sequence-1 END
), (
SELECT p.edge AS prev FROM edgestar p WHERE p.sequence = ((m.sequence)%cnt)+1
) ]
FROM edgestar m
WHERE edge = anedge
INTO ret;
RETURN ret;
END
$span$
LANGUAGE 'plpgsql'
STABLE
CALLED ON NULL INPUT
SECURITY INVOKER
COST 100;
This file was generated with SQL Manager for PostgreSQL (www.pgsqlmanager.com) at 13/03/2014 13:23 |