private void CacheKeywords()
 {
     if (_keywords == null)
     {
         _keywords = new ADOTabularKeywordCollection(this);
     }
 }
        public void Visit(ADOTabularKeywordCollection keywords)
        {
            if (keywords == null)
            {
                throw new ArgumentNullException(nameof(keywords));
            }

            //DataRowCollection drKeywords = _conn.GetSchemaDataSet("DISCOVER_KEYWORDS", null, false).Tables[0].Rows;
            //DataRowCollection drFunctions = _conn.GetSchemaDataSet("MDSCHEMA_FUNCTIONS", null, false).Tables[0].Rows;
            var drKeywords  = _conn.GetSchemaDataSet("DISCOVER_KEYWORDS", null, false).Tables[0];
            var drFunctions = _conn.GetSchemaDataSet("MDSCHEMA_FUNCTIONS", null, false).Tables[0].Select("ORIGIN=3 OR ORIGIN=4");

            //var ds = drKeywords.DataSet.Tables;
            //ds.Add(drFunctions);


            var kwords = from keyword in drKeywords.AsEnumerable()
                         join function in drFunctions.AsEnumerable() on keyword["Keyword"] equals function["FUNCTION_NAME"] into a
                         from kword in a.DefaultIfEmpty()
                         where kword == null
                         select new { Keyword = (string)keyword["Keyword"], Matched = kword == null?true:false };

            //foreach (DataRow dr in drKeywords)
            foreach (var dr in kwords)
            {
                keywords.Add(dr.Keyword);
            }
        }
Exemple #3
0
 public void Visit(ADOTabularKeywordCollection aDOTabularKeywordCollection)
 {
     throw new System.NotImplementedException();
 }