mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-24 13:50:29 -04:00
support rename for login, user and a few other types (#22331)
* rename object * add comment * use URN property * vbump STS * revert loc string change * fix name check * pr comments
This commit is contained in:
@@ -136,6 +136,16 @@ export class ObjectManagementService implements IObjectManagementService {
|
||||
}
|
||||
);
|
||||
}
|
||||
rename(connectionUri: string, objectUrn: string, newName: string): Thenable<void> {
|
||||
const params: contracts.RenameObjectRequestParams = { connectionUri, objectUrn, newName };
|
||||
return this.client.sendRequest(contracts.RenameObjectRequest.type, params).then(
|
||||
r => { },
|
||||
e => {
|
||||
this.client.logFailedRequest(contracts.RenameObjectRequest.type, e);
|
||||
return Promise.reject(new Error(e.message));
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export class TestObjectManagementService implements IObjectManagementService {
|
||||
@@ -292,6 +302,9 @@ export class TestObjectManagementService implements IObjectManagementService {
|
||||
}
|
||||
async disposeUserView(contextId: string): Promise<void> {
|
||||
}
|
||||
async rename(connectionUri: string, objectUrn: string, newName: string): Promise<void> {
|
||||
return this.delayAndResolve();
|
||||
}
|
||||
|
||||
private delayAndResolve(): Promise<void> {
|
||||
return new Promise((resolve, reject) => {
|
||||
|
||||
Reference in New Issue
Block a user