Skip to content
This repository was archived by the owner on Dec 11, 2022. It is now read-only.

Commit 017e066

Browse files
authored
Merge pull request #129 from doitintl/issue-128
Fixes #128
2 parents b3c0404 + 32521a7 commit 017e066

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

dist/module.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59453,7 +59453,12 @@ function () {
5945359453
q = _this._updateAlias(q, modOptions, query.refId);
5945459454
}
5945559455

59456-
q += " LIMIT " + options.maxDataPoints;
59456+
var limit = q.match(/.(\blimit\b)/gi);
59457+
59458+
if (limit == null) {
59459+
q += " LIMIT " + options.maxDataPoints;
59460+
}
59461+
5945759462
console.log(q);
5945859463
_this.queryModel.target.rawSql = tmpQ;
5945959464
return _this.doQuery(q, options.panelId + query.refId).then(function (response) {

dist/module.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/datasource.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,10 @@ export class BigQueryDatasource {
231231
if (query.refId.search(Shifted) > -1) {
232232
q = this._updateAlias(q, modOptions, query.refId);
233233
}
234-
q += " LIMIT " + options.maxDataPoints;
234+
const limit = q.match(/.(\blimit\b)/gi);
235+
if (limit == null) {
236+
q += " LIMIT " + options.maxDataPoints;
237+
}
235238
console.log(q);
236239
this.queryModel.target.rawSql = tmpQ;
237240
return this.doQuery(q, options.panelId + query.refId).then(response => {

0 commit comments

Comments
 (0)