Improve subquery naming

This commit is contained in:
Raul Marin 2019-06-26 18:03:02 +02:00
parent 7b731a24d1
commit cd8624ae2d
2 changed files with 2 additions and 2 deletions

View File

@ -127,7 +127,7 @@ function getClusterFeatures (pg, zoom, clusterId, columns, query, resolution, ag
} , true); // use read-only transaction } , true); // use read-only transaction
} }
const schemaQuery = ctx => `SELECT * FROM (${ctx.query}) __cdb_schema LIMIT 0`; const schemaQuery = ctx => `SELECT * FROM (${ctx.query}) __cdb_cluster_schema LIMIT 0`;
const clusterFeaturesQuery = ctx => ` const clusterFeaturesQuery = ctx => `
WITH WITH
_cdb_params AS ( _cdb_params AS (

View File

@ -201,7 +201,7 @@ module.exports = class AggregationMapConfig extends MapConfig {
getLayerColumns (index, skipGeoms, callback) { getLayerColumns (index, skipGeoms, callback) {
const geomColumns = ['the_geom', 'the_geom_webmercator']; const geomColumns = ['the_geom', 'the_geom_webmercator'];
const limitedQuery = ctx => `SELECT * FROM (${ctx.query}) __cdb_schema LIMIT 0`; const limitedQuery = ctx => `SELECT * FROM (${ctx.query}) __cdb_aggregation_schema LIMIT 0`;
const layer = this.getLayer(index); const layer = this.getLayer(index);
this.pgConnection.getConnection(this.user, (err, connection) => { this.pgConnection.getConnection(this.user, (err, connection) => {