mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-16 01:25:36 -05:00
Add findNodes Object Explorer API (#916)
This commit is contained in:
27
src/sql/sqlops.d.ts
vendored
27
src/sql/sqlops.d.ts
vendored
@@ -129,6 +129,18 @@ declare module 'sqlops' {
|
||||
*/
|
||||
export function getActiveConnectionNodes(): Thenable<ObjectExplorerNode[]>;
|
||||
|
||||
/**
|
||||
* Find Object Explorer nodes that match the given information
|
||||
* @param {string} connectionId The id of the connection that the node exists on
|
||||
* @param {string} type The type of the object to retrieve
|
||||
* @param {string} schema The schema of the object, if applicable
|
||||
* @param {string} name The name of the object
|
||||
* @param {string} database The database the object exists under, if applicable
|
||||
* @param {string[]} parentObjectNames A list of names of parent objects in the tree, ordered from highest to lowest level
|
||||
* (for example when searching for a table's column, provide the name of its parent table for this argument)
|
||||
*/
|
||||
export function findNodes(connectionId: string, type: string, schema: string, name: string, database: string, parentObjectNames: string[]): Thenable<ObjectExplorerNode[]>;
|
||||
|
||||
/**
|
||||
* Interface for representing and interacting with items in Object Explorer
|
||||
*/
|
||||
@@ -942,6 +954,15 @@ declare module 'sqlops' {
|
||||
nodePath: string;
|
||||
}
|
||||
|
||||
export interface FindNodesInfo {
|
||||
sessionId: string;
|
||||
type: string;
|
||||
schema: string;
|
||||
name: string;
|
||||
database: string;
|
||||
parentObjectNames: string[];
|
||||
}
|
||||
|
||||
export interface ObjectExplorerCloseSessionInfo {
|
||||
sessionId: string;
|
||||
}
|
||||
@@ -951,6 +972,10 @@ declare module 'sqlops' {
|
||||
success: boolean;
|
||||
}
|
||||
|
||||
export interface ObjectExplorerFindNodesResponse {
|
||||
nodes: NodeInfo[];
|
||||
}
|
||||
|
||||
export interface ObjectExplorerProvider extends DataProvider {
|
||||
createNewSession(connInfo: ConnectionInfo): Thenable<ObjectExplorerSessionResponse>;
|
||||
|
||||
@@ -960,6 +985,8 @@ declare module 'sqlops' {
|
||||
|
||||
closeSession(closeSessionInfo: ObjectExplorerCloseSessionInfo): Thenable<ObjectExplorerCloseSessionResponse>;
|
||||
|
||||
findNodes(findNodesInfo: FindNodesInfo): Thenable<ObjectExplorerFindNodesResponse>;
|
||||
|
||||
registerOnSessionCreated(handler: (response: ObjectExplorerSession) => any);
|
||||
|
||||
registerOnExpandCompleted(handler: (response: ObjectExplorerExpandInfo) => any);
|
||||
|
||||
Reference in New Issue
Block a user