fixed db trigger, system types and oe tests (#331)

* fixed db trigger, system types and oe tests
This commit is contained in:
Leila Lali
2017-04-28 09:44:45 -07:00
committed by GitHub
parent c4227c2e24
commit c46032c71f
13 changed files with 690 additions and 565 deletions

View File

@@ -4,7 +4,9 @@
//
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.Nodes
{
@@ -76,6 +78,22 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.Nodes
filter = $"{filter} {orPrefix} @{Property} = {proeprtyValue}";
}
}
filter = $"({filter})";
return filter;
}
public static string ConcatProperties(IEnumerable<NodeFilter> filters)
{
string filter = "";
var list = filters.ToList();
for (int i = 0; i < list.Count; i++)
{
var value = list[i];
string orPrefix = i == 0 ? "" : "and";
filter = $"{filter} {orPrefix} {value.ToPropertyFilterString()}";
}
filter = $"[{filter}]";
return filter;