MCPcopy Create free account
hub / github.com/dolthub/doltgresql / WithResolvedChildren

Method WithResolvedChildren

server/expression/array.go:158–168  ·  view source on GitHub ↗

WithResolvedChildren implements the vitess.InjectableExpression interface.

(ctx context.Context, children []any)

Source from the content-addressed store, hash-verified

156
157// WithResolvedChildren implements the vitess.InjectableExpression interface.
158func (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.

Callers

nothing calls this directly

Calls 2

WithChildrenMethod · 0.95
ErrorfMethod · 0.65

Tested by

no test coverage detected