@koopjs/winnow
Advanced tools
Comparing version 4.0.0 to 4.0.1
{ | ||
"name": "@koopjs/winnow", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"description": "Apply sql-like filters to GeoJSON", | ||
@@ -12,3 +12,3 @@ "main": "src/index.js", | ||
"test:cov": "nyc --reporter=text-summary --reporter=html tape '**/*.spec.js' | tap-spec", | ||
"test:cov:unit": "nyc --reporter=text-summary --reporter=html tape 'lib/**/*.spec.js' | tap-spec", | ||
"test:cov:unit": "nyc --reporter=text-summary --reporter=html tape 'src/**/*.spec.js' | tap-spec", | ||
"benchmark": "node benchmark/index.js", | ||
@@ -15,0 +15,0 @@ "benchmark:ci": "node benchmark/index.js | tee benchmark-result.txt" |
@@ -6,3 +6,5 @@ const createAggregationSelect = require('./aggregation-select'); | ||
function createSelectSql (options = {}) { | ||
if (options.aggregates) return createAggregationSelect(options.aggregates, options.groupBy, options.esri); | ||
if (options.aggregates) { | ||
return createAggregationSelect(options.aggregates, options.groupBy, options.esri); | ||
} | ||
@@ -12,12 +14,14 @@ return createStandardSelect(options); | ||
function createStandardSelect (options = {}) { | ||
function createStandardSelect (options) { | ||
const select = options.distinct ? 'SELECT DISTINCT' : 'SELECT'; | ||
const fieldsList = createFieldsSelectFragment(options); | ||
if (options.returnGeometry === false) { | ||
return (`SELECT ${fieldsList} FROM ?`); | ||
return (`${select} ${fieldsList} FROM ?`); | ||
} | ||
return (`SELECT ${fieldsList}, ${createGeometrySelectFragment(options)} FROM ?`); | ||
return (`${select} ${fieldsList}, ${createGeometrySelectFragment(options)} FROM ?`); | ||
} | ||
module.exports = createSelectSql; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
94457
1932