Remove prefix to context's properties
This commit is contained in:
parent
e2ab48bee2
commit
0a894da0df
@ -283,10 +283,20 @@ const filterCategoriesQueryTpl = ctx => `
|
||||
const searchQueryTpl = ctx => `
|
||||
WITH
|
||||
search_unfiltered AS (
|
||||
${ctx.searchUnfiltered}
|
||||
${filterCategoriesQueryTpl({
|
||||
query: ctx.query,
|
||||
column: ctx.column,
|
||||
value: '0',
|
||||
userQuery: escapedUserQuery
|
||||
})}
|
||||
),
|
||||
search_filtered AS (
|
||||
${ctx.searchFiltered}
|
||||
${filterCategoriesQueryTpl({
|
||||
query: ctx.query,
|
||||
column: ctx.column,
|
||||
value: value,
|
||||
userQuery: escapedUserQuery
|
||||
})}
|
||||
),
|
||||
search_union AS (
|
||||
SELECT * FROM search_unfiltered
|
||||
@ -308,18 +318,10 @@ Aggregation.prototype.search = function(psql, userQuery, callback) {
|
||||
|
||||
// TODO unfiltered will be wrong as filters are already applied at this point
|
||||
var query = searchQueryTpl({
|
||||
searchUnfiltered: filterCategoriesQueryTpl({
|
||||
query: this.query,
|
||||
column: this.column,
|
||||
value: '0',
|
||||
userQuery: escapedUserQuery
|
||||
}),
|
||||
searchFiltered: filterCategoriesQueryTpl({
|
||||
query: this.query,
|
||||
column: this.column,
|
||||
value: value,
|
||||
userQuery: escapedUserQuery
|
||||
})
|
||||
query: this.query,
|
||||
column: this.column,
|
||||
value: value,
|
||||
userQuery: escapedUserQuery
|
||||
});
|
||||
|
||||
debug(query);
|
||||
|
Loading…
Reference in New Issue
Block a user