public void AddWherePart(string formatString, params object[] args)
        {
            var tp = string.Format(formatString, args);

            Console.WriteLine($"*AddWherePart -> [where] {tp}*");
            WhereParts.Add(tp);
        }
Example #2
0
 /// Adds a WHERE part of the SQL query.
 ///
 /// If a subquery parts aggregator is open, redirects the call to it instead.
 public void AddWherePart(string formatString, params object[] args)
 {
     if (_visitingSubQueryExpression)
     {
         _subQueryExpressionPartsAggregator.AddWherePart(formatString, args);
     }
     else
     {
         if (formatString != string.Empty)
         {
             WhereParts.Add(string.Format(formatString, args));
         }
     }
 }
Example #3
0
        private void WrapSubQueryExpressionsToQueryParts()
        {
            if (SubQueries.Count != SubQueryLinkActions.Count)
            {
                throw new ArgumentException(
                          "Amounts of subqueries and the actions to take with them are not equal.");
            }

            for (int i = SubQueries.Count - 1; i >= 0; i--)
            {
                var subQuery       = SubQueries[i];
                var subQueryAction = SubQueryLinkActions[i];

                if (subQueryAction.Contains("EXISTS"))
                {
                    WhereParts.Add(string.Format(subQueryAction, subQuery));
                    SubQueries.RemoveAt(i);
                    SubQueryLinkActions.RemoveAt(i);
                }
            }
        }
Example #4
0
 public void AddWherePart(string format, params object[] args)
 {
     WhereParts.Add(string.Format(format, args));
 }
Example #5
0
 public void AddWherePart(LuceneIndexExpression formatString)
 {
     WhereParts.Add(formatString);
 }
Example #6
0
 public void AddWherePart(string formatString, params object[] args) => WhereParts.Add(string.Format(formatString, args));
Example #7
0
 public void AddWherePart(string str)
 {
     WhereParts.Add(str);
 }