Exemple #1
0
        public void AddRelationalOp(
            int indexedStream,
            ExprIdentNode indexedProp,
            int? keyStreamNum,
            ExprNode exprNodeNoIdent,
            RelationalOpEnum relationalOpEnum)
        {
            if (keyStreamNum == null) {
                if (NumStreams > 1) {
                    for (var i = 0; i < NumStreams; i++) {
                        if (i == indexedStream) {
                            continue;
                        }

                        InternalAddRelOp(
                            i,
                            indexedStream,
                            exprNodeNoIdent,
                            QueryGraphRangeEnumExtensions.MapFrom(relationalOpEnum),
                            indexedProp,
                            false);
                    }
                }
                else {
                    InternalAddRelOp(
                        SELF_STREAM,
                        indexedStream,
                        exprNodeNoIdent,
                        QueryGraphRangeEnumExtensions.MapFrom(relationalOpEnum),
                        indexedProp,
                        false);
                }

                return;
            }

            // add for a specific stream only
            InternalAddRelOp(
                keyStreamNum.Value,
                indexedStream,
                exprNodeNoIdent,
                QueryGraphRangeEnumExtensions.MapFrom(relationalOpEnum),
                indexedProp,
                false);
        }
Exemple #2
0
 public void AddRelationalOpStrict(
     int streamIdLeft,
     ExprIdentNode propertyLeftExpr,
     int streamIdRight,
     ExprIdentNode propertyRightExpr,
     RelationalOpEnum relationalOpEnum)
 {
     Check(streamIdLeft, streamIdRight);
     InternalAddRelOp(
         streamIdLeft,
         streamIdRight,
         propertyLeftExpr,
         QueryGraphRangeEnumExtensions.MapFrom(relationalOpEnum.Reversed()),
         propertyRightExpr,
         false);
     InternalAddRelOp(
         streamIdRight,
         streamIdLeft,
         propertyRightExpr,
         QueryGraphRangeEnumExtensions.MapFrom(relationalOpEnum),
         propertyLeftExpr,
         false);
 }