CartoDB-SQL-API/app/models/formats/csv.js

18 lines
391 B
JavaScript
Raw Normal View History

var ogr = require('./ogr');
2013-05-16 17:24:52 +08:00
function csv() {}
2013-05-16 17:24:52 +08:00
csv.prototype = new ogr('csv');
2013-05-16 17:24:52 +08:00
var p = csv.prototype;
2013-05-16 17:24:52 +08:00
p._contentType = "text/csv; charset=utf-8; header=present";
p._fileExtension = "csv";
2013-05-16 17:24:52 +08:00
p.generate = function(options, callback) {
2013-05-16 17:24:52 +08:00
var o = options;
this.toOGR_SingleFile(o.database, o.user_id, o.gn, o.sql, o.skipfields, 'CSV', 'csv', callback);
2013-05-16 17:24:52 +08:00
};
module.exports = csv;