From f1018f3272cbd226723adb5b2671a95c5e393151 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa=20Aubert?= Date: Tue, 5 Sep 2017 12:18:42 +0200 Subject: [PATCH] Use template string for nullsQueryTpl --- lib/cartodb/models/dataview/histogram.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/cartodb/models/dataview/histogram.js b/lib/cartodb/models/dataview/histogram.js index 5eec9713..35c9b43c 100644 --- a/lib/cartodb/models/dataview/histogram.js +++ b/lib/cartodb/models/dataview/histogram.js @@ -124,14 +124,14 @@ const overrideBinsQueryTpl = ctx => ` ) `; -var nullsQueryTpl = dot.template([ - '__cdb_nulls AS (', - ' SELECT', - ' count(*) AS __cdb_nulls_count', - ' FROM ({{=it._query}}) __cdb_histogram_nulls', - ' WHERE {{=it._column}} IS NULL', - ')' -].join('\n')); +const nullsQueryTpl = ctx => ` + __cdb_nulls AS ( + SELECT + count(*) AS __cdb_nulls_count + FROM (${it._query}) __cdb_histogram_nulls + WHERE ${it._column} IS NULL + ) +`; var infinitiesQueryTpl = dot.template([ '__cdb_infinities AS (',