mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-19 09:35:36 -05:00
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:
@@ -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");
|
||||
}
|
||||
}
|
||||
@@ -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");
|
||||
}
|
||||
}
|
||||
@@ -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");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user