Use const for requirements, constants and variables that are initialized once

This commit is contained in:
Daniel García Aubert 2017-09-14 17:18:20 +02:00
parent c8ff61c531
commit 050e9776d1

View File

@ -1,8 +1,8 @@
var BaseDataview = require('./base');
const BaseDataview = require('./base');
var TYPE = 'list';
const TYPE = 'list';
var listSqlTpl = ctx => `select ${ctx._columns} from (${ctx._query}) as _cdb_list`;
const listSqlTpl = ctx => `select ${ctx._columns} from (${ctx._query}) as _cdb_list`;
/**
{
@ -33,7 +33,7 @@ module.exports = class List extends BaseDataview{
callback = override;
}
var listSql = listSqlTpl({
const listSql = listSqlTpl({
_query: this.query,
_columns: this.columns.join(', ')
});