Use template string for infinitiesQueryTpl

This commit is contained in:
Daniel García Aubert 2017-09-05 12:21:30 +02:00
parent f1018f3272
commit 7ea6b3e371

View File

@ -133,17 +133,17 @@ const nullsQueryTpl = ctx => `
)
`;
var infinitiesQueryTpl = dot.template([
'__cdb_infinities AS (',
' SELECT',
' count(*) AS __cdb_infinities_count',
' FROM ({{=it._query}}) __cdb_infinities_query',
' WHERE',
' {{=it._column}} = \'infinity\'::float',
' OR',
' {{=it._column}} = \'-infinity\'::float',
')'
].join('\n'));
const infinitiesQueryTpl = ctx => `
__cdb_infinities AS (
SELECT
count(*) AS __cdb_infinities_count
FROM (${ctx._query}) __cdb_infinities_query
WHERE
${ctx._column} = 'infinity'::float
OR
${ctx._column} = '-infinity'::float
)
`;
var nansQueryTpl = dot.template([
'__cdb_nans AS (',