-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsequence_statements.go
More file actions
46 lines (36 loc) · 1.34 KB
/
sequence_statements.go
File metadata and controls
46 lines (36 loc) · 1.34 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
// Package ast provides AST types for T-SQL parsing.
package ast
// SequenceOption represents a sequence option without a value.
type SequenceOption struct {
OptionKind string
NoValue bool
}
func (o *SequenceOption) node() {}
// ScalarExpressionSequenceOption represents a sequence option with a value.
type ScalarExpressionSequenceOption struct {
OptionKind string
OptionValue ScalarExpression
NoValue bool
}
func (o *ScalarExpressionSequenceOption) node() {}
// DataTypeSequenceOption represents a sequence option with a data type (AS clause).
type DataTypeSequenceOption struct {
OptionKind string
DataType DataTypeReference
NoValue bool
}
func (o *DataTypeSequenceOption) node() {}
// CreateSequenceStatement represents a CREATE SEQUENCE statement.
type CreateSequenceStatement struct {
Name *SchemaObjectName
SequenceOptions []interface{} // Can be SequenceOption or ScalarExpressionSequenceOption
}
func (s *CreateSequenceStatement) statement() {}
func (s *CreateSequenceStatement) node() {}
// AlterSequenceStatement represents an ALTER SEQUENCE statement.
type AlterSequenceStatement struct {
Name *SchemaObjectName
SequenceOptions []interface{} // Can be SequenceOption or ScalarExpressionSequenceOption
}
func (s *AlterSequenceStatement) statement() {}
func (s *AlterSequenceStatement) node() {}