Remove prefix '_' while passing context param to templates
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user