Merge branch 'development' into mapzen_services_use_quotas

Bring in client 0.14.1 release
This commit is contained in:
Javier Goizueta 2016-12-30 08:29:54 +01:00
commit 227c05bf70
10 changed files with 3826 additions and 1 deletions

View File

@ -0,0 +1,9 @@
--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_client UPDATE TO '0.14.1'" to load this file. \quit
-- Make sure we have a sane search path to create/update the extension
SET search_path = "$user",cartodb,public,cdb_dataservices_client;
-- This release introduces no changes other than the use of
-- search path in the install and migration scripts

View File

@ -0,0 +1,9 @@
--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_client UPDATE TO '0.14.0'" to load this file. \quit
-- Make sure we have a sane search path to create/update the extension
SET search_path = "$user",cartodb,public,cdb_dataservices_client;
-- This release introduces no changes other than the use of
-- search path in the install and migration scripts

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
comment = 'CartoDB dataservices client API extension'
default_version = '0.14.0'
default_version = '0.14.1'
requires = 'plproxy, cartodb'
superuser = true
schema = cdb_dataservices_client

View File

@ -1,3 +1,6 @@
--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 "CREATE EXTENSION cdb_dataservices_client" to load this file. \quit
-- Make sure we have a sane search path to create/update the extension
SET search_path = "$user",cartodb,public,cdb_dataservices_client;

View File

@ -2,4 +2,7 @@
-- Complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "ALTER EXTENSION cdb_dataservices_client UPDATE TO '<%= version %>'" to load this file. \quit
-- Make sure we have a sane search path to create/update the extension
SET search_path = "$user",cartodb,public,cdb_dataservices_client;
-- HERE goes your code to upgrade/downgrade

View File

@ -0,0 +1,36 @@
# Exception-Safe functions
The public API dataservices functions emit exceptions in general when an error occurs
or a limiting condition is met (e.g. quotas are exceeded).
For each public function `func` we have a internal function named `_func_exception_safe` which
acts as a wrapper to the public function, with the same signature, but captures
exceptions generated during its execution (except those due to incomplete configuration or
authentication issues) and returns NULL or empty set values in those cases.
Please note these functions are considered **not public** and therefore their API (including which exceptions are wrapped and which ones are not) may change.
Instead of raising an exception they raise warnings, hopefully containing the same information of the original exception.
## Intended Use
These functions are useful in cases when it is undesirable to rollback a transaction.
Fo example if a table is geocoded with:
```sql
UPDATE table SET the_geom=cdb_geocode_street_point(user,NULL,address,city,NULL,country);
```
In case of the user geocoding quota being exhausted mid-process, the user could
incur in external service expenses but any geocoded data would be lost due to the
transaction rollback.
We can avoid the problem using the corresponding exception-safe function:
```sql
UPDATE table SET the_geom=_cdb_geocode_street_point_exception_safe(user,NULL,address,city,NULL,country);
```
# Addition Information
See https://github.com/CartoDB/dataservices-api/issues/314 for more information.