Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,32 @@

All notable changes to the **kdb VS Code extension** are documented in this file.

# v1.17.0

### Enhancements

- Added quick connections
- Run on REPL by default
- SQL Workbook
- Connect and auto execute query functionality
- Use own grid instead of ag-grid-community for kdb Results View
- Add support for KDB-X modules in language server
- Moved documentation to its own site

### Fixes

- kdb output channel should support log levels
- CSV export does not work properly for cells that contain lists or strings
- Auto resizing of grid columns
- Specific python query executions not working

### Internal Improvements

- Updated telemetry data sent
- Use structured text for datasources
- Integrate KDB-X KX_TTY feature in REPL
- Update query wrappers and added q CI testing

# v1.16.1

### Fixes
Expand Down
140 changes: 131 additions & 9 deletions ref_card.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,136 @@

## Execution

| Type | REPL | My q | IE SP | IE q/SQL | IE API | IE UDA | IE Populate SP |
| :--------- | :--: | :--: | :---: | :------: | :----: | :----: | :------------: |
| File `q` | ✓ | ✓ | ✓ | ✓ | | | ✓ |
| File `py` | ✓ | ✓ | ✓ | ✓ | | | ✓ |
| File `sql` | ✓ | ✓ | | ✓ | | | ✓ |
| Cell `q` | ✓ | ✓ | ✓ | ✓ | | | ✓ |
| Cell `py` | ✓ | ✓ | ✓ | ✓ | | | ✓ |
| Cell `sql` | ✓ | ✓ | | ✓ | | | ✓ |
| Datasource | | | | ✓ | ✓ | ✓ | ✓ |
| Type | REPL | My q | IE SP | IE q/SQL | IE API | IE UDA | IE Populate SP |
| :------------------ | :--: | :--: | :---: | :------: | :----: | :----: | :------------: |
| File `q` | ✓ | ✓ | ✓ | ✓ | | | ✓ |
| File `py` | ✓ | ✓ | ✓ | ✓ | | | ✓ |
| File `sql` | ✓ | ✓ | | ✓ | | | ✓ |
| Workbook `q` | ✓ | ✓ | ✓ | ✓ | | | ✓ |
| Workbook `py` | ✓ | ✓ | ✓ | ✓ | | | ✓ |
| Workbook `sql` | ✓ | ✓ | | ✓ | | | ✓ |
| Notebook Cell `q` | ✓ | ✓ | ✓ | ✓ | | | ✓ |
| Notebook Cell `py` | ✓ | ✓ | ✓ | ✓ | | | ✓ |
| Notebook Cell `sql` | ✓ | ✓ | | ✓ | | | ✓ |
| Datasource | | | | ✓ | ✓ | ✓ | ✓ |

`REPL` and `My q` requires [PyKX](https://github.com/KxSystems/kx-vscode/wiki/Use-PyKX-Within-REPL) for Python support.

## Telemetry

| Telemetry | Measurements | Source |
| :----------------------------- | :----------: | :--------------------------------------- |
| Extension.Activated | | src/extension.ts |
| Extension.CustomAuth.Activated | | src/extension.ts |
| ¦ | | |
| Welcome.Displayed | | src/commands/setupCommand.ts |
| Install.kdbx | | src/commands/setupCommand.ts |
| Install.kdbx.workspace | | src/commands/setupCommand.ts |
| Install.kdbx.win32.fail | | src/commands/setupCommand.ts |
| Repl.Start | | src/commands/workspaceCommand.ts |
| ¦ | | |
| Connection.Create.kdb | | src/commands/serverCommand.ts |
| Connection.Edit.kdb | | src/commands/serverCommand.ts |
| Connection.Delete.kdb | | src/services/connectionManagerService.ts |
| Connection.Create.ie | | src/commands/serverCommand.ts |
| Connection.Edit.ie | | src/commands/serverCommand.ts |
| Connection.Delete.ie | | src/services/connectionManagerService.ts |
| Connection.Export.All | | src/extension.ts |
| Connection.Export.Single | | src/extension.ts |
| Connection.Import | | src/extension.ts |
| Connection.Reset.ie.sp | | src/classes/insightsConnection.ts |
| Connection.Label.Create | ✓ | src/utils/connLabel.ts |
| Connection.Label.Assign | ✓ | src/utils/connLabel.ts |
| Connection.Label.Unassign | ✓ | src/utils/connLabel.ts |
| Connection.Label.Delete | ✓ | src/utils/connLabel.ts |
| ¦ | | |
| Run.Workbook.repl.q | | src/utils/queryUtils.ts |
| Run.Workbook.repl.py | | src/utils/queryUtils.ts |
| Run.Workbook.repl.sql | | src/utils/queryUtils.ts |
| Run.File.repl.q | | src/utils/queryUtils.ts |
| Run.File.repl.py | | src/utils/queryUtils.ts |
| Run.File.repl.sql | | src/utils/queryUtils.ts |
| Run.Cell.repl.q | | src/utils/queryUtils.ts |
| Run.Cell.repl.py | | src/utils/queryUtils.ts |
| Run.Cell.repl.sql | | src/utils/queryUtils.ts |
| ¦ | | |
| Run.Workbook.kdb.q | | src/utils/queryUtils.ts |
| Run.Workbook.kdb.py | | src/utils/queryUtils.ts |
| Run.Workbook.kdb.sql | | src/utils/queryUtils.ts |
| Run.File.kdb.q | | src/utils/queryUtils.ts |
| Run.File.kdb.py | | src/utils/queryUtils.ts |
| Run.File.kdb.sql | | src/utils/queryUtils.ts |
| Run.Cell.kdb.q | | src/utils/queryUtils.ts |
| Run.Cell.kdb.py | | src/utils/queryUtils.ts |
| Run.Cell.kdb.sql | | src/utils/queryUtils.ts |
| ¦ | | |
| Run.Workbook.ie.q | | src/utils/queryUtils.ts |
| Run.Workbook.ie.py | | src/utils/queryUtils.ts |
| Run.Workbook.ie.sql | | src/utils/queryUtils.ts |
| Run.File.ie.q | | src/utils/queryUtils.ts |
| Run.File.ie.py | | src/utils/queryUtils.ts |
| Run.File.ie.sql | | src/utils/queryUtils.ts |
| Run.Cell.ie.q | | src/utils/queryUtils.ts |
| Run.Cell.ie.py | | src/utils/queryUtils.ts |
| Run.Cell.ie.sql | | src/utils/queryUtils.ts |
| ¦ | | |
| Run.Workbook.ie.dap.q | | src/utils/queryUtils.ts |
| Run.Workbook.ie.dap.py | | src/utils/queryUtils.ts |
| Run.File.ie.dap.q | | src/utils/queryUtils.ts |
| Run.File.ie.dap.py | | src/utils/queryUtils.ts |
| Run.Cell.ie.dap.q | | src/utils/queryUtils.ts |
| Run.Cell.ie.dap.py | | src/utils/queryUtils.ts |
| ¦ | | |
| Run.Workbook.kdb.quick.q | | |
| Run.Workbook.kdb.quick.py | | |
| Run.Workbook.kdb.quick.sql | | |
| Run.File.kdb.quick.q | | |
| Run.File.kdb.quick.py | | |
| Run.File.kdb.quick.sql | | |
| Run.Cell.kdb.quick.q | | |
| Run.Cell.kdb.quick.py | | |
| Run.Cell.kdb.quick.sql | | |
| ¦ | | |
| Run.Datasource.api | | src/utils/queryUtils.ts |
| Run.Datasource.qsql | | src/utils/queryUtils.ts |
| Run.Datasource.sql | | src/utils/queryUtils.ts |
| Run.Datasource.uda | | src/utils/queryUtils.ts |
| ¦ | | |
| Populate.Datasource.api | | src/utils/queryUtils.ts |
| Populate.Datasource.qsql | | src/utils/queryUtils.ts |
| Populate.Datasource.sql | | src/utils/queryUtils.ts |
| Populate.Datasource.uda | | src/utils/queryUtils.ts |
| ¦ | | |
| Populate.Workbook.q | | src/utils/queryUtils.ts |
| Populate.Workbook.py | | src/utils/queryUtils.ts |
| Populate.Workbook.sql | | src/utils/queryUtils.ts |
| Populate.File.q | | src/utils/queryUtils.ts |
| Populate.File.py | | src/utils/queryUtils.ts |
| Populate.File.sql | | src/utils/queryUtils.ts |
| Populate.Cell.q | | src/utils/queryUtils.ts |
| Populate.Cell.py | | src/utils/queryUtils.ts |
| Populate.Cell.sql | | src/utils/queryUtils.ts |
| ¦ | | |
| Graphics.Displayed.kdb.q | | src/commands/serverCommand.ts |
| Graphics.Displayed.kdb.py | | src/commands/serverCommand.ts |
| Graphics.Displayed.ie.q | | src/commands/serverCommand.ts |
| Graphics.Displayed.ie.py | | src/commands/serverCommand.ts |
| ¦ | | |
| Language.References | | server/src/qLangServer.ts |
| Language.Definition | | server/src/qLangServer.ts |
| Language.Completion | | server/src/qLangServer.ts |
| Language.RenameRequest | | server/src/qLangServer.ts |
| Language.ParameterCache | | server/src/qLangServer.ts |
| Language.FoldingRanges | | server/src/qLangServer.ts |
| Language.CallHierarchy | | server/src/qLangServer.ts |
| ¦ | | |
| Debugger.Run | | |
| Debugger.Resume | | |
| Debugger.StepOver | | |
| Debugger.SetBreakPoint | | |
| ¦ | | |
| Help.Open.Documentation | | src/extension.ts |
| Help.Open.ReportBug | | src/extension.ts |
| Help.Open.SuggestFeature | | src/extension.ts |
| Help.Open.Survey | | src/extension.ts |
| Help.Hide.Survey | | src/utils/feedbackSurveyUtils.ts |
38 changes: 36 additions & 2 deletions server/src/qLangServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,14 +199,13 @@ export default class QLangServer {
options: {
logger?: string;
params?: any;
telemetry?: string | boolean;
} = {},
telemetry?: string | boolean,
) {
this.connection.sendNotification("notify", {
message,
kind,
options,
telemetry,
});
}

Expand Down Expand Up @@ -252,6 +251,11 @@ export default class QLangServer {
textDocument: { uri },
position,
}: ReferenceParams): Promise<Location[]> {
this.notify("onReferences", MessageKind.DEBUG, {
logger,
telemetry: "Language.References",
});

const source = await this.getSource(uri);
const target = source.tokenAt(position);

Expand All @@ -271,6 +275,11 @@ export default class QLangServer {
textDocument: { uri },
position,
}: DefinitionParams): Promise<Location[]> {
this.notify("onDefinition", MessageKind.DEBUG, {
logger,
telemetry: "Language.Definition",
});

const source = await this.getSource(uri);
const target = source.tokenAt(position);

Expand All @@ -291,6 +300,11 @@ export default class QLangServer {
position,
newName,
}: RenameParams): Promise<WorkspaceEdit | null> {
this.notify("onRenameRequest", MessageKind.DEBUG, {
logger,
telemetry: "Language.RenameRequest",
});

const source = await this.getSource(uri);
const target = source.tokenAt(position);

Expand Down Expand Up @@ -325,6 +339,11 @@ export default class QLangServer {
textDocument: { uri },
position,
}: CompletionParams): Promise<CompletionItem[]> {
this.notify("onCompletion", MessageKind.DEBUG, {
logger,
telemetry: "Language.Completion",
});

const source = await this.getSource(uri);
const target = source.tokenAt(position);

Expand Down Expand Up @@ -373,6 +392,11 @@ export default class QLangServer {
textDocument: { uri },
position,
}: TextDocumentPositionParams) {
this.notify("onParameterCache", MessageKind.DEBUG, {
logger,
telemetry: "Language.ParameterCache",
});

const source = await this.getSource(uri);
const target = source.tokenAt(position);
if (!target) {
Expand Down Expand Up @@ -427,6 +451,11 @@ export default class QLangServer {
public async onFoldingRanges({
textDocument: { uri },
}: FoldingRangeParams): Promise<FoldingRange[]> {
this.notify("onFoldingRanges", MessageKind.DEBUG, {
logger,
telemetry: "Language.FoldingRanges",
});

const source = await this.getSource(uri);
const ranges: FoldingRange[] = [];

Expand Down Expand Up @@ -486,6 +515,11 @@ export default class QLangServer {
textDocument: { uri },
position,
}: CallHierarchyPrepareParams): Promise<CallHierarchyItem[]> {
this.notify("onCallHierarchy", MessageKind.DEBUG, {
logger,
telemetry: "Language.CallHierarchy",
});

const source = await this.getSource(uri);
const target = source.tokenAt(position);

Expand Down
9 changes: 1 addition & 8 deletions src/classes/insightsConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,6 @@ export class InsightsConnection {
params: DataSourceFiles,
silent?: boolean,
): Promise<void> {
let dsTypeString = "";
if (this.connected && this.connEndpoints) {
let coreUrl: string;
const body: any = {
Expand All @@ -541,13 +540,11 @@ export class InsightsConnection {
endTS: convertTimeToTimestamp(params.dataSource.api.endTS),
};
coreUrl = this.connEndpoints.scratchpad.import;
dsTypeString = "API";
break;
}
case DataSourceTypes.SQL: {
body.params = { query: params.dataSource.sql.query };
coreUrl = this.connEndpoints.scratchpad.importSql;
dsTypeString = "SQL";
break;
}
case DataSourceTypes.QSQL: {
Expand All @@ -558,7 +555,6 @@ export class InsightsConnection {
);

coreUrl = this.connEndpoints.scratchpad.importQsql;
dsTypeString = "QSQL";
break;
}
case DataSourceTypes.UDA: {
Expand Down Expand Up @@ -613,8 +609,6 @@ export class InsightsConnection {
{
logger,
params: { status: response.status },
telemetry:
"Datasource." + dsTypeString + ".Scratchpad.Populated.Errored",
},
);
} else {
Expand All @@ -624,7 +618,6 @@ export class InsightsConnection {
{
logger,
params: { status: response.status },
telemetry: "Datasource." + dsTypeString + ".Scratchpad.Populated",
},
);
}
Expand Down Expand Up @@ -840,7 +833,7 @@ export class InsightsConnection {
notify(
`Scratchpad reset for ${this.connLabel} executed successfully.`,
MessageKind.INFO,
{ logger, telemetry: "Scratchpad.Reseted" },
{ logger, telemetry: "Connection.Reset.ie.sp" },
);
return true;
})
Expand Down
4 changes: 1 addition & 3 deletions src/commands/dataSourceCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export async function addDataSource(): Promise<void> {
notify(
`Created ${fileName} in ${kdbDataSourcesFolderPath}.`,
MessageKind.INFO,
{ logger, telemetry: "Datasource.Created" },
{ logger },
);
}

Expand Down Expand Up @@ -157,7 +157,6 @@ export async function runDataSource(

notify(`Running ${fileContent.name} datasource...`, MessageKind.DEBUG, {
logger,
telemetry: "Datasource." + selectedType + ".Run",
});

const isNotebook = executorName.endsWith(".kxnb");
Expand Down Expand Up @@ -195,7 +194,6 @@ export async function runDataSource(
notify("Query execution failed.", MessageKind.DEBUG, {
logger,
params: res.error,
telemetry: "Datasource." + selectedType + ".Run.Error",
});
}
if (isNotebook || ext.isResultsTabVisible) {
Expand Down
Loading