Automatically lint fixes

remotes/origin/quote_columns
Daniel García Aubert 5 years ago
parent 97f4adbc1a
commit 7b13c12ab4

@ -85,9 +85,9 @@ module.exports = class ApiRouter {
const metadataBackend = cartodbRedis({ pool: redisPool });
const pgConnection = new PgConnection(metadataBackend);
const windshaftLogger = environmentOptions.log_windshaft && global.log4js ?
global.log4js.getLogger('[windshaft]') :
null;
const windshaftLogger = environmentOptions.log_windshaft && global.log4js
? global.log4js.getLogger('[windshaft]')
: null;
const mapStore = new windshaft.storage.MapStore({
pool: redisPool,
expire_time: serverOptions.grainstore.default_layergroup_ttl,

@ -241,7 +241,7 @@ Aggregation.prototype._checkOptions = function (options) {
}
};
Aggregation.prototype.getAggregationSql = function() {
Aggregation.prototype.getAggregationSql = function () {
return aggregationFnQueryTpl[this.aggregation]({
_aggregationFn: this.aggregation,
_aggregationColumn: this.aggregationColumn || 1

@ -7,7 +7,7 @@ module.exports.getQueryActualRowCount = function (query) {
return `select COUNT(*) AS rows FROM (${substituteDummyTokens(query)}) AS __cdb_query`;
};
function getQueryRowEstimation(query) {
function getQueryRowEstimation (query) {
return 'select cartodb.CDB_EstimateRowCount($windshaft$' + substituteDummyTokens(query) + '$windshaft$) as rows';
}
module.exports.getQueryRowEstimation = getQueryRowEstimation;

@ -658,7 +658,7 @@ describe('dataviews using tables with overviews', function () {
});
});
describe('agreggation validation', function (){
describe('agreggation validation', function () {
const params = {
response: {
status: 400,
@ -668,11 +668,12 @@ describe('dataviews using tables with overviews', function () {
}
};
function createMapConfig(options) {
function createMapConfig (options) {
return {
version: '1.8.0',
analyses: [
{ id: 'data-source',
{
id: 'data-source',
type: 'source',
params: {
query: 'select * from test_table_overviews'
@ -682,7 +683,7 @@ describe('dataviews using tables with overviews', function () {
dataviews: {
test_invalid_aggregation: {
type: 'aggregation',
source: {id: 'data-source'},
source: { id: 'data-source' },
options: options
}
},
@ -702,8 +703,8 @@ describe('dataviews using tables with overviews', function () {
it('should fail if missing column', function (done) {
var options = {
aggregation: "sum",
aggregationColumn: "value"
aggregation: 'sum',
aggregationColumn: 'value'
};
var missingColumnMapConfig = createMapConfig(options);
@ -727,8 +728,8 @@ describe('dataviews using tables with overviews', function () {
it('should fail if no aggregation operation', function (done) {
var options = {
column: "value",
aggregationColumn: "value"
column: 'value',
aggregationColumn: 'value'
};
var missingOperationMapConfig = createMapConfig(options);
@ -752,9 +753,9 @@ describe('dataviews using tables with overviews', function () {
it('should fail if fake operation', function (done) {
var options = {
column: "value",
aggregation: "wadus",
aggregationColumn: "value"
column: 'value',
aggregation: 'wadus',
aggregationColumn: 'value'
};
var wrongOperationMapConfig = createMapConfig(options);
@ -778,9 +779,9 @@ describe('dataviews using tables with overviews', function () {
it('should fail if invalid operation for overview', function (done) {
var options = {
column: "value",
aggregation: "avg",
aggregationColumn: "value"
column: 'value',
aggregation: 'avg',
aggregationColumn: 'value'
};
var wrongOperationMapConfig = createMapConfig(options);
@ -804,8 +805,8 @@ describe('dataviews using tables with overviews', function () {
it('should fail if no aggregation column when needed', function (done) {
var options = {
column: "value",
aggregation: "sum"
column: 'value',
aggregation: 'sum'
};
var missingOptionMapConfig = createMapConfig(options);

Loading…
Cancel
Save