Use substituteDummyTokens
This commit is contained in:
parent
780cb80c8c
commit
b2adb8f058
@ -156,7 +156,7 @@ module.exports.getMaxMinColumnQuery = function (query, column = 'cartodb_id') {
|
|||||||
min(${column}) AS min_id,
|
min(${column}) AS min_id,
|
||||||
max(${column}) AS max_id,
|
max(${column}) AS max_id,
|
||||||
(max(${column}) - min(${column})) AS id_span
|
(max(${column}) - min(${column})) AS id_span
|
||||||
FROM (${query}) _cdb_metadata_max_min;
|
FROM (${substituteDummyTokens(query)}) _cdb_metadata_max_min;
|
||||||
`;
|
`;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -164,7 +164,7 @@ module.exports.getSampleFromIdsQuery = function (query, ids, columns, column = '
|
|||||||
return `
|
return `
|
||||||
SELECT
|
SELECT
|
||||||
${columnSelector(columns)}
|
${columnSelector(columns)}
|
||||||
FROM (${query}) _cdb_metadata_sample
|
FROM (${substituteDummyTokens(query)}) _cdb_metadata_sample
|
||||||
WHERE ${column} IN (${ids.join(',')})
|
WHERE ${column} IN (${ids.join(',')})
|
||||||
`;
|
`;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user