-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunction_call.go
More file actions
45 lines (35 loc) · 1.41 KB
/
function_call.go
File metadata and controls
45 lines (35 loc) · 1.41 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
package ast
// CallTarget represents a call target for a function call.
type CallTarget interface {
callTarget()
}
// MultiPartIdentifierCallTarget represents a multi-part identifier call target.
type MultiPartIdentifierCallTarget struct {
MultiPartIdentifier *MultiPartIdentifier
}
func (*MultiPartIdentifierCallTarget) callTarget() {}
// ExpressionCallTarget represents an expression call target.
type ExpressionCallTarget struct {
Expression ScalarExpression
}
func (*ExpressionCallTarget) callTarget() {}
// UserDefinedTypeCallTarget represents a user-defined type call target.
type UserDefinedTypeCallTarget struct {
SchemaObjectName *SchemaObjectName
}
func (*UserDefinedTypeCallTarget) callTarget() {}
// OverClause represents an OVER clause for window functions.
type OverClause struct {
// Add partition by, order by, and window frame as needed
}
// FunctionCall represents a function call.
type FunctionCall struct {
CallTarget CallTarget `json:"CallTarget,omitempty"`
FunctionName *Identifier `json:"FunctionName,omitempty"`
Parameters []ScalarExpression `json:"Parameters,omitempty"`
UniqueRowFilter string `json:"UniqueRowFilter,omitempty"`
OverClause *OverClause `json:"OverClause,omitempty"`
WithArrayWrapper bool `json:"WithArrayWrapper,omitempty"`
}
func (*FunctionCall) node() {}
func (*FunctionCall) scalarExpression() {}