Пример #1
0
        public override string Render(JoinFromClause joinFromClause)
        {
            StringBuilder text = new StringBuilder();

            text.AppendFormat("{0} ", joinFromClause.LeftTable.Render(this));

            switch (joinFromClause.JoinType)
            {
            case JoinType.InnerJoin:
                text.Append("INNER JOIN ");
                break;

            case JoinType.LeftJoin:
                text.Append("LEFT JOIN ");
                break;

            case JoinType.RightJoin:
                text.Append("RIGHT JOIN ");
                break;

            case JoinType.FullOuterJoin:
                text.Append("FULL OUTER JOIN ");
                break;
            }

            text.AppendFormat("{0} ", joinFromClause.RightTable.Render(this));

            text.Append("ON ");

            text.AppendFormat("{0} ", joinFromClause.Predicate.Render(this));

            return(text.ToString().Trim());
        }
Пример #2
0
 public abstract string Render(JoinFromClause joinFromClause);