Compare commits
14 Commits
python-0.1
...
0.14.1-cli
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
439f604a04 | ||
|
|
9791a5bada | ||
|
|
629555e193 | ||
|
|
af993fde55 | ||
|
|
4be6c9f31d | ||
|
|
ed1386d571 | ||
|
|
18df3368ef | ||
|
|
6e134d1ea6 | ||
|
|
59ae4a5492 | ||
|
|
b3e67afd92 | ||
|
|
5b8fd70bdd | ||
|
|
55a467f2df | ||
|
|
0adb5164d7 | ||
|
|
147e0ab567 |
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.
|
||||||
@@ -46,5 +46,7 @@ cd $(git rev-parse --show-toplevel)/test
|
|||||||
python run_tests.py --host=$YOUR_HOST $YOUR_USERNAME $YOUR_API_KEY
|
python run_tests.py --host=$YOUR_HOST $YOUR_USERNAME $YOUR_API_KEY
|
||||||
```
|
```
|
||||||
|
|
||||||
## TODO
|
## Versioning
|
||||||
- Move dependencies expressed in `requirements.txt` to `setup.py`
|
Once you're satisfied with your changes, it is time to bump the version number in the `setup.py`. A couple of rules:
|
||||||
|
- **Backwards compatibility**: in general all changes shall be backwards compatible. Do not remove any code used from the server public `pl/python` functions or you'll run into problems when deploying.
|
||||||
|
- **Semantic versioning**: we try to stick to [Semantic Versioning 2.0.0](http://semver.org/spec/v2.0.0.html)
|
||||||
|
|||||||
Reference in New Issue
Block a user