npm install cartodb-tools --save
some tools for working with cartodb, for now works only with api keys.
API is shamelessly copied from KNEX as is much of the code, see the documentation over their for details, currently does not support table creation.
One difference is that geojson geometries are treated as such and converted to
geometries appropriate to the
the_geom field in cartodb.
var cartodb = 'username' 'api-key';;
var cartodb = 'username' 'api-key'cartodb;// available options are `create` to create a new table
the query object has a few cartodb specific methods
the batch method will use the carto batch api method for doing the query, since this will never return results don't use it for selects, though you can if you want it's just kinda pointless
you can also use the .onSuccess or .onError method to run those queries if the first one failed or succeeded
By default raw queries are wrapped in a transaction, use
.noTransaction() to avoid this, useful for queries that can't be in transactions