Server: Categorize functions

Redis/Service functions declared as STATIC to avoid unneded calls
but it's really questionable if they trully are
This commit is contained in:
Raul Marin
2017-11-07 17:23:05 +01:00
parent 98206a3296
commit ff71a406ae
19 changed files with 88 additions and 88 deletions

View File

@@ -22,7 +22,7 @@ RETURNS cdb_dataservices_server.simple_route AS $$
mapzen_plan = plpy.prepare("SELECT * FROM cdb_dataservices_server._cdb_mapzen_route_with_waypoints($1, $2, $3, $4, $5, $6) as route;", ["text", "text", "geometry(Point, 4326)[]", "text", "text[]", "text"])
result = plpy.execute(mapzen_plan, [username, orgname, waypoints, mode, options, units])
return [result[0]['shape'],result[0]['length'], result[0]['duration']]
$$ LANGUAGE plpythonu;
$$ LANGUAGE plpythonu STABLE PARALLEL RESTRICTED;
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_route_with_waypoints(
@@ -47,4 +47,4 @@ RETURNS cdb_dataservices_server.simple_route AS $$
mapzen_plan = plpy.prepare("SELECT * FROM cdb_dataservices_server._cdb_mapzen_route_with_waypoints($1, $2, $3, $4, $5, $6) as route;", ["text", "text", "geometry(Point, 4326)[]", "text", "text[]", "text"])
result = plpy.execute(mapzen_plan, [username, orgname, waypoints, mode, options, units])
return [result[0]['shape'],result[0]['length'], result[0]['duration']]
$$ LANGUAGE plpythonu;
$$ LANGUAGE plpythonu STABLE PARALLEL RESTRICTED;