コード例 #1
0
        public void AddWherePart(string formatString, params object[] args)
        {
            var tp = string.Format(formatString, args);

            Console.WriteLine($"*AddWherePart -> [where] {tp}*");
            WhereParts.Add(tp);
        }
コード例 #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));
         }
     }
 }
コード例 #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);
                }
            }
        }
コード例 #4
0
 public void AddWherePart(string format, params object[] args)
 {
     WhereParts.Add(string.Format(format, args));
 }
コード例 #5
0
 public void AddWherePart(LuceneIndexExpression formatString)
 {
     WhereParts.Add(formatString);
 }
コード例 #6
0
 public void AddWherePart(string formatString, params object[] args) => WhereParts.Add(string.Format(formatString, args));
コード例 #7
0
 public void AddWherePart(string str)
 {
     WhereParts.Add(str);
 }