WithResolvedChildren implements the vitess.InjectableExpression interface.
(ctx context.Context, children []any)
| 156 | |
| 157 | // WithResolvedChildren implements the vitess.InjectableExpression interface. |
| 158 | func (array *Array) WithResolvedChildren(ctx context.Context, children []any) (any, error) { |
| 159 | newExpressions := make([]sql.Expression, len(children)) |
| 160 | for i, resolvedChild := range children { |
| 161 | resolvedExpression, ok := resolvedChild.(sql.Expression) |
| 162 | if !ok { |
| 163 | return nil, errors.Errorf("expected vitess child to be an expression but has type `%T`", resolvedChild) |
| 164 | } |
| 165 | newExpressions[i] = resolvedExpression |
| 166 | } |
| 167 | return array.WithChildren(ctx.(*sql.Context), newExpressions...) |
| 168 | } |
| 169 | |
| 170 | // getTargetType returns the evaluated type for this expression. |
| 171 | // Returns the "anyarray" type if the type combination is invalid. |
nothing calls this directly
no test coverage detected