Merge branch 'development' into mapzen_services_use_quotas
Bring in client 0.14.1 release
This commit is contained in:
commit
227c05bf70
9
client/cdb_dataservices_client--0.14.0--0.14.1.sql
Normal file
9
client/cdb_dataservices_client--0.14.0--0.14.1.sql
Normal 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
|
9
client/cdb_dataservices_client--0.14.1--0.14.0.sql
Normal file
9
client/cdb_dataservices_client--0.14.1--0.14.0.sql
Normal 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
|
3765
client/cdb_dataservices_client--0.14.1.sql
Normal file
3765
client/cdb_dataservices_client--0.14.1.sql
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
|||||||
comment = 'CartoDB dataservices client API extension'
|
comment = 'CartoDB dataservices client API extension'
|
||||||
default_version = '0.14.0'
|
default_version = '0.14.1'
|
||||||
requires = 'plproxy, cartodb'
|
requires = 'plproxy, cartodb'
|
||||||
superuser = true
|
superuser = true
|
||||||
schema = cdb_dataservices_client
|
schema = cdb_dataservices_client
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
--DO NOT MODIFY THIS FILE, IT IS GENERATED AUTOMATICALLY FROM SOURCES
|
--DO NOT MODIFY THIS FILE, IT IS GENERATED AUTOMATICALLY FROM SOURCES
|
||||||
-- Complain if script is sourced in psql, rather than via CREATE EXTENSION
|
-- Complain if script is sourced in psql, rather than via CREATE EXTENSION
|
||||||
\echo Use "CREATE EXTENSION cdb_dataservices_client" to load this file. \quit
|
\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;
|
||||||
|
@ -2,4 +2,7 @@
|
|||||||
-- Complain if script is sourced in psql, rather than via CREATE EXTENSION
|
-- 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
|
\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
|
-- HERE goes your code to upgrade/downgrade
|
||||||
|
36
doc/internal/exception_safe.md
Normal file
36
doc/internal/exception_safe.md
Normal 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.
|
Loading…
Reference in New Issue
Block a user