Add Detach Database option to database context menu (#23480)

This commit is contained in:
Cory Rivera
2023-06-27 12:32:09 -07:00
committed by GitHub
parent fcb56da720
commit e5aa752740
12 changed files with 176 additions and 10 deletions

View File

@@ -974,6 +974,16 @@ declare module 'mssql' {
* @param schema Schema to search in.
*/
search(contextId: string, objectTypes: string[], searchText?: string, schema?: string): Thenable<ObjectManagement.SearchResultItem[]>;
/**
* Detach a database.
* @param connectionUri The URI of the server connection.
* @param objectUrn SMO Urn of the database to be detached. More information: https://learn.microsoft.com/sql/relational-databases/server-management-objects-smo/overview-smo
* @param dropConnections Whether to drop active connections to this database.
* @param updateStatistics Whether to update the optimization statistics related to this database.
* @param generateScript Whether to generate a TSQL script for the operation instead of detaching the database.
* @returns A string value representing the generated TSQL query if generateScript was set to true, and an empty string otherwise.
*/
detachDatabase(connectionUri: string, objectUrn: string, dropConnections: boolean, updateStatistics: boolean, generateScript: boolean): Thenable<string>;
}
// Object Management - End.
}