mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-24 13:50:29 -04:00
Add Detach Database option to database context menu (#23480)
This commit is contained in:
@@ -65,6 +65,11 @@ export class ObjectManagementService extends BaseService implements IObjectManag
|
||||
const params: contracts.SearchObjectRequestParams = { contextId, searchText, objectTypes, schema };
|
||||
return this.runWithErrorHandling(contracts.SearchObjectRequest.type, params);
|
||||
}
|
||||
|
||||
async detachDatabase(connectionUri: string, objectUrn: string, dropConnections: boolean, updateStatistics: boolean, generateScript: boolean): Promise<string> {
|
||||
const params: contracts.DetachDatabaseRequestParams = { connectionUri, objectUrn, dropConnections, updateStatistics, generateScript };
|
||||
return this.runWithErrorHandling(contracts.DetachDatabaseRequest.type, params);
|
||||
}
|
||||
}
|
||||
|
||||
const ServerLevelSecurableTypes: SecurableTypeMetadata[] = [
|
||||
@@ -232,6 +237,10 @@ export class TestObjectManagementService implements IObjectManagementService {
|
||||
return this.delayAndResolve(items);
|
||||
}
|
||||
|
||||
async detachDatabase(connectionUri: string, objectUrn: string, dropConnections: boolean, updateStatistics: boolean, generateScript: boolean): Promise<string> {
|
||||
return this.delayAndResolve('');
|
||||
}
|
||||
|
||||
private generateSearchResult(objectType: ObjectManagement.NodeType, schema: string | undefined, count: number): ObjectManagement.SearchResultItem[] {
|
||||
let items: ObjectManagement.SearchResultItem[] = [];
|
||||
for (let i = 0; i < count; i++) {
|
||||
|
||||
Reference in New Issue
Block a user