simplify drop object request handler (#1953)

* simplify drop object request handler

* fix test cases

* fix issues

* update strings

* fix error

* fix error
This commit is contained in:
Alan Ren
2023-03-20 21:54:34 -07:00
committed by GitHub
parent b4781cf267
commit 692f444ccb
14 changed files with 187 additions and 271 deletions

View File

@@ -0,0 +1,32 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
#nullable disable
using Microsoft.SqlTools.Hosting.Protocol.Contracts;
using Microsoft.SqlTools.Utility;
namespace Microsoft.SqlTools.ServiceLayer.ObjectManagement.Contracts
{
public class DropRequestParams : GeneralRequestDetails
{
/// <summary>
/// SFC (SMO) URN identifying the object
/// </summary>
public string ObjectUrn { get; set; }
/// <summary>
/// Connection uri
/// </summary>
public string ConnectionUri { get; set; }
/// <summary>
/// Whether to throw an error if the object does not exist. The default value is false.
/// </summary>
public bool ThrowIfNotExist { get; set; } = false;
}
public class DropRequest
{
public static readonly RequestType<DropRequestParams, bool> Type = RequestType<DropRequestParams, bool>.Create("objectManagement/drop");
}
}