Removing 'self' vars using arrow functions

This commit is contained in:
Simon 2017-09-18 12:20:59 +02:00
parent 61ea05d1c2
commit 222cfb90fd

View File

@ -78,8 +78,6 @@ module.exports = class Formula extends BaseDataview {
sql (psql, override, callback) {
const self = this;
if (!callback) {
callback = override;
override = {};
@ -87,11 +85,11 @@ module.exports = class Formula extends BaseDataview {
if (this._isFloatColumn === null) {
this._isFloatColumn = false;
this.getColumnType(psql, this.column, this.queries.no_filters, function (err, type) {
this.getColumnType(psql, this.column, this.queries.no_filters, (err, type) => {
if (!err && !!type) {
self._isFloatColumn = type.float;
this._isFloatColumn = type.float;
}
self.sql(psql, override, callback);
this.sql(psql, override, callback);
});
return null;
}