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 Karl Burtram
parent c072ba9c5c
commit f9e27d7112
7 changed files with 318 additions and 22 deletions

View File

@@ -62,6 +62,13 @@ export interface ParsedArgs {
'upload-logs'?: string;
'driver'?: string;
'driver-verbose'?: boolean;
// {{SQL CARBON EDIT}}
aad?: boolean;
database?: string;
integrated?: boolean;
server?: string;
user?: string;
// {{SQL CARBON EDIT}}
}
export const IEnvironmentService = createDecorator<IEnvironmentService>('environmentService');

View File

@@ -33,7 +33,12 @@ const options: minimist.Opts = {
'export-default-configuration',
'install-source',
'upload-logs',
'driver'
'driver',
// {{SQL CARBON EDIT}}
'database',
'server',
'user',
// {{SQL CARBON EDIT}}
],
boolean: [
'help',
@@ -66,7 +71,11 @@ const options: minimist.Opts = {
'status',
'file-write',
'file-chmod',
'driver-verbose'
'driver-verbose',
// {{SQL CARBON EDIT}}
'aad',
'integrated',
// {{SQL CARBON EDIT}}
],
alias: {
add: 'a',
@@ -85,6 +94,12 @@ const options: minimist.Opts = {
'debugBrkPluginHost': 'inspect-brk-extensions',
'debugSearch': 'inspect-search',
'debugBrkSearch': 'inspect-brk-search',
// {{SQL CARBON EDIT}}
database: 'D',
integrated: 'E',
server: 'S',
user: 'U',
// {{SQL CARBON EDIT}}
}
};