mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-16 10:58:30 -05:00
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:
@@ -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>
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user