Initial check-in of SqlProjects service addition to SqlToolsService (#1805)

* initial commit

* Initial SqlProjects service + tests

* Added SqlObject script tests; PR feedback

* Added comments for contracts

* Swapping SqlProjectResult for ResultStatus

* Updating tests

* Added automatic test base that provides a working directory and automatic cleanup.
This commit is contained in:
Benjin Dubishar
2023-01-25 14:16:15 -08:00
committed by GitHub
parent da6bb1c6c3
commit 9cce26fcbd
16 changed files with 553 additions and 1 deletions

View File

@@ -0,0 +1,15 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using Microsoft.SqlTools.Hosting.Protocol.Contracts;
using Microsoft.SqlTools.ServiceLayer.Utility;
namespace Microsoft.SqlTools.ServiceLayer.SqlProjects.Contracts
{
public class CloseSqlProjectRequest
{
public static readonly RequestType<SqlProjectParams, ResultStatus> Type = RequestType<SqlProjectParams, ResultStatus>.Create("sqlprojects/closeProject");
}
}

View File

@@ -0,0 +1,39 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using Microsoft.SqlServer.Dac.Projects;
using Microsoft.SqlTools.Hosting.Protocol.Contracts;
using Microsoft.SqlTools.ServiceLayer.Utility;
namespace Microsoft.SqlTools.ServiceLayer.SqlProjects.Contracts
{
/// <summary>
/// Parameters for creating a new SQL Project
/// </summary>
public class NewSqlProjectParams : SqlProjectParams
{
/// <summary>
/// Type of SQL Project: SDK-style or Legacy
/// </summary>
public ProjectType SqlProjectType { get; set; }
/// <summary>
/// Database schema provider for the project, in the format
/// "Microsoft.Data.Tools.Schema.Sql.SqlXYZDatabaseSchemaProvider".
/// Case sensitive.
/// </summary>
public string? DatabaseSchemaProvider { get; set; }
/// <summary>
/// Version of the Microsoft.Build.Sql SDK for the project, if overriding the default
/// </summary>
public string? BuildSdkVersion { get; set; }
}
public class NewSqlProjectRequest
{
public static readonly RequestType<NewSqlProjectParams, ResultStatus> Type = RequestType<NewSqlProjectParams, ResultStatus>.Create("sqlprojects/newProject");
}
}

View File

@@ -0,0 +1,15 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using Microsoft.SqlTools.Hosting.Protocol.Contracts;
using Microsoft.SqlTools.ServiceLayer.Utility;
namespace Microsoft.SqlTools.ServiceLayer.SqlProjects.Contracts
{
public class OpenSqlProjectRequest
{
public static readonly RequestType<SqlProjectParams, ResultStatus> Type = RequestType<SqlProjectParams, ResultStatus>.Create("sqlprojects/openProject");
}
}