Refactor long line
This commit is contained in:
parent
d4c6282455
commit
79962a7566
@ -87,7 +87,8 @@ function _aggrFeatureCount(ctx) {
|
|||||||
function _geometryType(ctx) {
|
function _geometryType(ctx) {
|
||||||
if (ctx.metaOptions.geometryType) {
|
if (ctx.metaOptions.geometryType) {
|
||||||
const geometryColumn = AggregationMapConfig.getAggregationGeometryColumn();
|
const geometryColumn = AggregationMapConfig.getAggregationGeometryColumn();
|
||||||
return queryUtils.queryPromise(ctx.dbConnection, _getSQL(ctx, sql => queryUtils.getQueryGeometryType(sql, geometryColumn)))
|
const sqlQuery = _getSQL(ctx, sql => queryUtils.getQueryGeometryType(sql, geometryColumn));
|
||||||
|
return queryUtils.queryPromise(ctx.dbConnection, sqlQuery)
|
||||||
.then(res => ({ geometryType: res.rows[0].geom_type }));
|
.then(res => ({ geometryType: res.rows[0].geom_type }));
|
||||||
}
|
}
|
||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
|
Loading…
Reference in New Issue
Block a user