-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbegin_end_block_statement.go
More file actions
52 lines (40 loc) · 1.51 KB
/
begin_end_block_statement.go
File metadata and controls
52 lines (40 loc) · 1.51 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
package ast
// BeginEndBlockStatement represents a BEGIN...END block.
type BeginEndBlockStatement struct {
StatementList *StatementList `json:"StatementList,omitempty"`
}
func (b *BeginEndBlockStatement) node() {}
func (b *BeginEndBlockStatement) statement() {}
// BeginEndAtomicBlockStatement represents a BEGIN ATOMIC...END block (for Hekaton/In-Memory OLTP).
type BeginEndAtomicBlockStatement struct {
Options []AtomicBlockOption
StatementList *StatementList
}
func (b *BeginEndAtomicBlockStatement) node() {}
func (b *BeginEndAtomicBlockStatement) statement() {}
// AtomicBlockOption is an interface for atomic block options.
type AtomicBlockOption interface {
atomicBlockOption()
}
// IdentifierAtomicBlockOption represents an atomic block option with an identifier value.
type IdentifierAtomicBlockOption struct {
OptionKind string
Value *Identifier
}
func (o *IdentifierAtomicBlockOption) atomicBlockOption() {}
// LiteralAtomicBlockOption represents an atomic block option with a literal value.
type LiteralAtomicBlockOption struct {
OptionKind string
Value ScalarExpression
}
func (o *LiteralAtomicBlockOption) atomicBlockOption() {}
// OnOffAtomicBlockOption represents an atomic block option with an ON/OFF value.
type OnOffAtomicBlockOption struct {
OptionKind string
OptionState string // "On" or "Off"
}
func (o *OnOffAtomicBlockOption) atomicBlockOption() {}
// StatementList is a list of statements.
type StatementList struct {
Statements []Statement `json:"Statements,omitempty"`
}