-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathSqlScriptGeneratorVisitor.StatementList.cs
More file actions
37 lines (35 loc) · 1.22 KB
/
SqlScriptGeneratorVisitor.StatementList.cs
File metadata and controls
37 lines (35 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//------------------------------------------------------------------------------
// <copyright file="SqlScriptGeneratorVisitor.StatementList.cs" company="Microsoft">
// Copyright (c) Microsoft Corporation. All rights reserved.
// </copyright>
//------------------------------------------------------------------------------
using Microsoft.SqlServer.TransactSql.ScriptDom;
using System;
namespace Microsoft.SqlServer.TransactSql.ScriptDom.ScriptGenerator
{
partial class SqlScriptGeneratorVisitor
{
public override void ExplicitVisit(StatementList node)
{
if (node.Statements != null)
{
Boolean first = true;
foreach (TSqlStatement statement in node.Statements)
{
if (first)
{
first = false;
}
else
{
for (var i = 0; i < _options.NumNewlinesAfterStatement; i++)
{
NewLine();
}
}
GenerateStatementWithSemiColon(statement);
}
}
}
}
}