You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
returnnil, sql.ErrInvalidArgumentNumber.New("MAKE_SET", "2 or more", len(args))
39
+
}
40
+
41
+
return&MakeSet{
42
+
bits: args[0],
43
+
values: args[1:],
44
+
}, nil
45
+
}
46
+
47
+
// FunctionName implements sql.FunctionExpression
48
+
func (m*MakeSet) FunctionName() string {
49
+
return"make_set"
50
+
}
51
+
52
+
// Description implements sql.FunctionExpression
53
+
func (m*MakeSet) Description() string {
54
+
return"returns a set string (a string containing substrings separated by , characters) consisting of the strings that have the corresponding bit in bits set."
55
+
}
56
+
57
+
// Children implements the Expression interface
58
+
func (m*MakeSet) Children() []sql.Expression {
59
+
children:= []sql.Expression{m.bits}
60
+
children=append(children, m.values...)
61
+
returnchildren
62
+
}
63
+
64
+
// Resolved implements the Expression interface
65
+
func (m*MakeSet) Resolved() bool {
66
+
for_, child:=rangem.Children() {
67
+
if!child.Resolved() {
68
+
returnfalse
69
+
}
70
+
}
71
+
returntrue
72
+
}
73
+
74
+
// IsNullable implements the Expression interface
75
+
func (m*MakeSet) IsNullable() bool {
76
+
returnm.bits.IsNullable()
77
+
}
78
+
79
+
// Type implements the Expression interface
80
+
func (m*MakeSet) Type() sql.Type {
81
+
returntypes.LongText
82
+
}
83
+
84
+
// CollationCoercibility implements the interface sql.CollationCoercible
0 commit comments