mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-14 17:22:20 -05:00
SQL Kernel Improvements/Removing Spark Code from Core/Attach to Changes (#3790)
* Scenarios work besides loading saved kernel * Fix compilation issue * Save and load functional * Fix loading kernesl issue when sql kernel is not enabled * Fix language mapping to not be hardcoded any longer * Remove unnecessary comment * PR Comments vol. 1 * Code cleanup, use ConnectionProfile instead of IConnectionProfile when accessing serverName * PR changes vol. 2 * One final comment for PR * Fix linting issue
This commit is contained in:
@@ -288,11 +288,30 @@ class SessionWrapper implements sqlops.nb.ISession {
|
||||
return this.doChangeKernel(kernelInfo);
|
||||
}
|
||||
|
||||
configureKernel(kernelInfo: sqlops.nb.IKernelSpec): Thenable<void> {
|
||||
return this.doConfigureKernel(kernelInfo);
|
||||
}
|
||||
|
||||
configureConnection(connection: sqlops.IConnectionProfile): Thenable<void> {
|
||||
if (connection['capabilitiesService'] !== undefined) {
|
||||
connection['capabilitiesService'] = undefined;
|
||||
}
|
||||
return this.doConfigureConnection(connection);
|
||||
}
|
||||
|
||||
private async doChangeKernel(kernelInfo: sqlops.nb.IKernelSpec): Promise<sqlops.nb.IKernel> {
|
||||
let kernelDetails = await this._proxy.ext.$changeKernel(this.sessionDetails.sessionId, kernelInfo);
|
||||
this._kernel = new KernelWrapper(this._proxy, kernelDetails);
|
||||
return this._kernel;
|
||||
}
|
||||
|
||||
private async doConfigureKernel(kernelInfo: sqlops.nb.IKernelSpec): Promise<void> {
|
||||
await this._proxy.ext.$configureKernel(this.sessionDetails.sessionId, kernelInfo);
|
||||
}
|
||||
|
||||
private async doConfigureConnection(connection: sqlops.IConnectionProfile): Promise<void> {
|
||||
await this._proxy.ext.$configureConnection(this.sessionDetails.sessionId, connection);
|
||||
}
|
||||
}
|
||||
|
||||
class KernelWrapper implements sqlops.nb.IKernel {
|
||||
|
||||
Reference in New Issue
Block a user