|
|
@ -32,6 +32,12 @@ class QueryRunner { |
|
|
// pre-query, make sure datasource variables are added to parameters
|
|
|
// pre-query, make sure datasource variables are added to parameters
|
|
|
const parameters = await this.addDatasourceVariables() |
|
|
const parameters = await this.addDatasourceVariables() |
|
|
let query = this.enrichQueryFields(fields, parameters) |
|
|
let query = this.enrichQueryFields(fields, parameters) |
|
|
|
|
|
|
|
|
|
|
|
// Add pagination values for REST queries
|
|
|
|
|
|
if (this.pagination) { |
|
|
|
|
|
query.paginationValues = this.pagination |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
const Integration = integrations[datasource.source] |
|
|
const Integration = integrations[datasource.source] |
|
|
if (!Integration) { |
|
|
if (!Integration) { |
|
|
throw "Integration type does not exist." |
|
|
throw "Integration type does not exist." |
|
|
@ -186,7 +192,6 @@ class QueryRunner { |
|
|
enrichedQuery[key] = fields[key] |
|
|
enrichedQuery[key] = fields[key] |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if ( |
|
|
if ( |
|
|
enrichedQuery.json || |
|
|
enrichedQuery.json || |
|
|
enrichedQuery.customData || |
|
|
enrichedQuery.customData || |
|
|
@ -203,12 +208,6 @@ class QueryRunner { |
|
|
} |
|
|
} |
|
|
delete enrichedQuery.customData |
|
|
delete enrichedQuery.customData |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// Just for REST queries
|
|
|
|
|
|
if (this.pagination) { |
|
|
|
|
|
enrichedQuery.paginationValues = this.pagination |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return enrichedQuery |
|
|
return enrichedQuery |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|