コード例 #1
0
 public ExprDeclaredForgeNoRewrite(
     ExprDeclaredNodeImpl parent,
     ExprForge innerForge,
     bool isCache,
     bool audit,
     string statementName)
     : base(parent, innerForge, isCache, audit, statementName)
 {
 }
コード例 #2
0
 public ExprDeclaredForgeRewrite(
     ExprDeclaredNodeImpl parent,
     ExprForge innerForge,
     bool isCache,
     ExprEnumerationForge[] eventEnumerationForges,
     bool audit,
     string statementName)
     : base(parent, innerForge, isCache, audit, statementName)
 {
     _eventEnumerationForges = eventEnumerationForges;
 }
コード例 #3
0
        public ExprDeclaredForgeRewrite(
            ExprDeclaredNodeImpl parent,
            ExprForge innerForge,
            bool isCache,
            int[] streamAssignments,
            bool audit,
            string statementName)
            : base(parent, innerForge, isCache, audit, statementName)

        {
            this.streamAssignments = streamAssignments;
        }
コード例 #4
0
 public ExprDeclaredForgeBase(
     ExprDeclaredNodeImpl parent,
     ExprForge innerForge,
     bool isCache,
     bool audit,
     string statementName)
 {
     this.parent = parent;
     InnerForge = innerForge;
     this.isCache = isCache;
     this.audit = audit;
     this.statementName = statementName;
 }
コード例 #5
0
        protected internal static CodegenExpression[] GetInstrumentationQParams(
            ExprDeclaredNodeImpl parent,
            CodegenClassScope codegenClassScope)
        {
            string expressionText = null;
            if (codegenClassScope.IsInstrumented) {
                expressionText = ExprNodeUtilityPrint.ToExpressionStringMinPrecedenceSafe(parent.ExpressionBodyCopy);
            }

            return new[] {
                Constant(parent.Prototype.Name),
                Constant(expressionText),
                Constant(parent.Prototype.ParametersNames)
            };
        }
コード例 #6
0
 public ExprDeclaredForgeConstant(
     ExprDeclaredNodeImpl parent,
     Type returnType,
     ExpressionDeclItem prototype,
     object value,
     bool audit,
     string statementName)
 {
     this.parent = parent;
     EvaluationType = returnType;
     this.prototype = prototype;
     this.value = value;
     this.audit = audit;
     this.statementName = statementName;
 }
コード例 #7
0
 public ExprDeclaredForgeRewriteWValue(
     ExprDeclaredNodeImpl parent,
     ExprForge innerForge,
     bool isCache,
     bool audit,
     string statementName,
     ExprEnumerationForge[] eventEnumerationForges,
     ObjectArrayEventType valueEventType,
     IList<ExprNode> valueExpressions)
     : base(parent, innerForge, isCache, audit, statementName)
 {
     _eventEnumerationForges = eventEnumerationForges;
     _valueEventType = valueEventType;
     _valueExpressions = valueExpressions;
 }
コード例 #8
0
ファイル: ExprDeclaredHelper.cs プロジェクト: lanicon/nesper
        public static Pair<ExprDeclaredNodeImpl, StatementSpecMapContext> GetExistsDeclaredExpr(
            string name,
            IList<ExprNode> parameters,
            ICollection<ExpressionDeclItem> stmtLocalExpressions,
            ContextCompileTimeDescriptor contextCompileTimeDescriptor,
            StatementSpecMapEnv mapEnv,
            LazyAllocatedMap<HashableMultiKey, AggregationMultiFunctionForge> plugInAggregations,
            IList<ExpressionScriptProvided> scripts)
        {
            // Find among local expressions
            if (!stmtLocalExpressions.IsEmpty()) {
                foreach (var declNode in stmtLocalExpressions) {
                    if (declNode.Name.Equals(name)) {
                        var pair = GetExprDeclaredNode(
                            declNode.OptionalSoda,
                            stmtLocalExpressions,
                            contextCompileTimeDescriptor,
                            mapEnv,
                            plugInAggregations,
                            scripts);
                        var declared = new ExprDeclaredNodeImpl(
                            declNode,
                            parameters,
                            contextCompileTimeDescriptor,
                            pair.First);
                        return new Pair<ExprDeclaredNodeImpl, StatementSpecMapContext>(declared, pair.Second);
                    }
                }
            }

            // find among global expressions
            var found = mapEnv.ExprDeclaredCompileTimeResolver.Resolve(name);
            if (found != null) {
                var expression = found.OptionalSoda;
                if (expression == null) {
                    var bytes = found.OptionalSodaBytes.Invoke();
                    expression = (Expression) SerializerUtil.ByteArrToObject(bytes);
                }

                var pair = GetExprDeclaredNode(expression, stmtLocalExpressions, contextCompileTimeDescriptor, mapEnv, plugInAggregations, scripts);
                var declared = new ExprDeclaredNodeImpl(found, parameters, contextCompileTimeDescriptor, pair.First);
                return new Pair<ExprDeclaredNodeImpl, StatementSpecMapContext>(declared, pair.Second);
            }

            return null;
        }