Fix delete database reference request (#22214)

This commit is contained in:
Kim Santiago
2023-03-08 11:03:44 -08:00
committed by GitHub
parent 3937f62ce4
commit 954d521a83
4 changed files with 7 additions and 7 deletions

View File

@@ -1,6 +1,6 @@
{
"downloadUrl": "https://github.com/Microsoft/sqltoolsservice/releases/download/{#version#}/microsoft.sqltools.servicelayer-{#fileName#}",
"version": "4.6.0.2",
"version": "4.6.0.3",
"downloadFileNames": {
"Windows_86": "win-x86-net7.0.zip",
"Windows_64": "win-x64-net7.0.zip",

View File

@@ -779,7 +779,7 @@ export namespace AddSystemDatabaseReferenceRequest {
}
export namespace DeleteDatabaseReferenceRequest {
export const type = new RequestType<SqlProjectScriptParams, azdata.ResultStatus, void, void>('sqlprojects/deleteDatabaseReference');
export const type = new RequestType<DeleteDatabaseReferenceParams, azdata.ResultStatus, void, void>('sqlprojects/deleteDatabaseReference');
}
export namespace GetDatabaseReferencesRequest {

View File

@@ -354,9 +354,9 @@ declare module 'mssql' {
/**
* Delete a database reference from a project
* @param projectUri Absolute path of the project, including .sqlproj
* @param path Path of the script, including .sql, relative to the .sqlproj
* @param name Name of the reference to be deleted. Name of the System DB, path of the sqlproj, or path of the dacpac
*/
deleteDatabaseReference(projectUri: string, path: string): Promise<azdata.ResultStatus>;
deleteDatabaseReference(projectUri: string, name: string): Promise<azdata.ResultStatus>;
/**
* Add a folder to a project

View File

@@ -79,10 +79,10 @@ export class SqlProjectsService implements mssql.ISqlProjectsService {
/**
* Delete a database reference from a project
* @param projectUri Absolute path of the project, including .sqlproj
* @param path Path of the script, including .sql, relative to the .sqlproj
* @param name Name of the reference to be deleted. Name of the System DB, path of the sqlproj, or path of the dacpac
*/
public async deleteDatabaseReference(projectUri: string, path: string): Promise<azdata.ResultStatus> {
const params: contracts.SqlProjectScriptParams = { projectUri: projectUri, path: path };
public async deleteDatabaseReference(projectUri: string, name: string): Promise<azdata.ResultStatus> {
const params: contracts.DeleteDatabaseReferenceParams = { projectUri: projectUri, name: name };
return await this.runWithErrorHandling(contracts.DeleteDatabaseReferenceRequest.type, params);
}