-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdate_statistics_statement.go
More file actions
47 lines (36 loc) · 1.59 KB
/
update_statistics_statement.go
File metadata and controls
47 lines (36 loc) · 1.59 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
package ast
// UpdateStatisticsStatement represents UPDATE STATISTICS.
type UpdateStatisticsStatement struct {
SchemaObjectName *SchemaObjectName `json:"SchemaObjectName,omitempty"`
SubElements []*Identifier `json:"SubElements,omitempty"`
StatisticsOptions []StatisticsOption `json:"StatisticsOptions,omitempty"`
}
func (u *UpdateStatisticsStatement) node() {}
func (u *UpdateStatisticsStatement) statement() {}
// StatisticsOption is an interface for statistics options.
type StatisticsOption interface {
statisticsOption()
}
// SimpleStatisticsOption represents a simple statistics option like ALL, FULLSCAN, etc.
type SimpleStatisticsOption struct {
OptionKind string `json:"OptionKind,omitempty"`
}
func (s *SimpleStatisticsOption) statisticsOption() {}
// LiteralStatisticsOption represents a statistics option with a literal value.
type LiteralStatisticsOption struct {
OptionKind string `json:"OptionKind,omitempty"`
Literal ScalarExpression `json:"Literal,omitempty"`
}
func (l *LiteralStatisticsOption) statisticsOption() {}
// OnOffStatisticsOption represents a statistics option with ON/OFF value.
type OnOffStatisticsOption struct {
OptionKind string `json:"OptionKind,omitempty"`
OptionState string `json:"OptionState,omitempty"`
}
func (o *OnOffStatisticsOption) statisticsOption() {}
// ResampleStatisticsOption represents RESAMPLE statistics option.
type ResampleStatisticsOption struct {
OptionKind string `json:"OptionKind,omitempty"`
Partitions []ScalarExpression `json:"Partitions,omitempty"`
}
func (r *ResampleStatisticsOption) statisticsOption() {}