-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathalter_function_statement.go
More file actions
57 lines (45 loc) · 1.64 KB
/
alter_function_statement.go
File metadata and controls
57 lines (45 loc) · 1.64 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
package ast
// AlterFunctionStatement represents an ALTER FUNCTION statement
type AlterFunctionStatement struct {
Name *SchemaObjectName
Parameters []*ProcedureParameter
ReturnType FunctionReturnType
Options []*FunctionOption
StatementList *StatementList
}
func (s *AlterFunctionStatement) statement() {}
func (s *AlterFunctionStatement) node() {}
// CreateFunctionStatement represents a CREATE FUNCTION statement
type CreateFunctionStatement struct {
Name *SchemaObjectName
Parameters []*ProcedureParameter
ReturnType FunctionReturnType
Options []*FunctionOption
StatementList *StatementList
}
func (s *CreateFunctionStatement) statement() {}
func (s *CreateFunctionStatement) node() {}
// FunctionReturnType is an interface for function return types
type FunctionReturnType interface {
functionReturnTypeNode()
}
// ScalarFunctionReturnType represents a scalar function return type
type ScalarFunctionReturnType struct {
DataType DataTypeReference
}
func (r *ScalarFunctionReturnType) functionReturnTypeNode() {}
// TableValuedFunctionReturnType represents a table-valued function return type
type TableValuedFunctionReturnType struct {
// Simplified - will be expanded later
}
func (r *TableValuedFunctionReturnType) functionReturnTypeNode() {}
// SelectFunctionReturnType represents a SELECT function return type (inline table-valued function)
type SelectFunctionReturnType struct {
SelectStatement *SelectStatement
}
func (r *SelectFunctionReturnType) functionReturnTypeNode() {}
// FunctionOption represents a function option
type FunctionOption struct {
OptionKind string
OptionState string
}