コード例 #1
0
ファイル: WhereClause.cs プロジェクト: sekcheong/parser
 private Dictionary<string, Table> SelectFactTableRows(Dictionary<string, Table> fromList, Table facts)
 {
     Dictionary<string, Table> selFacts = new Dictionary<string, Table>();
     foreach (var item in fromList) {
         Table s = item.Value;
         for (int i = 0; i < s.Rows; i++) {
             var attrId = s[i, "AttrID"];
             var f = facts.Select(new Predicate("AttrID", Predicate.PredicateOperator.EQ, attrId));
             if (!selFacts.ContainsKey(item.Key)) {
                 f.Name = item.Key;
                 selFacts.Add(item.Key, f);
             }
             else {
                 selFacts[item.Key].UnionWith(f);
             }
         }
     }
     return selFacts;
 }