public static ExprMerge WithSource(this ExprMerge original, IExprTableSource newSource) => new ExprMerge(targetTable: original.TargetTable, source: newSource, on: original.On, whenMatched: original.WhenMatched, whenNotMatchedByTarget: original.WhenNotMatchedByTarget, whenNotMatchedBySource: original.WhenNotMatchedBySource);
public static ExprJoinedTable WithRight(this ExprJoinedTable original, IExprTableSource newRight) => new ExprJoinedTable(left: original.Left, right: newRight, searchCondition: original.SearchCondition, joinType: original.JoinType);
public static ExprSelectOffsetFetch WithInnerJoin(this ExprSelectOffsetFetch select, IExprTableSource tableSource, ExprBoolean on) => select.SelectQuery is ExprQuerySpecification specification
public static ExprQuerySpecification WithInnerJoin(this ExprQuerySpecification querySpecification, IExprTableSource tableSource, ExprBoolean on) => JoinQuerySpecification(ExprJoinedTable.ExprJoinType.Inner, querySpecification, tableSource, on);
public static ExprCrossedTable WithRight(this ExprCrossedTable original, IExprTableSource newRight) => new ExprCrossedTable(left: original.Left, right: newRight);
private static ExprQuerySpecification JoinQuerySpecification(ExprJoinedTable.ExprJoinType exprJoinType, ExprQuerySpecification querySpecification, IExprTableSource tableSource, ExprBoolean @on) { if (querySpecification.From == null) { throw new SqExpressException("Query Specification \"From\" cannot be null"); } var newJoin = new ExprJoinedTable(querySpecification.From, exprJoinType, tableSource, on); return(querySpecification.WithFrom(newJoin)); }