2013-05-27 17:21:56 +08:00
|
|
|
var ogr = require('./ogr');
|
2013-05-16 17:24:52 +08:00
|
|
|
|
2013-05-27 17:21:56 +08:00
|
|
|
function csv() {}
|
2013-05-16 17:24:52 +08:00
|
|
|
|
2013-05-27 17:21:56 +08:00
|
|
|
csv.prototype = new ogr('csv');
|
2013-05-16 17:24:52 +08:00
|
|
|
|
2013-05-27 17:21:56 +08:00
|
|
|
var p = csv.prototype;
|
2013-05-16 17:24:52 +08:00
|
|
|
|
2013-05-27 17:21:56 +08:00
|
|
|
p._contentType = "text/csv; charset=utf-8; header=present";
|
|
|
|
p._fileExtension = "csv";
|
2013-05-16 17:24:52 +08:00
|
|
|
|
2013-05-27 17:21:56 +08:00
|
|
|
p.generate = function(options, callback) {
|
2013-05-16 17:24:52 +08:00
|
|
|
var o = options;
|
2013-05-27 17:21:56 +08:00
|
|
|
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
|
|
|
};
|
|
|
|
|
2013-05-27 17:21:56 +08:00
|
|
|
module.exports = csv;
|