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

Commit 70b11ed

Browse files
committed
sign
1 parent 36255f2 commit 70b11ed

File tree

5 files changed

+34
-30
lines changed

5 files changed

+34
-30
lines changed
21 Bytes
Binary file not shown.

dist/MANIFEST.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@ Hash: SHA512
99
"signedByOrgName": "DoiT International",
1010
"plugin": "doitintl-bigquery-datasource",
1111
"version": "2.0.1",
12-
"time": 1608061716784,
12+
"time": 1608118296554,
1313
"keyId": "7e4d0c6a708866e7",
1414
"files": {
1515
"LICENSE.md": "b40d79313086aafb7ab31bf033798850a20ff52daf52f9dba84f6ef169e326b2",
1616
"doitintl-bigquery-datasource_darwin_amd64": "89d3c1769d56208894555aaeb428d4d81d227d134d521cebdf1a3ea36333f93c",
17-
"module.js.map": "aaf3e2e96b59fc8fa89135cb16735a73b272660657baabbbdc1a0bc198f6e703",
17+
"module.js.map": "c674267fa0d98e3295e8dbc225cc1f4fc563f6e59bb782088ce200219e04e27d",
1818
"doitintl-bigquery-datasource_windows_amd64.exe": "89d3c1769d56208894555aaeb428d4d81d227d134d521cebdf1a3ea36333f93c",
1919
"plugin.json": "198f8a869a085aefecfd17d3eb40166a54df2ed113fad4408ac67ddb4019f215",
2020
"README.md": "2c54953a9adbfd16ac4cc4ee4de052dc1895892416713cd9626a0e353e5e2047",
2121
"img/logo.png": "dcd9277d3dfc4e412dc006a000d0ee5b9ff4d9f126687a01f189cea9987e2bfa",
22-
"module.js": "e5deffe8848b7c966f55050587f7714f12a4ffa12e987d213a1baa01c61b1db9",
22+
"module.js": "ba4bb31df5beb210d312a7bcd03a345c86e727933319cc9156ba73b7a603a0c2",
2323
"partials/annotations.editor.html": "c8b36fe73e7c3b13df4db94153ebd820a9bec4104c1b179db92d64dcdcf04156",
2424
"partials/query.editor.html": "23a40ae6a4a3e2dfa32bee8f5cc963c447750e9752a46e5aced85e6d7f70d6e5",
2525
"partials/config.html": "31cadbac85238e8a0cb8e4766fc20329cda9d918b4140e6130626cb3631dbe8d",
@@ -30,9 +30,9 @@ Hash: SHA512
3030
Version: OpenPGP.js v4.10.1
3131
Comment: https://openpgpjs.org
3232

33-
wqEEARMKAAYFAl/ZExQACgkQfk0ManCIZuc+dAIIyFLAGT0h43BJ67tyGL4l
34-
wI7cAdOcAPTu6tObWdvu4M3glt80DiI11p3aEVxfxSx20Ujg52bFP+GvjvtU
35-
/j6NQCgCCQGRP0x2vnwTbA28p99xXl8t5jtBuqdXzOUQ9E0d8aeI523UvDDM
36-
cJlfojMoeTmuOpu47akPzV7QVSSA51bodaVL4A==
37-
=pdTb
33+
wqAEARMKAAYFAl/Z8BgACgkQfk0ManCIZuel0wIIsYElxubOvqKCCGXkJAP6
34+
1Kl8pAjnIPqfS10O6TpX3shKbBRYS7vv1Ovv9pUG1U59SVb7chOs060K4RC2
35+
Pq2VPRsCB0cmywjxIw0nTM+Y+c2jdKT0mLAni9RtybgKk6bxErs2rqGBr1QH
36+
GgtQzwo6CAw71MNTskEa0SVJp4ZH1VLdgXWA
37+
=o/tS
3838
-----END PGP SIGNATURE-----

dist/module.js

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

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: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -292,12 +292,14 @@ export class BigQueryDatasource {
292292
});
293293
return this.$q.all(allQueryPromise).then((responses): any => {
294294
const data = [];
295-
for (const response of responses) {
296-
if (response.type && response.type === 'table') {
297-
data.push(response);
298-
} else {
299-
for (const dp of response) {
300-
data.push(dp);
295+
if (responses) {
296+
for (const response of responses) {
297+
if (response.type && response.type === 'table') {
298+
data.push(response);
299+
} else {
300+
for (const dp of response) {
301+
data.push(dp);
302+
}
301303
}
302304
}
303305
}
@@ -450,20 +452,22 @@ export class BigQueryDatasource {
450452
}
451453
private setUpQ(modOptions, options, query) {
452454
let q = this.queryModel.expend_macros(modOptions);
453-
q = this.setUpPartition(q, query.partitioned, query.partitionedField, modOptions);
454-
q = BigQueryDatasource._updatePartition(q, modOptions);
455-
q = BigQueryDatasource._updateTableSuffix(q, modOptions);
456-
if (query.refId.search(Shifted) > -1) {
457-
q = this._updateAlias(q, modOptions, query.refId);
458-
}
459-
const limit = q.match(/[^]+(\bLIMIT\b)/gi);
460-
if (limit == null) {
461-
const limitStatement = ' LIMIT ' + options.maxDataPoints;
462-
const limitPosition = q.match(/\$__limitPosition/g);
463-
if (limitPosition !== null) {
464-
q = q.replace(/\$__limitPosition/g, limitStatement);
465-
} else {
466-
q += limitStatement;
455+
if (q) {
456+
q = this.setUpPartition(q, query.partitioned, query.partitionedField, modOptions);
457+
q = BigQueryDatasource._updatePartition(q, modOptions);
458+
q = BigQueryDatasource._updateTableSuffix(q, modOptions);
459+
if (query.refId.search(Shifted) > -1) {
460+
q = this._updateAlias(q, modOptions, query.refId);
461+
}
462+
const limit = q.match(/[^]+(\bLIMIT\b)/gi);
463+
if (limit == null) {
464+
const limitStatement = ' LIMIT ' + options.maxDataPoints;
465+
const limitPosition = q.match(/\$__limitPosition/g);
466+
if (limitPosition !== null) {
467+
q = q.replace(/\$__limitPosition/g, limitStatement);
468+
} else {
469+
q += limitStatement;
470+
}
467471
}
468472
}
469473
return q;

0 commit comments

Comments
 (0)