コード例 #1
0
ファイル: JoinBlock.cs プロジェクト: DzmitrySo/sqLinq
 public JoinBlock(QueryBlock query, JoinType joinType, TableRef innerRef, StatementBlock on)
 {
     this.query = query;
     JoinType = joinType;
     InnerRef = innerRef;
     On = on;
 }
コード例 #2
0
ファイル: FromBlock.cs プロジェクト: DzmitrySo/sqLinq
        public void ApplyJoin(JoinType joinType, TableRef inner, LambdaExpression outerKeySelector, LambdaExpression innerKeySelector, LambdaExpression membersSelector)
        {
            var left = new StatementBlock(query.QueryBatch, outerKeySelector.Body, new QueryMapWithLambdaParam(query.QueryMap, outerKeySelector.Parameters[0]));
            var right = new StatementBlock(query.QueryBatch, innerKeySelector.Body, new QueryMapWithLambdaParam(inner.QueryMap, innerKeySelector.Parameters[0]));
            Joins.Add(new JoinBlock(query, joinType, inner, new StatementBlock($"{left} = {right}")));

            var p1 = new QueryMapWithLambdaParam(query.QueryMap, membersSelector.Parameters[0]);
            var p2 = new QueryMapWithLambdaParam(inner.QueryMap, membersSelector.Parameters[1]);
            query.QueryMap = new MapTransformer(p1, p2).Transform(membersSelector.Body);
        }
コード例 #3
0
ファイル: ColumnMap.cs プロジェクト: DzmitrySo/sqLinq
 public ColumnMap(TypeMemberPath memberPath, StatementBlock statement)
 {
     MemberPath = memberPath;
     Statement = statement;
 }