Beispiel #1
0
        protected override SqlJoin VisitSqlJoin(SqlJoin sqlJoin)
        {
            this.Visit(sqlJoin.Left);

            switch (sqlJoin.JoinType)
            {
                //case SqlJoinType.Cross:
                //    _sql.Append(", ");
                //    break;
                case SqlJoinType.Inner:
                    _sql.AppendLine();
                    this.Indent++;
                    _sql.Append("INNER JOIN ");
                    this.Indent--;
                    break;
                case SqlJoinType.LeftOuter:
                    _sql.AppendLine();
                    this.Indent++;
                    _sql.Append("LEFT OUTER JOIN ");
                    this.Indent--;
                    break;
                default:
                    throw new NotSupportedException();
            }

            this.Visit(sqlJoin.Right);

            _sql.Append(" ON ");

            this.Visit(sqlJoin.Condition);

            return sqlJoin;
        }
Beispiel #2
0
 protected virtual SqlJoin VisitSqlJoin(SqlJoin sqlJoin)
 {
     this.Visit(sqlJoin.Left);
     this.Visit(sqlJoin.Right);
     this.Visit(sqlJoin.Condition);
     return sqlJoin;
 }