Skip to content

Commit af183bf

Browse files
authored
vBump STS to 1.9.5 & add optional application name parameter for connection string (#17231)
* do not include application name for connection string * update STS to latest * update frameworks names
1 parent 114b3e3 commit af183bf

File tree

6 files changed

+27
-18
lines changed

6 files changed

+27
-18
lines changed

src/configurations/dev.config.json

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
{
22
"service": {
33
"downloadUrl": "https://github.com/Microsoft/sqltoolsservice/releases/download/v{#version#}/microsoft.sqltools.servicelayer-{#fileName#}",
4-
"version": "3.0.0-release.174",
4+
"version": "3.0.0-release.195",
55
"downloadFileNames": {
6-
"Windows_7_86": "win-x86-net5.0.zip",
7-
"Windows_7_64": "win-x64-net5.0.zip",
8-
"OSX_10_11_64": "osx-x64-net5.0.tar.gz",
9-
"CentOS_7": "rhel-x64-net5.0.tar.gz",
10-
"Debian_8": "rhel-x64-net5.0.tar.gz",
11-
"Fedora_23": "rhel-x64-net5.0.tar.gz",
12-
"OpenSUSE_13_2": "rhel-x64-net5.0.tar.gz",
13-
"SLES_12_2": "rhel-x64-net5.0.tar.gz",
14-
"RHEL_7": "rhel-x64-net5.0.tar.gz",
15-
"Ubuntu_14": "rhel-x64-net5.0.tar.gz",
16-
"Ubuntu_16": "rhel-x64-net5.0.tar.gz"
6+
"Windows_7_86": "win-x86-net6.0.zip",
7+
"Windows_7_64": "win-x64-net6.0.zip",
8+
"OSX_10_11_64": "osx-x64-net6.0.tar.gz",
9+
"CentOS_7": "rhel-x64-net6.0.tar.gz",
10+
"Debian_8": "rhel-x64-net6.0.tar.gz",
11+
"Fedora_23": "rhel-x64-net6.0.tar.gz",
12+
"OpenSUSE_13_2": "rhel-x64-net6.0.tar.gz",
13+
"SLES_12_2": "rhel-x64-net6.0.tar.gz",
14+
"RHEL_7": "rhel-x64-net6.0.tar.gz",
15+
"Ubuntu_14": "rhel-x64-net6.0.tar.gz",
16+
"Ubuntu_16": "rhel-x64-net6.0.tar.gz"
1717
},
1818
"installDir": "../sqltoolsservice/{#version#}/{#platform#}",
1919
"executableFiles": [

src/controllers/connectionManager.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -263,12 +263,14 @@ export default class ConnectionManager {
263263
* Get the connection string for the provided connection Uri
264264
* @param connectionUri The connection Uri for the connection.
265265
* @param includePassword (optional) if password should be included in connection string.
266+
* @param includeApplicationName (optional) if application name should be included in connection string.
266267
* @returns connection string for the connection
267268
*/
268-
public async getConnectionString(connectionUri: string, includePassword: boolean = false): Promise<string> {
269+
public async getConnectionString(connectionUri: string, includePassword: boolean = false, includeApplicationName: boolean = true): Promise<string> {
269270
const listParams = new ConnectionContracts.GetConnectionStringParams();
270271
listParams.ownerUri = connectionUri;
271272
listParams.includePassword = includePassword;
273+
listParams.includeApplicationName = includeApplicationName;
272274
return this.client.sendRequest(ConnectionContracts.GetConnectionStringRequest.type, listParams);
273275
}
274276

src/controllers/mainController.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ export default class MainController implements vscode.Disposable {
443443
// Generate Azure Function command
444444
this._context.subscriptions.push(vscode.commands.registerCommand(Constants.cmdCreateAzureFunction, async (node: TreeNodeInfo) => {
445445
const connectionUri = this._connectionMgr.getUriForConnection(node.connectionInfo);
446-
const connectionString = await this._connectionMgr.getConnectionString(connectionUri);
446+
const connectionString = await this._connectionMgr.getConnectionString(connectionUri, false, false);
447447
await this.azureFunctionsService.createAzureFunction(connectionString, node.metadata.schema, node.metadata.name);
448448
}));
449449
}

src/extension.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ export async function activate(context: vscode.ExtensionContext): Promise<IExten
6262
dacFx: controller.dacFxService,
6363
schemaCompare: controller.schemaCompareService,
6464
azureFunctions: controller.azureFunctionsService,
65-
getConnectionString: (connectionUri: string, includePassword: boolean) => {
66-
return controller.connectionManager.getConnectionString(connectionUri, includePassword);
65+
getConnectionString: (connectionUri: string, includePassword?: boolean, includeApplicationName?: boolean) => {
66+
return controller.connectionManager.getConnectionString(connectionUri, includePassword, includeApplicationName);
6767
}
6868
};
6969
}

src/models/contracts/connection.ts

+6
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,12 @@ export class GetConnectionStringParams {
276276
* Indicates whether to include the password in the connection string
277277
*/
278278
public includePassword?: boolean;
279+
280+
/**
281+
* Indicates whether to include the password in the connection string
282+
* default is set to true
283+
*/
284+
public includeApplicationName?: boolean;
279285
}
280286

281287
// ------------------------------- </ Connection String Request > --------------------------------------

typings/vscode-mssql.d.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,11 @@ declare module 'vscode-mssql' {
7979
/**
8080
* Get the connection string for the provided connection Uri
8181
* @param connectionUri The URI of the connection to get the connection string for.
82-
* @param includePassword to include password with connection string
82+
* @param includePassword Whether the Password is included in the connection string. Default is false.
83+
* @param includeApplicationName Whether the Application Name is included in the connection string. Default is true
8384
* @returns connection string
8485
*/
85-
getConnectionString(connectionUri: String, includePassword?: boolean): Promise<string>;
86+
getConnectionString(connectionUri: String, includePassword?: boolean, includeApplicationName?: boolean): Promise<string>;
8687
}
8788

8889
/**

0 commit comments

Comments
 (0)