Avoid regular string contains what looks like a template literal placeholder

This commit is contained in:
Daniel García Aubert
2019-11-06 13:29:03 +01:00
parent 8fbe8f9f2a
commit 27106fea57

View File

@@ -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}"`);
}
};