Пример #1
0
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendFormat(JoinClause.ToString()).AppendLine();

            if (TableA is gsSubQueryFromTerm)
            {
                var subQry = TableA as gsSubQueryFromTerm;
                subQry.SubQuery.QryName = $"subQry{gsSelectQuery.GetNextID()}";

                sb.AppendLine();
                sb.AppendLine(subQry.SubQuery.ToString());
            }

            if (TableB is gsSubQueryFromTerm)
            {
                var subQry = TableB as gsSubQueryFromTerm;
                subQry.SubQuery.QryName = $"subQry{gsSelectQuery.GetNextID()}";

                sb.AppendLine();
                sb.AppendLine(subQry.SubQuery.ToString());
            }

            sb.AppendLine($"{QryName}.FromClause.Join(JoinType.{JoinType.ToString()}, {TableA.ToString()}, {TableB.ToString()}, {JoinClause.WhereClauseName});");
            return(sb.ToString());
        }
Пример #2
0
 /// <summary>
 /// Returns the string representation of this instance.
 /// </summary>
 public override string ToString()
 {
     return(String.Format("{0}:{1}", TableA.ToString(), TableB.ToString()));
 }