sjy-ecos/model/sjy_eco.js

14 lines
291 B
JavaScript
Raw Normal View History

2017-01-09 08:41:53 +00:00
var promise = require('bluebird');
var options = {
promiseLib: promise
};
var pgp = require('pg-promise')(options);
var connection = Connections.pg_sjy_eco;
var db = pgp(connection);
exports.getAll = function (tab_name) {
var res = db.query('select * from ' + tab_name);
return res;
};