-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathSqlScriptGeneratorVisitor.CreateVectorIndexStatement.cs
More file actions
48 lines (39 loc) · 1.66 KB
/
SqlScriptGeneratorVisitor.CreateVectorIndexStatement.cs
File metadata and controls
48 lines (39 loc) · 1.66 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
38
39
40
41
42
43
44
45
46
47
48
//------------------------------------------------------------------------------
// <copyright file="SqlScriptGeneratorVisitor.CreateVectorIndexStatement.cs" company="Microsoft">
// Copyright (c) Microsoft Corporation. All rights reserved.
// </copyright>
//------------------------------------------------------------------------------
using System.Collections.Generic;
using Microsoft.SqlServer.TransactSql.ScriptDom;
namespace Microsoft.SqlServer.TransactSql.ScriptDom.ScriptGenerator
{
partial class SqlScriptGeneratorVisitor
{
public override void ExplicitVisit(CreateVectorIndexStatement node)
{
GenerateKeyword(TSqlTokenType.Create);
GenerateSpaceAndIdentifier(CodeGenerationSupporter.Vector);
GenerateSpaceAndKeyword(TSqlTokenType.Index);
// name
GenerateSpaceAndFragmentIfNotNull(node.Name);
NewLineAndIndent();
GenerateKeyword(TSqlTokenType.On);
GenerateSpaceAndFragmentIfNotNull(node.OnName);
// Vector column
if (node.VectorColumn != null)
{
GenerateSpace();
GenerateSymbol(TSqlTokenType.LeftParenthesis);
GenerateFragmentIfNotNull(node.VectorColumn);
GenerateSymbol(TSqlTokenType.RightParenthesis);
}
GenerateIndexOptions(node.IndexOptions);
if (node.OnFileGroupOrPartitionScheme != null)
{
NewLineAndIndent();
GenerateKeyword(TSqlTokenType.On);
GenerateSpaceAndFragmentIfNotNull(node.OnFileGroupOrPartitionScheme);
}
}
}
}