Skip to content

Commit ac60ba3

Browse files
committed
Enable BigInt results in Quick Evals
1 parent fb3c00b commit ac60ba3

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

extensions/ql-vscode/src/common/bqrs-cli-types.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export namespace BqrsColumnKindCode {
1111
export const BOOLEAN = "b";
1212
export const DATE = "d";
1313
export const ENTITY = "e";
14+
export const BIGINT = "z";
1415
}
1516

1617
export type BqrsColumnKind =
@@ -19,7 +20,8 @@ export type BqrsColumnKind =
1920
| typeof BqrsColumnKindCode.STRING
2021
| typeof BqrsColumnKindCode.BOOLEAN
2122
| typeof BqrsColumnKindCode.DATE
22-
| typeof BqrsColumnKindCode.ENTITY;
23+
| typeof BqrsColumnKindCode.ENTITY
24+
| typeof BqrsColumnKindCode.BIGINT;
2325

2426
export interface BqrsSchemaColumn {
2527
name?: string;
@@ -79,7 +81,8 @@ export type BqrsKind =
7981
| "Integer"
8082
| "Boolean"
8183
| "Date"
82-
| "Entity";
84+
| "Entity"
85+
| "BigInt";
8386

8487
interface BqrsColumn {
8588
name?: string;

extensions/ql-vscode/src/common/bqrs-raw-results-mapper.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ function mapColumnKind(kind: BqrsColumnKind): ColumnKind {
7676
return ColumnKind.Date;
7777
case BqrsColumnKindCode.ENTITY:
7878
return ColumnKind.Entity;
79+
case BqrsColumnKindCode.BIGINT:
80+
return ColumnKind.BigInt;
7981
default:
8082
assertNever(kind);
8183
}

extensions/ql-vscode/src/common/raw-result-types.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ export enum ColumnKind {
55
Boolean = "boolean",
66
Date = "date",
77
Entity = "entity",
8+
BigInt = "bigint",
89
}
910

1011
export type Column = {
@@ -61,6 +62,11 @@ type CellValueNumber = {
6162
value: number;
6263
};
6364

65+
type CellValueBigInt = {
66+
type: "number";
67+
value: number;
68+
};
69+
6470
type CellValueString = {
6571
type: "string";
6672
value: string;
@@ -75,7 +81,8 @@ export type CellValue =
7581
| CellValueEntity
7682
| CellValueNumber
7783
| CellValueString
78-
| CellValueBoolean;
84+
| CellValueBoolean
85+
| CellValueBigInt;
7986

8087
export type Row = CellValue[];
8188

0 commit comments

Comments
 (0)