mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-16 10:58:30 -05:00
Feature/schemacompare Exclude-Include and Options enhancement (#799)
* Initial code for Including/Excluding individual changes (no tests added yet) * Adding Exclude include tests. Default options call and additional options tests. * Taking PR comments * Retry in test for reliability
This commit is contained in:
@@ -41,8 +41,6 @@ namespace Microsoft.SqlTools.ServiceLayer.SchemaCompare
|
||||
|
||||
public List<DiffEntry> Differences;
|
||||
|
||||
public DacDeployOptions DefaultOptions;
|
||||
|
||||
public SchemaCompareOperation(SchemaCompareParams parameters, ConnectionInfo sourceConnInfo, ConnectionInfo targetConnInfo)
|
||||
{
|
||||
Validate.IsNotNull("parameters", parameters);
|
||||
@@ -134,8 +132,13 @@ namespace Microsoft.SqlTools.ServiceLayer.SchemaCompare
|
||||
return dacOptions;
|
||||
}
|
||||
|
||||
private DiffEntry CreateDiffEntry(SchemaDifference difference, DiffEntry parent)
|
||||
internal static DiffEntry CreateDiffEntry(SchemaDifference difference, DiffEntry parent)
|
||||
{
|
||||
if(difference == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
DiffEntry diffEntry = new DiffEntry();
|
||||
diffEntry.UpdateAction = difference.UpdateAction;
|
||||
diffEntry.DifferenceType = difference.DifferenceType;
|
||||
@@ -207,13 +210,13 @@ namespace Microsoft.SqlTools.ServiceLayer.SchemaCompare
|
||||
return ConnectionService.BuildConnectionString(connInfo.ConnectionDetails);
|
||||
}
|
||||
|
||||
private string RemoveExcessWhitespace(string script)
|
||||
private static string RemoveExcessWhitespace(string script)
|
||||
{
|
||||
// replace all multiple spaces with single space
|
||||
return Regex.Replace(script, " {2,}", " ");
|
||||
}
|
||||
|
||||
private string GetName(string name)
|
||||
private static string GetName(string name)
|
||||
{
|
||||
// remove brackets from name
|
||||
return Regex.Replace(name, @"[\[\]]", "");
|
||||
|
||||
Reference in New Issue
Block a user