-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathalter_table_alter_index_statement.go
More file actions
55 lines (44 loc) · 1.65 KB
/
alter_table_alter_index_statement.go
File metadata and controls
55 lines (44 loc) · 1.65 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
package ast
// AlterTableAlterIndexStatement represents an ALTER TABLE ... ALTER INDEX statement
type AlterTableAlterIndexStatement struct {
SchemaObjectName *SchemaObjectName
IndexIdentifier *Identifier
AlterIndexType string // "Rebuild", "Disable", etc.
IndexOptions []*IndexExpressionOption
}
func (a *AlterTableAlterIndexStatement) node() {}
func (a *AlterTableAlterIndexStatement) statement() {}
// IndexOption is an interface for index options
type IndexOption interface {
Node
indexOption()
}
// IndexStateOption represents an ON/OFF index option
type IndexStateOption struct {
OptionKind string // "PadIndex", "SortInTempDB", "IgnoreDupKey", etc.
OptionState string // "On", "Off"
}
func (o *IndexStateOption) indexOption() {}
func (o *IndexStateOption) node() {}
// IndexExpressionOption represents an index option with expression value
type IndexExpressionOption struct {
OptionKind string
Expression ScalarExpression
}
func (i *IndexExpressionOption) indexOption() {}
func (i *IndexExpressionOption) node() {}
// CompressionDelayIndexOption represents a COMPRESSION_DELAY option
type CompressionDelayIndexOption struct {
Expression ScalarExpression
TimeUnit string // "Unitless", "Minute", "Minutes"
OptionKind string // "CompressionDelay"
}
func (c *CompressionDelayIndexOption) indexOption() {}
func (c *CompressionDelayIndexOption) node() {}
// OrderIndexOption represents an ORDER option for clustered columnstore indexes
type OrderIndexOption struct {
Columns []*ColumnReferenceExpression
OptionKind string // "Order"
}
func (o *OrderIndexOption) indexOption() {}
func (o *OrderIndexOption) node() {}