Simplify Object Management APIs (#2015)

* unify requests-wip

* wip

* unify api

* fix test

* add credential handler

* fix credential handler issue.

* generic type update

* fix scripting for user
This commit is contained in:
Alan Ren
2023-04-19 15:43:01 -07:00
committed by GitHub
parent 98ad0197e4
commit e314f839d8
57 changed files with 1802 additions and 2234 deletions

View File

@@ -0,0 +1,48 @@
//
// 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 InitializeViewRequestParams : GeneralRequestDetails
{
/// <summary>
/// The connection uri.
/// </summary>
public string ConnectionUri { get; set; }
/// <summary>
/// The target database name.
/// </summary>
public string Database { get; set; }
/// <summary>
/// The object type.
/// </summary>
public SqlObjectType ObjectType { get; set; }
/// <summary>
/// Whether the view is for a new object.
/// </summary>
public bool IsNewObject { get; set; }
/// <summary>
/// The object view context id.
/// </summary>
public string ContextId { get; set; }
/// <summary>
/// Urn of the parent object.
/// </summary>
public string ParentUrn { get; set; }
/// <summary>
/// Urn of the object. Only set when the view is for an existing object.
/// </summary>
public string ObjectUrn { get; set; }
}
public class InitializeViewRequest
{
public static readonly RequestType<InitializeViewRequestParams, SqlObjectViewInfo> Type = RequestType<InitializeViewRequestParams, SqlObjectViewInfo>.Create("objectManagement/initializeView");
}
}