Add openQueryDocument API (#16117)

* Add openQueryDocument API

* Remove open call

* Change try name
This commit is contained in:
Charles Gagnon
2021-07-13 17:56:35 -07:00
committed by GitHub
parent a7311764be
commit a0f46fec65
7 changed files with 40 additions and 11 deletions

View File

@@ -80,11 +80,7 @@ export class PredictService {
predictParams.outputColumns || [],
predictParams);
}
let document = await this._apiWrapper.openTextDocument({
language: 'sql',
content: query
});
await this._apiWrapper.executeCommand('vscode.open', document.uri);
const document = await azdata.queryeditor.openQueryDocument({ content: query });
await this._apiWrapper.connect(document.uri.toString(), connection.connectionId);
this._apiWrapper.runQuery(document.uri.toString(), undefined, false);
return query;