Refactor date wrapper
This commit is contained in:
parent
db3370cd21
commit
d4c6282455
@ -1,5 +1,5 @@
|
||||
const AggregationMapConfig = require('../../aggregation/aggregation-mapconfig');
|
||||
const utilsService = require('../../../utils/get-column-types');
|
||||
const dateWrapper = require('../../../utils/date-wrapper');
|
||||
const queryUtils = require('../../../utils/query-utils');
|
||||
|
||||
// Generate query to detect time columns
|
||||
@ -35,7 +35,7 @@ module.exports = class VectorMapConfigAdapter {
|
||||
const originalQuery = requestMapConfig.layers[0].options.sql;
|
||||
return this._getColumns(user, originalQuery)
|
||||
.then(result => {
|
||||
const newSqlQuery = utilsService.wrapDates(originalQuery, result.fields);
|
||||
const newSqlQuery = dateWrapper.wrapDates(originalQuery, result.fields);
|
||||
requestMapConfig.layers[0].options.sql = newSqlQuery;
|
||||
return requestMapConfig;
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user