From 8f071f43afa1a5d6d4838c8e614e1ddd7f66cb0c Mon Sep 17 00:00:00 2001 From: Rich Gwozdz Date: Wed, 24 Jan 2024 13:55:59 -0800 Subject: [PATCH] chore: file rename --- packages/featureserver/src/query/index.js | 10 ++-------- .../{log-warnings.js => log-provider-data-warnings.js} | 4 ++-- ...ings.spec.js => log-provider-data-warnings.spec.js} | 0 3 files changed, 4 insertions(+), 10 deletions(-) rename packages/featureserver/src/query/{log-warnings.js => log-provider-data-warnings.js} (96%) rename packages/featureserver/src/query/{log-warnings.spec.js => log-provider-data-warnings.spec.js} (100%) diff --git a/packages/featureserver/src/query/index.js b/packages/featureserver/src/query/index.js index c6c35770c..f158bd1e0 100644 --- a/packages/featureserver/src/query/index.js +++ b/packages/featureserver/src/query/index.js @@ -1,6 +1,6 @@ const _ = require('lodash'); const { filterAndTransform } = require('./filter-and-transform'); -const { logWarnings } = require('./log-warnings'); +const { logProviderDataWarnings } = require('./log-provider-data-warnings'); const { renderFeaturesResponse } = require('./render-features'); const { renderStatisticsResponse } = require('./render-statistics'); const { renderPrecalculatedStatisticsResponse } = require('./render-precalculated-statistics'); @@ -15,11 +15,10 @@ function query (json, requestParams = {}) { all: skipFiltering } = {} } = json; + const { f: requestedFormat } = requestParams; validate(requestParams); - const { f: requestedFormat } = requestParams; - if (shouldRenderPrecalculatedData(json, requestParams)) { return renderPrecalculatedData(json, requestParams); } @@ -28,11 +27,6 @@ function query (json, requestParams = {}) { const data = (skipFiltering || !features) ? json : filterAndTransform(json, requestParams); - - - - - // TODO: Bug when count or extent requested. // QUESTION: Is this problematic if its an aggregation with stats? if (requestedFormat === 'geojson') { diff --git a/packages/featureserver/src/query/log-warnings.js b/packages/featureserver/src/query/log-provider-data-warnings.js similarity index 96% rename from packages/featureserver/src/query/log-warnings.js rename to packages/featureserver/src/query/log-provider-data-warnings.js index 811526e3f..51d949a82 100644 --- a/packages/featureserver/src/query/log-warnings.js +++ b/packages/featureserver/src/query/log-provider-data-warnings.js @@ -2,7 +2,7 @@ const _ = require('lodash'); const { getDataTypeFromValue } = require('../helpers'); const logManager = require('../log-manager'); -function logFeatureCollectionWarnings(geojson, requestParams) { +function logProviderDataWarnings(geojson, requestParams) { const { f, outFields = '*', returnCountOnly, returnExtentOnly, returnIdsOnly } = requestParams; if (f === 'geojson' || returnCountOnly || returnExtentOnly || returnIdsOnly) { @@ -91,4 +91,4 @@ function isEsriTypeMatchException (definitionType, propertyType) { } } -module.exports = { logWarnings: logFeatureCollectionWarnings }; +module.exports = { logProviderDataWarnings }; diff --git a/packages/featureserver/src/query/log-warnings.spec.js b/packages/featureserver/src/query/log-provider-data-warnings.spec.js similarity index 100% rename from packages/featureserver/src/query/log-warnings.spec.js rename to packages/featureserver/src/query/log-provider-data-warnings.spec.js