示例#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);
            }
        }
示例#2
0
 public override void WriteToStream(IndentStream stream)
 {
     Variable.WriteToStream(stream);
     stream.Write(".");
     NodesExpr.WriteToStream(stream);
     stream.Write(" AS ");
     AliasName.WriteToStream(stream);
     stream.Write("(");
     ColumnName.WriteToStream(stream);
     stream.Write(")");
 }
示例#3
0
        public override void WriteToStream(IndentStream stream)
        {
            Left.WriteToStream(stream);

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

            if (Options.Count > 0)
            {
                stream.Write(" WITH(");
                Options.ToUpper().WriteToStreamWithComma(stream);
                stream.Write(")");
            }

            if (JoinList != null && JoinList.Count > 0)
            {
                stream.WriteLine();
                JoinList.WriteToStream(stream);
            }
        }