Use template string to escape literals
This commit is contained in:
parent
46860541fe
commit
38e2c040d1
@ -292,8 +292,7 @@ module.exports = class Aggregation extends BaseDataview {
|
|||||||
|
|
||||||
search (psql, userQuery, callback) {
|
search (psql, userQuery, callback) {
|
||||||
const self = this;
|
const self = this;
|
||||||
|
const escapedUserQuery = psql.escapeLiteral(`%${userQuery}%`);
|
||||||
const escapedUserQuery = psql.escapeLiteral('%' + userQuery + '%');
|
|
||||||
const value = this.aggregation !== 'count' && this.aggregationColumn ?
|
const value = this.aggregation !== 'count' && this.aggregationColumn ?
|
||||||
this.aggregation + '(' + this.aggregationColumn + ')' : 'count(1)';
|
this.aggregation + '(' + this.aggregationColumn + ')' : 'count(1)';
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user