mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-03 01:25:38 -05:00
Fix queryDocument.connect (#20682)
* Fix queryEditor.connect * Remove decorator * undo * fix test * Use connectionProfile for comparison * remove unused * Remove helper method
This commit is contained in:
@@ -24,12 +24,12 @@ export class ProviderConnectionInfo extends Disposable implements azdata.Connect
|
||||
|
||||
public constructor(
|
||||
protected capabilitiesService: ICapabilitiesService,
|
||||
model: string | azdata.IConnectionProfile | undefined
|
||||
model: string | azdata.IConnectionProfile | azdata.connection.ConnectionProfile | undefined
|
||||
) {
|
||||
super();
|
||||
// we can't really do a whole lot if we don't have a provider
|
||||
if (isString(model) || (model && model.providerName)) {
|
||||
this.providerName = isString(model) ? model : model.providerName;
|
||||
if (model) {
|
||||
this.providerName = isString(model) ? model : 'providerName' in model ? model.providerName : model.providerId;
|
||||
|
||||
if (!isString(model)) {
|
||||
if (model.options && this.serverCapabilities) {
|
||||
@@ -56,7 +56,7 @@ export class ProviderConnectionInfo extends Disposable implements azdata.Connect
|
||||
*
|
||||
* This handles the case where someone hasn't passed in a valid property bag, but doesn't cause errors when
|
||||
*/
|
||||
private updateSpecialValueType(typeName: SettableProperty, model: azdata.IConnectionProfile): void {
|
||||
private updateSpecialValueType(typeName: SettableProperty, model: azdata.IConnectionProfile | azdata.connection.ConnectionProfile): void {
|
||||
if (!this[typeName]) {
|
||||
this[typeName] = model[typeName]!;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user