Feature/schemacompare scmp save (#824)

* First cut of scmp Save related changes and some test refactoring

* Adding Exclude/Include objects in saving

* Add diff entry validation as part of test

* Adding PR comments - major change is change to nameparts in place of name hence preserving any "."/"[" in name and avoiding any string operations

* One more UT scenario addition for create excluded object
This commit is contained in:
udeeshagautam
2019-06-13 17:28:59 -07:00
committed by GitHub
parent b451670222
commit 432e054d55
11 changed files with 883 additions and 235 deletions

View File

@@ -88,12 +88,14 @@ namespace Microsoft.SqlTools.ServiceLayer.SchemaCompare.Contracts
public SchemaUpdateAction UpdateAction { get; set; }
public SchemaDifferenceType DifferenceType { get; set; }
public string Name { get; set; }
public string SourceValue { get; set; }
public string TargetValue { get; set; }
public string[] SourceValue { get; set; }
public string[] TargetValue { get; set; }
public DiffEntry Parent { get; set; }
public List<DiffEntry> Children { get; set; }
public string SourceScript { get; set; }
public string TargetScript { get; set; }
public string SourceObjectType { get; set; }
public string TargetObjectType { get; set; }
}
/// <summary>

View File

@@ -0,0 +1,35 @@
//
// 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.SchemaCompare.Contracts
{
internal class SchemaCompareSaveScmpParams : SchemaCompareParams
{
/// <summary>
/// Gets or sets the File Path for scmp
/// </summary>
public string ScmpFilePath { get; set; }
/// <summary>
/// Excluded source objects
/// </summary>
public SchemaCompareObjectId[] ExcludedSourceObjects { get; set; }
/// <summary>
/// Excluded Target objects
/// </summary>
public SchemaCompareObjectId[] ExcludedTargetObjects { get; set; }
}
internal class SchemaCompareSaveScmpRequest
{
public static readonly RequestType<SchemaCompareSaveScmpParams, ResultStatus> Type =
RequestType<SchemaCompareSaveScmpParams, ResultStatus>.Create("schemaCompare/saveScmp");
}
}