Skip to content

Commit

Permalink
Merge pull request #166 from Altinity/master
Browse files Browse the repository at this point in the history
Fixes and Version update
  • Loading branch information
gimm3fuel authored Jan 15, 2020
2 parents 0c1a51c + db107cb commit 50d46ef
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 56,139 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 1.9.5 (2020-01-15)

## Fixes:
* Comments not supported by sql language parser #95

# 1.9.4 (2019-11-27)

## Fixes:
Expand Down
56,157 changes: 22 additions & 56,135 deletions dist/module.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/module.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@
"url": "https://github.com/Vertamedia/clickhouse-grafana"
}
],
"version": "1.9.4"
"version": "1.9.5"
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vertamedia-clickhouse",
"version": "1.9.4",
"version": "1.9.5",
"description": "ClickHouse datasource for Grafana",
"scripts": {
"build:prod": "webpack --config webpack.config.prod.js",
Expand Down
2 changes: 1 addition & 1 deletion src/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@
"url": "https://github.com/Vertamedia/clickhouse-grafana"
}
],
"version": "1.9.4"
"version": "1.9.5"
}
}
5 changes: 5 additions & 0 deletions src/scanner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,11 @@ export default class Scanner {
}
return this.tree;
}

removeComments(query)
{
return query.replace(new RegExp(commentRe), '');
}
}

let wsRe = "\\s+",
Expand Down
1 change: 1 addition & 0 deletions src/sql_query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ export default class SqlQuery {
renderedAdHocCondition = '(' + adhocCondition.join(' AND ') + ')';
}

query = scanner.removeComments(query);
query = SqlQuery.unescape(query);
let timeFilter = SqlQuery.getDateTimeFilter(this.options.rangeRaw.to === 'now', dateTimeType);
if (typeof this.target.dateColDataType == "string" && this.target.dateColDataType.length > 0) {
Expand Down

0 comments on commit 50d46ef

Please sign in to comment.