Пример #1
0
        public override void WriteToStream(IndentStream stream)
        {
            if (!string.IsNullOrEmpty(JoinType))
            {
                stream.Write($"{JoinType.ToUpper()} ");
            }

            if (!string.IsNullOrEmpty(OuterType))
            {
                stream.Write($"{OuterType.ToUpper()} ");
            }

            stream.Write("JOIN ");

            SecondTable.WriteToStream(stream);
            if (AliasName != null)
            {
                stream.Write(" ");
                AliasName.WriteToStream(stream);
            }

            if (WithOptions != null && WithOptions.Count > 0)
            {
                stream.Write(" WITH(");
                WithOptions.ToUpper().WriteToStreamWithComma(stream);
                stream.Write(")");
            }

            if (JoinOnExpr != null)
            {
                stream.Write(" ON ");
                JoinOnExpr.WriteToStream(stream);
            }
        }