示例#1
0
 /// <summary>
 ///     Ctor.
 /// </summary>
 /// <param name="selectExpression">the expression node to evaluate for matching events</param>
 /// <param name="optionalAsName">the name of the item, null if not name supplied</param>
 /// <param name="isEvents">whether event selected</param>
 public SelectClauseExprRawSpec(
     ExprNode selectExpression,
     string optionalAsName,
     bool isEvents)
 {
     SelectExpression = selectExpression;
     OptionalAsName = optionalAsName == null ? null : StringValue.RemoveTicks(optionalAsName);
     IsEvents = isEvents;
 }
示例#2
0
        private static Chainable GetChainable(
            EsperEPL2GrammarParser.ChainableWithArgsContext ctx,
            bool optional,
            IDictionary <ITree, ExprNode> astExprNodeMap)
        {
            var distinct      = ctx.libFunctionArgs() != null && ctx.libFunctionArgs().DISTINCT() != null;
            var nameUnescaped = ctx.chainableIdent().GetText();
            var name          = StringValue.RemoveTicks(nameUnescaped);

            if (ctx.lp == null)
            {
                return(new ChainableName(distinct, optional, name, nameUnescaped));
            }

            IList <ExprNode> @params = ASTLambdaHelper.GetExprNodesLibFunc(ctx.libFunctionArgs(), astExprNodeMap);

            return(new ChainableCall(distinct, optional, name, nameUnescaped, @params));
        }