mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-17 01:25:36 -05:00
Added Unified connection support (#3785)
* Added Unified connection support * Use generic way to do expandNode. Cleanup the ported code and removed unreference code. Added as needed later. Resolved PR comments. * Minor fixes and removed timer for all expanders for now. If any providers can't response, the tree node will spin and wait. We may improve later. * Change handSessionClose to not thenable. Added a node to OE to show error message instead of reject. So we could show partial expanded result if get any. Resolve PR comments * Minor fixes of PR comments
This commit is contained in:
51
src/sql/sqlops.d.ts
vendored
51
src/sql/sqlops.d.ts
vendored
@@ -21,6 +21,8 @@ declare module 'sqlops' {
|
||||
|
||||
export function registerObjectExplorerProvider(provider: ObjectExplorerProvider): vscode.Disposable;
|
||||
|
||||
export function registerObjectExplorerNodeProvider(provider: ObjectExplorerNodeProvider): vscode.Disposable;
|
||||
|
||||
export function registerTaskServicesProvider(provider: TaskServicesProvider): vscode.Disposable;
|
||||
|
||||
export function registerFileBrowserProvider(provider: FileBrowserProvider): vscode.Disposable;
|
||||
@@ -101,6 +103,13 @@ declare module 'sqlops' {
|
||||
*/
|
||||
export function getCredentials(connectionId: string): Thenable<{ [name: string]: string }>;
|
||||
|
||||
/**
|
||||
* Get ServerInfo for a connectionId
|
||||
* @param {string} connectionId The id of the connection
|
||||
* @returns ServerInfo
|
||||
*/
|
||||
export function getServerInfo(connectionId: string): Thenable<ServerInfo>;
|
||||
|
||||
/**
|
||||
* Interface for representing a connection when working with connection APIs
|
||||
*/
|
||||
@@ -150,6 +159,13 @@ declare module 'sqlops' {
|
||||
*/
|
||||
export function findNodes(connectionId: string, type: string, schema: string, name: string, database: string, parentObjectNames: string[]): Thenable<ObjectExplorerNode[]>;
|
||||
|
||||
/**
|
||||
* Get connectionProfile from sessionId
|
||||
* *@param {string} sessionId The id of the session that the node exists on
|
||||
* @returns {IConnectionProfile} The IConnecitonProfile for the session
|
||||
*/
|
||||
export function getSessionConnectionProfile(sessionId: string): Thenable<IConnectionProfile>;
|
||||
|
||||
/**
|
||||
* Interface for representing and interacting with items in Object Explorer
|
||||
*/
|
||||
@@ -347,6 +363,10 @@ declare module 'sqlops' {
|
||||
* The Operating System version string of the machine running the instance.
|
||||
*/
|
||||
osVersion: string;
|
||||
/**
|
||||
* options for all new server properties.
|
||||
*/
|
||||
options: {};
|
||||
}
|
||||
|
||||
export interface DataProvider {
|
||||
@@ -1163,22 +1183,41 @@ declare module 'sqlops' {
|
||||
nodes: NodeInfo[];
|
||||
}
|
||||
|
||||
export interface ObjectExplorerProvider extends DataProvider {
|
||||
createNewSession(connInfo: ConnectionInfo): Thenable<ObjectExplorerSessionResponse>;
|
||||
|
||||
export interface ObjectExplorerProviderBase extends DataProvider {
|
||||
expandNode(nodeInfo: ExpandNodeInfo): Thenable<boolean>;
|
||||
|
||||
refreshNode(nodeInfo: ExpandNodeInfo): Thenable<boolean>;
|
||||
|
||||
closeSession(closeSessionInfo: ObjectExplorerCloseSessionInfo): Thenable<ObjectExplorerCloseSessionResponse>;
|
||||
|
||||
findNodes(findNodesInfo: FindNodesInfo): Thenable<ObjectExplorerFindNodesResponse>;
|
||||
|
||||
registerOnExpandCompleted(handler: (response: ObjectExplorerExpandInfo) => any): void;
|
||||
}
|
||||
|
||||
export interface ObjectExplorerProvider extends ObjectExplorerProviderBase {
|
||||
createNewSession(connInfo: ConnectionInfo): Thenable<ObjectExplorerSessionResponse>;
|
||||
|
||||
closeSession(closeSessionInfo: ObjectExplorerCloseSessionInfo): Thenable<ObjectExplorerCloseSessionResponse>;
|
||||
|
||||
registerOnSessionCreated(handler: (response: ObjectExplorerSession) => any): void;
|
||||
|
||||
registerOnSessionDisconnected?(handler: (response: ObjectExplorerSession) => any): void;
|
||||
}
|
||||
|
||||
registerOnExpandCompleted(handler: (response: ObjectExplorerExpandInfo) => any): void;
|
||||
export interface ObjectExplorerNodeProvider extends ObjectExplorerProviderBase {
|
||||
/**
|
||||
* The providerId for whichever type of ObjectExplorer connection this can add folders and objects to
|
||||
*/
|
||||
readonly supportedProviderId: string;
|
||||
|
||||
/**
|
||||
* Optional group name used to sort nodes in the tree. If not defined, the node order will be added in order based on provider ID, with
|
||||
* nodes from the main ObjectExplorerProvider for this provider type added first
|
||||
*/
|
||||
readonly group?: string;
|
||||
|
||||
handleSessionOpen(session: ObjectExplorerSession): Thenable<boolean>;
|
||||
|
||||
handleSessionClose(closeSessionInfo: ObjectExplorerCloseSessionInfo): void;
|
||||
}
|
||||
|
||||
// Admin Services interfaces -----------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user