CartoDB-SQL-API/app/models/formats
Sandro Santilli 7f7ef682ac Improve recognition of non-standard field types names by db lookup
Closes #112.
Only looks up "geometry" and "raster" types for now, can be improved
over time.
2013-10-02 10:22:13 +02:00
..
arraybuffer.js Add arraybuffer format 2013-05-28 10:37:39 +02:00
csv.js Refactor format objects to expose a common stream-able interface 2013-05-28 10:36:15 +02:00
geojson.js Refactor format objects to expose a common stream-able interface 2013-05-28 10:36:15 +02:00
index.js Refactor format objects to expose a common stream-able interface 2013-05-28 10:36:15 +02:00
json.js Improve recognition of non-standard field types names by db lookup 2013-10-02 10:22:13 +02:00
kml.js Refactor format objects to expose a common stream-able interface 2013-05-28 10:36:15 +02:00
ogr.js Add note about why we want to skip querying geometry_columns 2013-09-30 10:43:32 +02:00
pg.js Improve recognition of non-standard field types names by db lookup 2013-10-02 10:22:13 +02:00
README Remove last bit of hard-coded format names from app controller 2013-09-05 17:10:48 +02:00
shp.js Do not hang up to queued request on ogr generation failure 2013-05-29 17:33:10 +02:00
svg.js Refactor format objects to expose a common stream-able interface 2013-05-28 10:36:15 +02:00
topojson.js Refactor format objects to expose a common stream-able interface 2013-05-28 10:36:15 +02:00

Format classes are required to expose a constructor with no arguments,
a getFileExtension() and a sendResponse(opts, callback) method.

The ``opts`` parameter contains:

 sink        Output stream to send the reponse to
 sql         SQL query requested by the user
 skipfields  Comma separate list of fields to skip from output
             really only needed with "SELECT *" queries
 gn          Name of the geometry column (for formats requiring one)
 dp          Number of decimal points of precision for geometries (if used)
 database    Name of the database to connect to
 user_id     Identifier of the user
 filename    Name to use for attachment disposition
 
The ``callback`` parameter is a function that is invoked when the
format object finished with sending the result to the sink.
If an error occurs the callback is invoked with an Error argument.