public override void WriteToStream(IndentStream stream)
 {
     stream.Write("CREATE INDEX ");
     IndexName.WriteToStream(stream);
     stream.Write(" ON ");
     TableName.WriteToStream(stream);
     stream.Write("(");
     OnColumns.WriteToStreamWithComma(stream);
     stream.Write(")");
 }
Example #2
0
        public override void WriteToStream(IndentStream stream)
        {
            stream.Write("ALTER INDEX ");
            IndexName.WriteToStream(stream);
            stream.Write(" ON ");
            TableName.WriteToStream(stream);
            stream.Write(" REBUILD");

            if (WithExpr != null)
            {
                stream.Write(" ");
                WithExpr.WriteToStream(stream);
            }
        }
Example #3
0
        public override void WriteToStream(IndentStream stream)
        {
            stream.Write("CREATE");

            if (IsUnique)
            {
                stream.Write(" UNIQUE");
            }

            stream.Write(" NONCLUSTERED INDEX ");
            IndexName.WriteToStream(stream);
            stream.Write(" ON ");
            TableName.WriteToStream(stream);
            stream.Write("(");
            ColumnList.WriteToStreamWithComma(stream);
            stream.Write(")");

            if (WhereExpr != null)
            {
                stream.Write(" WHERE (");
                WhereExpr.WriteToStream(stream);
                stream.Write(")");
            }

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

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

            if (IsSemicolon)
            {
                stream.Write(" ;");
            }
        }
        public override void WriteToStream(IndentStream stream)
        {
            stream.Write("CREATE CLUSTERED INDEX ");
            IndexName.WriteToStream(stream);
            stream.Write(" ON ");
            TableName.WriteToStream(stream);
            stream.Write("(");
            OnColumns.WriteToStreamWithComma(stream);
            stream.Write(")");

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

            if (OnPartitionSchemeNameExpr != null)
            {
                stream.WriteLine();
                OnPartitionSchemeNameExpr.WriteToStream(stream);
            }
        }
Example #5
0
 public override void WriteToStream(IndentStream stream)
 {
     stream.Write("DROP INDEX ");
     IndexName.WriteToStream(stream);
 }