mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-17 01:25:40 -05:00
Add extra delete database functionality to DatabaseHandler (#2168)
* Also fixed connections not being properly closed in Detach operations * Fixed errors being thrown in InitializeObjectView because certain db property fields are not supported against Azure
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
//
|
||||
// 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 DropDatabaseRequestParams : GeneralRequestDetails
|
||||
{
|
||||
/// <summary>
|
||||
/// SFC (SMO) URN identifying the object
|
||||
/// </summary>
|
||||
public string ObjectUrn { get; set; }
|
||||
/// <summary>
|
||||
/// URI of the underlying connection for this request
|
||||
/// </summary>
|
||||
public string ConnectionUri { get; set; }
|
||||
/// <summary>
|
||||
/// Whether to drop active connections to this database
|
||||
/// </summary>
|
||||
public bool DropConnections { get; set; }
|
||||
/// <summary>
|
||||
/// Whether to delete the backup and restore history for this database
|
||||
/// </summary>
|
||||
public bool DeleteBackupHistory { get; set; }
|
||||
/// <summary>
|
||||
/// Whether to generate a TSQL script for the operation instead of dropping the database
|
||||
/// </summary>
|
||||
public bool GenerateScript { get; set; }
|
||||
}
|
||||
|
||||
public class DropDatabaseRequest
|
||||
{
|
||||
public static readonly RequestType<DropDatabaseRequestParams, string> Type = RequestType<DropDatabaseRequestParams, string>.Create("objectManagement/dropDatabase");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user