module.exports = function(Self) { Self.rawSql = function(query, params, cb) { var connector = this.dataSource.connector; return new Promise(function(resolve, reject) { connector.execute(query, params, function(error, response) { if (cb) cb(error, response); if (error) reject(error); else resolve(response); }); }); }; };