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

Function arrayOf

postgres/parser/parser/parse.go:437–446  ·  view source on GitHub ↗

arrayOf creates a type alias for an array of the given element type and fixed bounds. The bounds are currently ignored.

(
	ref tree.ResolvableTypeReference, bounds []int32,
)

Source from the content-addressed store, hash-verified

435// arrayOf creates a type alias for an array of the given element type and fixed
436// bounds. The bounds are currently ignored.
437func arrayOf(
438 ref tree.ResolvableTypeReference, bounds []int32,
439) (tree.ResolvableTypeReference, error) {
440 // If the reference is a statically known type, then return an array type,
441 // rather than an array type reference.
442 if typ, ok := tree.GetStaticallyKnownType(ref); ok {
443 return types.MakeArray(typ), nil
444 }
445 return &tree.ArrayTypeReference{ElementType: ref}, nil
446}

Callers

nothing calls this directly

Calls 2

GetStaticallyKnownTypeFunction · 0.92
MakeArrayFunction · 0.92

Tested by

no test coverage detected