Removed appname parameter
This commit is contained in:
parent
3d42281d2a
commit
49bcf31832
@ -18,16 +18,16 @@ RETURNS SETOF cdb_dataservices_server.isoline AS $$
|
|||||||
|
|
||||||
with metrics('cdb_isodistance', user_isolines_config, logger, params):
|
with metrics('cdb_isodistance', user_isolines_config, logger, params):
|
||||||
if user_isolines_config.heremaps_provider:
|
if user_isolines_config.heremaps_provider:
|
||||||
here_plan = plpy.prepare("SELECT * FROM cdb_dataservices_server.cdb_here_isodistance($1, $2, $3, $4, $5, $6, $7) as isoline; ", ["text", "text", "geometry(geometry, 4326)", "text", "integer[]", "text[]"])
|
here_plan = plpy.prepare("SELECT * FROM cdb_dataservices_server.cdb_here_isodistance($1, $2, $3, $4, $5, $6) as isoline; ", ["text", "text", "geometry(geometry, 4326)", "text", "integer[]", "text[]"])
|
||||||
return plpy.execute(here_plan, [username, orgname, source, mode, range, options])
|
return plpy.execute(here_plan, [username, orgname, source, mode, range, options])
|
||||||
elif user_isolines_config.mapzen_provider:
|
elif user_isolines_config.mapzen_provider:
|
||||||
mapzen_plan = plpy.prepare("SELECT * FROM cdb_dataservices_server.cdb_mapzen_isodistance($1, $2, $3, $4, $5, $6, $7) as isoline; ", ["text", "text", "geometry(geometry, 4326)", "text", "integer[]", "text[]"])
|
mapzen_plan = plpy.prepare("SELECT * FROM cdb_dataservices_server.cdb_mapzen_isodistance($1, $2, $3, $4, $5, $6) as isoline; ", ["text", "text", "geometry(geometry, 4326)", "text", "integer[]", "text[]"])
|
||||||
return plpy.execute(mapzen_plan, [username, orgname, source, mode, range, options])
|
return plpy.execute(mapzen_plan, [username, orgname, source, mode, range, options])
|
||||||
elif user_isolines_config.mapbox_provider:
|
elif user_isolines_config.mapbox_provider:
|
||||||
mapbox_plan = plpy.prepare("SELECT * FROM cdb_dataservices_server.cdb_mapbox_isodistance($1, $2, $3, $4, $5, $6, $7) as isoline; ", ["text", "text", "geometry(geometry, 4326)", "text", "integer[]", "text[]"])
|
mapbox_plan = plpy.prepare("SELECT * FROM cdb_dataservices_server.cdb_mapbox_isodistance($1, $2, $3, $4, $5, $6) as isoline; ", ["text", "text", "geometry(geometry, 4326)", "text", "integer[]", "text[]"])
|
||||||
return plpy.execute(mapbox_plan, [username, orgname, source, mode, range, options])
|
return plpy.execute(mapbox_plan, [username, orgname, source, mode, range, options])
|
||||||
elif user_isolines_config.tomtom_provider:
|
elif user_isolines_config.tomtom_provider:
|
||||||
tomtom_plan = plpy.prepare("SELECT * FROM cdb_dataservices_server.cdb_tomtom_isodistance($1, $2, $3, $4, $5, $6, $7) as isoline; ", ["text", "text", "geometry(geometry, 4326)", "text", "integer[]", "text[]"])
|
tomtom_plan = plpy.prepare("SELECT * FROM cdb_dataservices_server.cdb_tomtom_isodistance($1, $2, $3, $4, $5, $6) as isoline; ", ["text", "text", "geometry(geometry, 4326)", "text", "integer[]", "text[]"])
|
||||||
return plpy.execute(tomtom_plan, [username, orgname, source, mode, range, options])
|
return plpy.execute(tomtom_plan, [username, orgname, source, mode, range, options])
|
||||||
else:
|
else:
|
||||||
raise Exception('Requested isolines provider is not available')
|
raise Exception('Requested isolines provider is not available')
|
||||||
|
@ -18,16 +18,16 @@ RETURNS SETOF cdb_dataservices_server.isoline AS $$
|
|||||||
|
|
||||||
with metrics('cdb_isochrone', user_isolines_config, logger, params):
|
with metrics('cdb_isochrone', user_isolines_config, logger, params):
|
||||||
if user_isolines_config.heremaps_provider:
|
if user_isolines_config.heremaps_provider:
|
||||||
here_plan = plpy.prepare("SELECT * FROM cdb_dataservices_server.cdb_here_isochrone($1, $2, $3, $4, $5, $6, $7) as isoline; ", ["text", "text", "geometry(geometry, 4326)", "text", "integer[]", "text[]"])
|
here_plan = plpy.prepare("SELECT * FROM cdb_dataservices_server.cdb_here_isochrone($1, $2, $3, $4, $5, $6) as isoline; ", ["text", "text", "geometry(geometry, 4326)", "text", "integer[]", "text[]"])
|
||||||
return plpy.execute(here_plan, [username, orgname, source, mode, range, options])
|
return plpy.execute(here_plan, [username, orgname, source, mode, range, options])
|
||||||
elif user_isolines_config.mapzen_provider:
|
elif user_isolines_config.mapzen_provider:
|
||||||
mapzen_plan = plpy.prepare("SELECT * FROM cdb_dataservices_server.cdb_mapzen_isochrone($1, $2, $3, $4, $5, $6, $7) as isoline; ", ["text", "text", "geometry(geometry, 4326)", "text", "integer[]", "text[]"])
|
mapzen_plan = plpy.prepare("SELECT * FROM cdb_dataservices_server.cdb_mapzen_isochrone($1, $2, $3, $4, $5, $6) as isoline; ", ["text", "text", "geometry(geometry, 4326)", "text", "integer[]", "text[]"])
|
||||||
return plpy.execute(mapzen_plan, [username, orgname, source, mode, range, options])
|
return plpy.execute(mapzen_plan, [username, orgname, source, mode, range, options])
|
||||||
elif user_isolines_config.mapbox_provider:
|
elif user_isolines_config.mapbox_provider:
|
||||||
mapbox_plan = plpy.prepare("SELECT * FROM cdb_dataservices_server.cdb_mapbox_isochrone($1, $2, $3, $4, $5, $6, $7) as isoline; ", ["text", "text", "geometry(geometry, 4326)", "text", "integer[]", "text[]"])
|
mapbox_plan = plpy.prepare("SELECT * FROM cdb_dataservices_server.cdb_mapbox_isochrone($1, $2, $3, $4, $5, $6) as isoline; ", ["text", "text", "geometry(geometry, 4326)", "text", "integer[]", "text[]"])
|
||||||
return plpy.execute(mapbox_plan, [username, orgname, source, mode, range, options])
|
return plpy.execute(mapbox_plan, [username, orgname, source, mode, range, options])
|
||||||
elif user_isolines_config.tomtom_provider:
|
elif user_isolines_config.tomtom_provider:
|
||||||
tomtom_plan = plpy.prepare("SELECT * FROM cdb_dataservices_server.cdb_tomtom_isochrone($1, $2, $3, $4, $5, $6, $7) as isoline; ", ["text", "text", "geometry(geometry, 4326)", "text", "integer[]", "text[]"])
|
tomtom_plan = plpy.prepare("SELECT * FROM cdb_dataservices_server.cdb_tomtom_isochrone($1, $2, $3, $4, $5, $6) as isoline; ", ["text", "text", "geometry(geometry, 4326)", "text", "integer[]", "text[]"])
|
||||||
return plpy.execute(tomtom_plan, [username, orgname, source, mode, range, options])
|
return plpy.execute(tomtom_plan, [username, orgname, source, mode, range, options])
|
||||||
else:
|
else:
|
||||||
raise Exception('Requested isolines provider is not available')
|
raise Exception('Requested isolines provider is not available')
|
||||||
|
@ -6,7 +6,7 @@ DELETE FROM available_services;
|
|||||||
DELETE FROM admin0_synonyms;
|
DELETE FROM admin0_synonyms;
|
||||||
-- Check that the public function is callable, even with no data
|
-- Check that the public function is callable, even with no data
|
||||||
-- It should return NULL
|
-- It should return NULL
|
||||||
SELECT cdb_dataservices_server.cdb_geocode_postalcode_point('test_user', 'test_org', 'test_app', '03204');
|
SELECT cdb_dataservices_server.cdb_geocode_postalcode_point('test_user', 'test_org', '03204');
|
||||||
cdb_geocode_postalcode_point
|
cdb_geocode_postalcode_point
|
||||||
------------------------------
|
------------------------------
|
||||||
|
|
||||||
|
@ -29,6 +29,13 @@ SELECT cdb_dataservices_server.cdb_geocode_namedplace_point('test_user', 'test_o
|
|||||||
SELECT cdb_dataservices_server.cdb_geocode_namedplace_point('test_user', 'test_orgname', 'Elche', 'valencia', 'Spain');
|
SELECT cdb_dataservices_server.cdb_geocode_namedplace_point('test_user', 'test_orgname', 'Elche', 'valencia', 'Spain');
|
||||||
|
|
||||||
-- Check for namedplaces signatures
|
-- Check for namedplaces signatures
|
||||||
|
SELECT exists(SELECT *
|
||||||
|
FROM pg_proc p
|
||||||
|
INNER JOIN pg_namespace ns ON (p.pronamespace = ns.oid)
|
||||||
|
WHERE ns.nspname = 'cdb_dataservices_server'
|
||||||
|
AND proname = 'cdb_geocode_namedplace_point'
|
||||||
|
AND oidvectortypes(p.proargtypes) = 'text, text, text');
|
||||||
|
|
||||||
SELECT exists(SELECT *
|
SELECT exists(SELECT *
|
||||||
FROM pg_proc p
|
FROM pg_proc p
|
||||||
INNER JOIN pg_namespace ns ON (p.pronamespace = ns.oid)
|
INNER JOIN pg_namespace ns ON (p.pronamespace = ns.oid)
|
||||||
@ -41,14 +48,7 @@ SELECT exists(SELECT *
|
|||||||
INNER JOIN pg_namespace ns ON (p.pronamespace = ns.oid)
|
INNER JOIN pg_namespace ns ON (p.pronamespace = ns.oid)
|
||||||
WHERE ns.nspname = 'cdb_dataservices_server'
|
WHERE ns.nspname = 'cdb_dataservices_server'
|
||||||
AND proname = 'cdb_geocode_namedplace_point'
|
AND proname = 'cdb_geocode_namedplace_point'
|
||||||
AND oidvectortypes(p.proargtypes) = 'text, text, text, text, text');
|
AND oidvectortypes(p.proargtypes) = 'text, text, text, text');
|
||||||
|
|
||||||
SELECT exists(SELECT *
|
|
||||||
FROM pg_proc p
|
|
||||||
INNER JOIN pg_namespace ns ON (p.pronamespace = ns.oid)
|
|
||||||
WHERE ns.nspname = 'cdb_dataservices_server'
|
|
||||||
AND proname = 'cdb_geocode_namedplace_point'
|
|
||||||
AND oidvectortypes(p.proargtypes) = 'text, text, text, text, text');
|
|
||||||
|
|
||||||
SELECT exists(SELECT *
|
SELECT exists(SELECT *
|
||||||
FROM pg_proc p
|
FROM pg_proc p
|
||||||
|
@ -7,7 +7,7 @@ DELETE FROM admin0_synonyms;
|
|||||||
|
|
||||||
-- Check that the public function is callable, even with no data
|
-- Check that the public function is callable, even with no data
|
||||||
-- It should return NULL
|
-- It should return NULL
|
||||||
SELECT cdb_dataservices_server.cdb_geocode_postalcode_point('test_user', 'test_org', 'test_app', '03204');
|
SELECT cdb_dataservices_server.cdb_geocode_postalcode_point('test_user', 'test_org', '03204');
|
||||||
|
|
||||||
-- Insert dummy data into ip_address_locations
|
-- Insert dummy data into ip_address_locations
|
||||||
INSERT INTO global_postal_code_points (the_geom, iso3, postal_code, postal_code_num) VALUES (
|
INSERT INTO global_postal_code_points (the_geom, iso3, postal_code, postal_code_num) VALUES (
|
||||||
|
Loading…
Reference in New Issue
Block a user