Пример #1
0
        /// <summary>Renders the clause in textual representation. </summary>
        /// <param name="writer">to output to</param>
        /// <param name="formatter">for NewLine-whitespace formatting</param>
        public void ToEPL(TextWriter writer, EPStatementFormatter formatter)
        {
            foreach (OnInsertSplitStreamItem item in Items)
            {
                item.InsertInto.ToEPL(writer, formatter, true);
                item.SelectClause.ToEPL(writer, formatter, true, false);
                if (item.PropertySelects != null)
                {
                    writer.Write(" from ");
                    ContainedEventSelect.ToEPL(writer, formatter, item.PropertySelects);
                    if (item.PropertySelectsStreamName != null)
                    {
                        writer.Write(" as ");
                        writer.Write(item.PropertySelectsStreamName);
                    }
                }
                if (item.WhereClause != null)
                {
                    writer.Write(" where ");
                    item.WhereClause.ToEPL(writer, ExpressionPrecedenceEnum.MINIMUM);
                }
            }

            if (!IsFirst)
            {
                writer.Write(" output all");
            }
        }
Пример #2
0
 /// <summary>
 /// Returns a textual representation of the filter.
 /// </summary>
 /// <param name="writer">to output to</param>
 /// <param name="formatter">for newline-whitespace formatting</param>
 public void ToEPL(TextWriter writer, EPStatementFormatter formatter)
 {
     writer.Write(EventTypeName);
     if (FilterExpression != null)
     {
         writer.Write('(');
         FilterExpression.ToEPL(writer, ExpressionPrecedenceEnum.MINIMUM);
         writer.Write(')');
     }
     if (OptionalPropertySelects != null)
     {
         ContainedEventSelect.ToEPL(writer, formatter, OptionalPropertySelects);
     }
 }