コード例 #1
0
            public IGremlinQuery <TTarget> As <TTarget>(Func <IGremlinQuery <TElement>, StepLabel <TElement>, IGremlinQuery <TTarget> > continuation)
            {
                var stepLabel = new StepLabel <TElement>();

                return(continuation(
                           this.As(stepLabel),
                           stepLabel));
            }
コード例 #2
0
        internal static IGremlinQuery <T> AddStepLabelBinding <T>(this IGremlinQuery <T> query, Expression <Func <T, object> > memberExpression, StepLabel stepLabel)
        {
            var body = memberExpression.Body;

            if (body is UnaryExpression && body.NodeType == ExpressionType.Convert)
            {
                body = ((UnaryExpression)body).Operand;
            }

            if (!(body is MemberExpression memberExpressionBody))
            {
                throw new ArgumentException();
            }

            return(new GremlinQueryImpl <T>(query.TraversalSourceName, query.Steps, query.StepLabelMappings.SetItem(memberExpressionBody.Member.Name, stepLabel), query.IdentifierFactory));
        }
コード例 #3
0
 public static IGremlinQuery <T> As <T>(this IGremlinQuery <T> query, StepLabel <T> stepLabel)
 {
     return(query
            .AddStep <T>("as", stepLabel));
 }
コード例 #4
0
 public static IGremlinQuery <(T1, T2)> Select <T1, T2>(this IGremlinQuery query, StepLabel <T1> label1, StepLabel <T2> label2)
 {
     return(query
コード例 #5
0
 public static IGremlinQuery <T> Select <T>(this IGremlinQuery query, StepLabel <T> label)
 {
     return(query
            .AddStep <T>("select", label));
 }
コード例 #6
0
 public static IGremlinQuery <TSource> From <TSource, TStepLabel>(this IGremlinQuery <TSource> query, StepLabel <TStepLabel> stepLabel)
 {
     return(query
            .AddStep <TSource>("from", stepLabel));
 }
コード例 #7
0
 public IGremlinQuery <TElement> As(StepLabel <TElement> stepLabel)
 {
     return(this
            .AddStep("as", stepLabel));
 }
コード例 #8
0
 public IGremlinQuery <TStep> Select <TStep>(StepLabel <TStep> label)
 {
     return(this
            .AddStep <TElement, TStep>("select", label));
 }
コード例 #9
0
 public IGremlinQuery <TElement> From <TStepLabel>(StepLabel <TStepLabel> stepLabel)
 {
     return(this
            .AddStep("from", stepLabel));
 }