/// <summary> /// Get the name of the SQL statement group that this table should be included in for the purposes of executing searches /// </summary> /// <param name="qt"></param> /// <returns></returns> public static string GetTableCriteriaGroupName(QueryTable qt) { MetaTable mt = null; IMetaBroker imb = null; string groupName = null; try { mt = qt.MetaTable; imb = MetaBrokerUtil.GetGlobalBroker(mt.MetaBrokerType); groupName = imb.GetTableCriteriaGroupName(qt).ToUpper(); return(groupName); } catch (Exception ex) { DebugLog.Message(ex); return(""); } }
/// <summary> /// Gets a dictionary by MetaBrokerType of the assay metatables in a query that can be retrieved in an unpivoted form /// </summary> /// <param name="q"></param> Dictionary <MetaBrokerType, List <MetaTable> > GetUnpivotedAssayMetaTables (Query q) { QueryTable qt; MetaTable mt; int qti; Dictionary <MetaBrokerType, List <MetaTable> > dict = new Dictionary <MetaBrokerType, List <MetaTable> >(); for (qti = 0; qti < q.Tables.Count; qti++) { qt = Query.Tables[qti]; mt = qt.MetaTable; MetaBrokerType mbt = mt.MetaBrokerType; IMetaBroker mb = MetaBrokerUtil.GetGlobalBroker(mbt); if (mb == null) { continue; } if (!mb.CanBuildUnpivotedAssayResultsSql) { continue; } if (!dict.ContainsKey(mbt)) { dict[mbt] = new List <MetaTable>(); } dict[mbt].Add(mt); } return(dict); }