Remove prefix '_' while passing context param to templates

This commit is contained in:
Daniel García Aubert
2017-09-14 17:22:34 +02:00
parent d0e2c9f898
commit 2a0b15f085
+3 -3
View File
@@ -3,7 +3,7 @@ const debug = require('debug')('windshaft:dataview:list');
const TYPE = 'list';
const listSqlTpl = ctx => `select ${ctx._columns} from (${ctx._query}) as _cdb_list`;
const listSqlTpl = ctx => `select ${ctx.columns} from (${ctx.query}) as _cdb_list`;
/**
{
@@ -35,8 +35,8 @@ module.exports = class List extends BaseDataview {
}
const listSql = listSqlTpl({
_query: this.query,
_columns: this.columns.join(', ')
query: this.query,
columns: this.columns.join(', ')
});
debug(listSql);