From 27106fea575de6c71c3bbfcaa39b36b2aec936ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa=20Aubert?= Date: Wed, 6 Nov 2019 13:29:03 +0100 Subject: [PATCH] Avoid regular string contains what looks like a template literal placeholder --- lib/models/aggregation/aggregation-query.js | 27 +++++++++------------ 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/lib/models/aggregation/aggregation-query.js b/lib/models/aggregation/aggregation-query.js index 812a95b2..24ba8062 100644 --- a/lib/models/aggregation/aggregation-query.js +++ b/lib/models/aggregation/aggregation-query.js @@ -334,26 +334,23 @@ const aggregatedPointJoin = (ctx) => { switch (ctx.placement) { case 'centroid': return ''; - case 'point-grid': return ''; - - // For point-sample we'll get a single point directly from the source - // If it's default aggregation we'll add the extra columns to keep backwards compatibility + // For point-sample we'll get a single point directly from the source + // If it's default aggregation we'll add the extra columns to keep backwards compatibility case 'point-sample': return ` -NATURAL JOIN -( - SELECT ${ctx.isDefaultAggregation ? '*' : 'cartodb_id, the_geom_webmercator'} - FROM - ( - ${ctx.sourceQuery} - ) __cdb_src_query -) __cdb_query_columns -`; - + NATURAL JOIN + ( + SELECT ${ctx.isDefaultAggregation ? '*' : 'cartodb_id, the_geom_webmercator'} + FROM + ( + ${ctx.sourceQuery} + ) __cdb_src_query + ) __cdb_query_columns + `; default: - throw new Error('Invalid aggregation placement "${ctx.placement}"'); + throw new Error(`Invalid aggregation placement "${ctx.placement}"`); } };