CartoDB-SQL-API/app/models/formats/csv.js
Sandro Santilli 4a5c9b0eed Refactor OGR class interface to improve flexibility
The toOGR and toOGR_SingleFile function now take an "options"
object rather than a long list of arguments. This allows for
easier extension toward per-user database host and password
(see tickets #120 and #121)
2013-11-15 13:24:48 +01:00

17 lines
322 B
JavaScript

var ogr = require('./ogr');
function csv() {}
csv.prototype = new ogr('csv');
var p = csv.prototype;
p._contentType = "text/csv; charset=utf-8; header=present";
p._fileExtension = "csv";
p.generate = function(options, callback) {
this.toOGR_SingleFile(options, 'CSV', callback);
};
module.exports = csv;