CartoDB-SQL-API/app/models/formats
2014-11-13 11:18:00 +01:00
..
arraybuffer.js Unified naming for formats 2014-08-02 20:27:05 +02:00
csv.js Unified naming for formats 2014-08-02 20:27:05 +02:00
geojson.js Metrics revamp: removes and adds some metrics 2014-08-18 19:45:17 +02:00
index.js Unifying require for formats 2014-08-02 20:26:01 +02:00
json.js Use streaming for json responses. Number of buffered rows can be specified by config. 2014-07-31 02:17:07 +02:00
kml.js Unified naming for formats 2014-08-02 20:27:05 +02:00
ogr.js Removes tables=fake wadus param in ogr2ogr command so it can go to 2014-09-22 13:23:30 +02:00
pg.js Metrics revamp: removes and adds some metrics 2014-08-18 19:45:17 +02:00
README Remove last bit of hard-coded format names from app controller 2013-09-05 17:10:48 +02:00
shp.js Unified naming for formats 2014-08-02 20:27:05 +02:00
svg.js Order by dimension so it's possible to stream the rows as they come 2014-10-24 16:23:08 +02:00
topojson.js Fallback to nextTick for node v0.8, resolves #182 2014-11-13 11:18:00 +01: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.