CartoDB-SQL-API/app/models/formats
2017-04-18 12:15:47 +02:00
..
ogr Added regexp for the test to matches both 0.10 and 6.X node version 2017-04-18 12:15:47 +02:00
pg Closes stream responses on error 2015-05-13 18:15:38 +02:00
index.js Format files split into pg and ogr directories 2015-05-13 15:15:53 +02:00
ogr.js Retur a proper error message when ogr2ogr command fails 2017-04-18 11:40:37 +02:00
pg.js Handle query end in error listener since pg no longer emits end if and error occurs 2016-12-07 16:22:21 +01:00
README Remove last bit of hard-coded format names from app controller 2013-09-05 17:10:48 +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.