-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #375 from CartoDB/development
Release server 0.24.2 and python library 0.15.1
- Loading branch information
Showing
15 changed files
with
3,106 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
server/extension/cdb_dataservices_server--0.24.1--0.24.2.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--DO NOT MODIFY THIS FILE, IT IS GENERATED AUTOMATICALLY FROM SOURCES | ||
-- Complain if script is sourced in psql, rather than via CREATE EXTENSION | ||
\echo Use "ALTER EXTENSION cdb_dataservices_server UPDATE TO '0.24.2'" to load this file. \quit | ||
|
||
-- HERE goes your code to upgrade/downgrade | ||
---- cdb_geocode_namedplace_point(city_name text) | ||
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_geocode_namedplace_point(username text, orgname text, city_name text) | ||
RETURNS Geometry AS $$ | ||
import spiexceptions | ||
try: | ||
mapzen_plan = plpy.prepare("SELECT cdb_dataservices_server._cdb_mapzen_geocode_namedplace($1, $2, $3) as point;", ["text", "text", "text"]) | ||
return plpy.execute(mapzen_plan, [username, orgname, city_name])[0]['point'] | ||
except spiexceptions.ExternalRoutineException as e: | ||
internal_plan = plpy.prepare("SELECT cdb_dataservices_server._cdb_internal_geocode_namedplace($1, $2, $3) as point;", ["text", "text", "text"]) | ||
return plpy.execute(internal_plan, [username, orgname, city_name])[0]['point'] | ||
$$ LANGUAGE plpythonu; | ||
|
||
---- cdb_geocode_namedplace_point(city_name text, country_name text) | ||
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_geocode_namedplace_point(username text, orgname text, city_name text, country_name text) | ||
RETURNS Geometry AS $$ | ||
import spiexceptions | ||
try: | ||
mapzen_plan = plpy.prepare("SELECT cdb_dataservices_server._cdb_mapzen_geocode_namedplace($1, $2, $3, NULL, $4) as point;", ["text", "text", "text", "text"]) | ||
return plpy.execute(mapzen_plan, [username, orgname, city_name, country_name])[0]['point'] | ||
except spiexceptions.ExternalRoutineException as e: | ||
internal_plan = plpy.prepare("SELECT cdb_dataservices_server._cdb_internal_geocode_namedplace($1, $2, $3, NULL, $4) as point;", ["text", "text", "text", "text"]) | ||
return plpy.execute(internal_plan, [username, orgname, city_name, country_name])[0]['point'] | ||
$$ LANGUAGE plpythonu; | ||
|
||
---- cdb_geocode_namedplace_point(city_name text, admin1_name text, country_name text) | ||
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_geocode_namedplace_point(username text, orgname text, city_name text, admin1_name text, country_name text) | ||
RETURNS Geometry AS $$ | ||
import spiexceptions | ||
try: | ||
mapzen_plan = plpy.prepare("SELECT cdb_dataservices_server._cdb_mapzen_geocode_namedplace($1, $2, $3, $4, $5) as point;", ["text", "text", "text", "text", "text"]) | ||
return plpy.execute(mapzen_plan, [username, orgname, city_name, admin1_name, country_name])[0]['point'] | ||
except spiexceptions.ExternalRoutineException as e: | ||
internal_plan = plpy.prepare("SELECT cdb_dataservices_server._cdb_internal_geocode_namedplace($1, $2, $3, $4, $5) as point;", ["text", "text", "text", "text", "text"]) | ||
return plpy.execute(internal_plan, [username, orgname, city_name, admin1_name, country_name])[0]['point'] | ||
$$ LANGUAGE plpythonu; |
36 changes: 36 additions & 0 deletions
36
server/extension/cdb_dataservices_server--0.24.2--0.24.1.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--DO NOT MODIFY THIS FILE, IT IS GENERATED AUTOMATICALLY FROM SOURCES | ||
-- Complain if script is sourced in psql, rather than via CREATE EXTENSION | ||
\echo Use "ALTER EXTENSION cdb_dataservices_server UPDATE TO '0.24.1'" to load this file. \quit | ||
|
||
-- HERE goes your code to upgrade/downgrade | ||
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_geocode_namedplace_point(username text, orgname text, city_name text) | ||
RETURNS Geometry AS $$ | ||
try: | ||
mapzen_plan = plpy.prepare("SELECT cdb_dataservices_server._cdb_mapzen_geocode_namedplace($1, $2, $3) as point;", ["text", "text", "text"]) | ||
return plpy.execute(mapzen_plan, [username, orgname, city_name])[0]['point'] | ||
except BaseException as e: | ||
internal_plan = plpy.prepare("SELECT cdb_dataservices_server._cdb_internal_geocode_namedplace($1, $2, $3) as point;", ["text", "text", "text"]) | ||
return plpy.execute(internal_plan, [username, orgname, city_name])[0]['point'] | ||
$$ LANGUAGE plpythonu; | ||
|
||
---- cdb_geocode_namedplace_point(city_name text, country_name text) | ||
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_geocode_namedplace_point(username text, orgname text, city_name text, country_name text) | ||
RETURNS Geometry AS $$ | ||
try: | ||
mapzen_plan = plpy.prepare("SELECT cdb_dataservices_server._cdb_mapzen_geocode_namedplace($1, $2, $3, NULL, $4) as point;", ["text", "text", "text", "text"]) | ||
return plpy.execute(mapzen_plan, [username, orgname, city_name, country_name])[0]['point'] | ||
except BaseException as e: | ||
internal_plan = plpy.prepare("SELECT cdb_dataservices_server._cdb_internal_geocode_namedplace($1, $2, $3, NULL, $4) as point;", ["text", "text", "text", "text"]) | ||
return plpy.execute(internal_plan, [username, orgname, city_name, country_name])[0]['point'] | ||
$$ LANGUAGE plpythonu; | ||
|
||
---- cdb_geocode_namedplace_point(city_name text, admin1_name text, country_name text) | ||
CREATE OR REPLACE FUNCTION cdb_dataservices_server.cdb_geocode_namedplace_point(username text, orgname text, city_name text, admin1_name text, country_name text) | ||
RETURNS Geometry AS $$ | ||
try: | ||
mapzen_plan = plpy.prepare("SELECT cdb_dataservices_server._cdb_mapzen_geocode_namedplace($1, $2, $3, $4, $5) as point;", ["text", "text", "text", "text", "text"]) | ||
return plpy.execute(mapzen_plan, [username, orgname, city_name, admin1_name, country_name])[0]['point'] | ||
except BaseException as e: | ||
internal_plan = plpy.prepare("SELECT cdb_dataservices_server._cdb_internal_geocode_namedplace($1, $2, $3, $4, $5) as point;", ["text", "text", "text", "text", "text"]) | ||
return plpy.execute(internal_plan, [username, orgname, city_name, admin1_name, country_name])[0]['point'] | ||
$$ LANGUAGE plpythonu; |
Oops, something went wrong.