Add a command line interface for connecting to a SQL Server (#3047)

* Add switches for server, database, user, integrated auth

* Refactor into new commandline service

* Open query editor when passed server on command line

* Add tests
This commit is contained in:
David Shiflet
2018-10-31 13:05:37 -04:00
committed by GitHub
parent 18671b7cca
commit 7f66087d8c
7 changed files with 318 additions and 22 deletions

View File

@@ -172,6 +172,10 @@ import { TelemetryService } from 'vs/platform/telemetry/common/telemetryService'
import { WorkbenchThemeService } from 'vs/workbench/services/themes/electron-browser/workbenchThemeService';
import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService';
import { IUriDisplayService, UriDisplayService } from 'vs/platform/uriDisplay/common/uriDisplay';
// {{SQL CARBON EDIT}}
import { ICommandLineProcessing } from 'sql/parts/commandLine/common/commandLine';
import { CommandLineService } from 'sql/parts/commandLine/common/commandLineService';
// {{SQL CARBON EDIT}}
interface WorkbenchParams {
configuration: IWindowConfiguration;
@@ -575,7 +579,9 @@ export class Workbench extends Disposable implements IPartService {
serviceCollection.set(IAccountManagementService, accountManagementService);
serviceCollection.set(IAccountPickerService, this.instantiationService.createInstance(AccountPickerService));
serviceCollection.set(IProfilerService, this.instantiationService.createInstance(ProfilerService));
// {{SQL CARBON EDIT}}
serviceCollection.set(ICommandLineProcessing, this.instantiationService.createInstance(CommandLineService));
// {{SQL CARBON EDIT}}
this._register(toDisposable(() => connectionManagementService.shutdown()));
this._register(toDisposable(() => accountManagementService.shutdown()));
this._register(toDisposable(() => capabilitiesService.shutdown()));