Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added api completions #482

Merged
merged 3 commits into from
Dec 18, 2024
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
1 change: 1 addition & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ sonar.sources=src,server
sonar.tests=test
sonar.javascript.lcov.reportPaths=lcov.info
sonar.coverage.exclusions=server/src/utils/parserUtils.ts,src/ipc/**,src/models/**,src/extension.ts,src/classes/**,src/commands/installTools.ts,src/utils/cpUtils.ts
sonar.cpd.exclusions=src/services/completionProvider.ts
27 changes: 27 additions & 0 deletions src/services/completionProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1797,4 +1797,31 @@ const qLangParserItems: CompletionItem[] = [
"Zip defaults - If defined, is an integer list of default parameters for logical block size, compression algorithm and compression level that apply when saving to files with no file extension.",
documentation: ".z.zd:100 1 9",
},
{
label: ".com_kx_edi.getMeta",
detail: "This function returns the metadata of the databases.",
documentation: ".com_kx_edi.getMeta[]",
},
{
label: ".com_kx_edi.sql",
detail: "This function runs an SQL query.",
documentation: ".com_kx_edi.sql[query]",
},
{
label: ".com_kx_edi.qsql",
detail:
"This is a QSQL query builder that assembles QSQL queries based on a q expression.",
documentation: ".com_kx_edi.qsql[args]",
},
{
label: ".com_kx_edi.queryBuilder",
detail:
"The queryBuilder function uses the GetData API to construct queries.",
documentation: ".com_kx_edi.queryBuilder[args]",
},
{
label: ".com_kx_edi.uda",
detail: "Use this function to query a UDA.",
documentation: ".com_kx_edi.uda[args;name]",
},
];
6 changes: 5 additions & 1 deletion src/services/dataSourceEditorProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,11 @@ export class DataSourceEditorProvider implements CustomTextEditorProvider {
);
meta = Promise.resolve(<MetaObjectPayload>{});
this.cache.set(connLabel, meta);
kdbOutputLog("No database running in this Insights connection.", "ERROR");
kdbOutputLog(
"No database running in this Insights connection.",
"ERROR",
true,
);
}
return (await meta) || Promise.resolve(<MetaObjectPayload>{});
}
Expand Down
Loading