mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-21 09:35:38 -05:00
support for connect with connection string (#19355)
* wip * WIP * radio button * handle connection string * fix test * fix test * fix test cases * remember password * pr comments * pr comments
This commit is contained in:
@@ -20,6 +20,20 @@ export const clientCapabilities = {
|
||||
hostVersion: HOST_VERSION
|
||||
};
|
||||
|
||||
/**
|
||||
* The connection string options for connection provider.
|
||||
*/
|
||||
export interface ConnectionStringOptions {
|
||||
/**
|
||||
* Whether the connection provider supports connection string as an input option. The default value is false.
|
||||
*/
|
||||
isEnabled?: boolean;
|
||||
/**
|
||||
* Whether the connection provider uses connection string as the default option to connect. The default value is false.
|
||||
*/
|
||||
isDefault?: boolean;
|
||||
}
|
||||
|
||||
export interface ConnectionProviderProperties {
|
||||
providerId: string;
|
||||
iconPath?: URI | IconPath | { id: string, path: IconPath, default?: boolean }[]
|
||||
@@ -29,6 +43,7 @@ export interface ConnectionProviderProperties {
|
||||
connectionOptions: azdata.ConnectionOption[];
|
||||
isQueryProvider?: boolean;
|
||||
supportedExecutionPlanFileExtensions?: string[];
|
||||
connectionStringOptions?: ConnectionStringOptions;
|
||||
}
|
||||
|
||||
export interface ProviderFeatures {
|
||||
|
||||
@@ -40,6 +40,10 @@ export class CapabilitiesService extends Disposable implements ICapabilitiesServ
|
||||
}
|
||||
// By default isQueryProvider is true.
|
||||
provider.connection.isQueryProvider = provider.connection.isQueryProvider !== false;
|
||||
provider.connection.connectionStringOptions = {
|
||||
isEnabled: !!(provider.connection.connectionStringOptions?.isEnabled),
|
||||
isDefault: !!(provider.connection.connectionStringOptions?.isDefault)
|
||||
};
|
||||
this._onCapabilitiesRegistered.fire({ id, features: provider });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user