forked from dolthub/go-mysql-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
unary_aggs.go
65 lines (62 loc) · 1.57 KB
/
unary_aggs.go
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
58
59
60
61
62
63
64
65
package aggregation
import "github.com/gabereiser/go-mysql-server/optgen/cmd/support"
//go:generate go run ../../../../optgen/cmd/optgen/main.go -out unary_aggs.og.go -pkg aggregation aggs unary_aggs.go
var UnaryAggDefs support.GenDefs = []support.AggDef{ // alphabetically sorted
{
Name: "AnyValue",
Desc: "returns any single value in the grouped rows",
Nullable: true,
},
{
Name: "Avg",
Desc: "returns the average value of expr in all rows.",
Nullable: true,
},
{
Name: "BitAnd",
Desc: "returns the bitwise AND of all bits in expr.",
RetType: "sql.Uint64",
},
{
Name: "BitOr",
Desc: "returns the bitwise OR of all bits in expr.",
RetType: "sql.Uint64",
},
{
Name: "BitXor",
Desc: "returns the bitwise XOR of all bits in expr.",
RetType: "sql.Uint64",
},
{
Name: "Count",
Desc: "returns a count of the number of non-NULL values of expr in the rows retrieved by a SELECT statement.",
RetType: "sql.Int64",
},
{
Name: "First",
Desc: "returns the first value in a sequence of elements of an aggregation.",
},
{
Name: "JsonArray",
SqlName: "json_arrayagg",
Desc: "returns result set as a single JSON array.",
RetType: "sql.JSON",
},
{
Name: "Last",
Desc: "returns the last value in a sequence of elements of an aggregation.",
},
{
Name: "Max",
Desc: "returns the maximum value of expr in all rows.",
},
{
Name: "Min",
Desc: "returns the minimum value of expr in all rows.",
},
{
Name: "Sum",
Desc: "returns the sum of expr in all rows",
Nullable: false,
},
}