-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathalter_index_statement.go
More file actions
82 lines (67 loc) · 2.5 KB
/
alter_index_statement.go
File metadata and controls
82 lines (67 loc) · 2.5 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
package ast
// AlterIndexStatement represents ALTER INDEX statement
type AlterIndexStatement struct {
Name *Identifier
All bool
OnName *SchemaObjectName
AlterIndexType string // "Rebuild", "Reorganize", "Disable", "Set", "UpdateSelectiveXmlPaths", etc.
Partition *PartitionSpecifier
IndexOptions []IndexOption
PromotedPaths []*SelectiveXmlIndexPromotedPath
XmlNamespaces *XmlNamespaces
}
func (s *AlterIndexStatement) statement() {}
func (s *AlterIndexStatement) node() {}
// SelectiveXmlIndexPromotedPath represents a path in a selective XML index
type SelectiveXmlIndexPromotedPath struct {
Name *Identifier
Path *StringLiteral
XQueryDataType *StringLiteral
SQLDataType *SqlDataTypeReference
MaxLength *IntegerLiteral
IsSingleton bool
}
func (s *SelectiveXmlIndexPromotedPath) node() {}
// CreateSelectiveXmlIndexStatement represents CREATE SELECTIVE XML INDEX statement
type CreateSelectiveXmlIndexStatement struct {
Name *Identifier
OnName *SchemaObjectName
XmlColumn *Identifier
IsSecondary bool
UsingXmlIndexName *Identifier // For secondary indexes
PathName *Identifier // For secondary indexes
PromotedPaths []*SelectiveXmlIndexPromotedPath
XmlNamespaces *XmlNamespaces
IndexOptions []IndexOption
}
func (s *CreateSelectiveXmlIndexStatement) statement() {}
func (s *CreateSelectiveXmlIndexStatement) node() {}
// XmlNamespaces represents a WITH XMLNAMESPACES clause
type XmlNamespaces struct {
XmlNamespacesElements []XmlNamespacesElement
}
func (x *XmlNamespaces) node() {}
// XmlNamespacesElement is an interface for XML namespace elements
type XmlNamespacesElement interface {
xmlNamespacesElement()
}
// XmlNamespacesAliasElement represents an alias element in XMLNAMESPACES
type XmlNamespacesAliasElement struct {
Identifier *Identifier
String *StringLiteral
}
func (x *XmlNamespacesAliasElement) node() {}
func (x *XmlNamespacesAliasElement) xmlNamespacesElement() {}
// XmlNamespacesDefaultElement represents a default element in XMLNAMESPACES
type XmlNamespacesDefaultElement struct {
String *StringLiteral
}
func (x *XmlNamespacesDefaultElement) node() {}
func (x *XmlNamespacesDefaultElement) xmlNamespacesElement() {}
// PartitionSpecifier represents a partition specifier
type PartitionSpecifier struct {
All bool
Number ScalarExpression
Numbers []ScalarExpression
}
func (p *PartitionSpecifier) node() {}