mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-21 17:22:55 -05:00
Read server options from publish profile (#21960)
* Read encrypt and trust server certificate * Set hostname in certificate setting * Address comment- open connection dialog if the connection string in publish profile doesn't load a connection, instead of throwing an error.
This commit is contained in:
@@ -62,6 +62,18 @@ export class SqlConnectionDataSource extends DataSource {
|
||||
return this.getSetting(constants.passwordSetting);
|
||||
}
|
||||
|
||||
public get encrypt(): string {
|
||||
return this.getSetting(constants.encryptSetting);
|
||||
}
|
||||
|
||||
public get trustServerCertificate(): string {
|
||||
return this.getSetting(constants.trustServerCertificateSetting);
|
||||
}
|
||||
|
||||
public get hostnameInCertificate(): string {
|
||||
return this.getSetting(constants.hostnameInCertificateSetting);
|
||||
}
|
||||
|
||||
constructor(name: string, connectionString: string) {
|
||||
super(name);
|
||||
|
||||
@@ -100,7 +112,11 @@ export class SqlConnectionDataSource extends DataSource {
|
||||
providerName: 'MSSQL',
|
||||
saveProfile: true,
|
||||
id: this.name + '-dataSource',
|
||||
options: []
|
||||
options: {
|
||||
'encrypt': this.encrypt,
|
||||
'trustServerCertificate': this.trustServerCertificate,
|
||||
'hostnameInCertificate': this.hostnameInCertificate
|
||||
}
|
||||
};
|
||||
|
||||
return connProfile;
|
||||
|
||||
Reference in New Issue
Block a user