add test for third-party call

This commit is contained in:
John Krauss
2017-01-10 21:55:48 +00:00
parent bc4f1b5909
commit c2dc4fb8b9
2 changed files with 10 additions and 0 deletions

View File

@@ -105,3 +105,6 @@ t
obs_getmeasurebyid_null_id
t
(1 row)
obs_getdata_api
t
(1 row)

View File

@@ -216,3 +216,10 @@ SELECT cdb_observatory.OBS_GetMeasureById(
'us.census.tiger.block_group',
'2010 - 2014'
) IS NULL As OBS_GetMeasureById_null_id;
-- OBS_GetData with an API
SELECT ARRAY['us.census.tiger.census_tract'] <@ array_agg(data->0->>'value') AS OBS_GetData_API
FROM cdb_observatory.obs_getdata(array[(cdb_observatory._testarea(), 1)::geomval],
'[{"numer_coltype": "text", "numer_colname": "boundary_id", "numer_tablename": "cdb_observatory.obs_getavailableboundaries", "geom_tablename": "cdb_observatory.obs_getavailableboundaries", "geom_geomref_colname": "boundary_id"}]',
false);