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

Commit 0b3320e

Browse files
authored
Merge pull request #95 from doitintl/issue-90
Fixes #90
2 parents adbb2bd + 5731c88 commit 0b3320e

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

dist/module.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51698,6 +51698,11 @@ function () {
5169851698
to = "TIMESTAMP_MILLIS (" + options.range.to.valueOf().toString() + ")";
5169951699
}
5170051700

51701+
if (this.target.timeColumn === "-- time --") {
51702+
var myRegexp = /\$__timeFilter\(([\w_.]+)\)/g;
51703+
this.target.timeColumn = myRegexp.exec(q)[1];
51704+
}
51705+
5170151706
var range = this.target.timeColumn + " BETWEEN " + from + " AND " + to;
5170251707
return q.replace(/\$__timeFilter\(([\w_.]+)\)/g, range);
5170351708
};

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/bigquery_query.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,10 @@ export default class BigQueryQuery {
504504
"TIMESTAMP_MILLIS (" + options.range.from.valueOf().toString() + ")";
505505
to = "TIMESTAMP_MILLIS (" + options.range.to.valueOf().toString() + ")";
506506
}
507-
507+
if (this.target.timeColumn === "-- time --") {
508+
const myRegexp = /\$__timeFilter\(([\w_.]+)\)/g;
509+
this.target.timeColumn = myRegexp.exec(q)[1];
510+
}
508511
const range = this.target.timeColumn + " BETWEEN " + from + " AND " + to;
509512
return q.replace(/\$__timeFilter\(([\w_.]+)\)/g, range);
510513
}

0 commit comments

Comments
 (0)