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

Commit 22b97e8

Browse files
authored
Merge pull request #359 from doitintl/OfirCohen/fixes
Add IS, IS NOT
2 parents ff60e26 + 4c4b1fc commit 22b97e8

File tree

2 files changed

+23
-12
lines changed

2 files changed

+23
-12
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
"license": "MIT",
2121
"dependencies": {
2222
"@grafana/toolkit": "^7.3.4",
23-
"@superquery/superquery-lib": "^1.3.4",
2423
"@types/node": "^11.11.1",
2524
"brace": "^0.10.0",
2625
"codecov": "^3.2.0",

src/query_ctrl.ts

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -104,23 +104,23 @@ export class BigQueryQueryCtrl extends QueryCtrl {
104104

105105
this.projectSegment = !this.target.project
106106
? uiSegmentSrv.newSegment({
107-
fake: true,
108-
value: 'select project',
109-
})
107+
fake: true,
108+
value: 'select project',
109+
})
110110
: uiSegmentSrv.newSegment(this.target.project);
111111

112112
this.datasetSegment = !this.target.dataset
113113
? uiSegmentSrv.newSegment({
114-
fake: true,
115-
value: 'select dataset',
116-
})
114+
fake: true,
115+
value: 'select dataset',
116+
})
117117
: uiSegmentSrv.newSegment(this.target.dataset);
118118

119119
this.tableSegment = !this.target.table
120120
? uiSegmentSrv.newSegment({
121-
fake: true,
122-
value: 'select table',
123-
})
121+
fake: true,
122+
value: 'select table',
123+
})
124124
: uiSegmentSrv.newSegment(this.target.table);
125125

126126
this.timeColumnSegment = uiSegmentSrv.newSegment(this.target.timeColumn);
@@ -457,7 +457,7 @@ export class BigQueryQueryCtrl extends QueryCtrl {
457457
partModel.params[0] = subItem.value;
458458
}
459459
let addAlias = false;
460-
const _addAlias = function() {
460+
const _addAlias = function () {
461461
return !_.find(selectParts, (p: any) => p.def.type === 'alias');
462462
};
463463
switch (partType) {
@@ -663,7 +663,19 @@ export class BigQueryQueryCtrl extends QueryCtrl {
663663
return this.$q.when([]);
664664
case 'op':
665665
return this.$q.when(
666-
this.uiSegmentSrv.newOperators(['=', '!=', '<', '<=', '>', '>=', 'IN', 'LIKE', 'NOT LIKE'])
666+
this.uiSegmentSrv.newOperators([
667+
'=',
668+
'!=',
669+
'<',
670+
'<=',
671+
'>',
672+
'>=',
673+
'IN',
674+
'LIKE',
675+
'NOT LIKE',
676+
'IS',
677+
'IS NOT',
678+
])
667679
);
668680
default:
669681
return this.$q.when([]);

0 commit comments

Comments
 (0)