MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / IsValidArrayElementType

Function IsValidArrayElementType

pkg/sql/types/types.go:2943–2954  ·  view source on GitHub ↗

IsValidArrayElementType returns true if the given type can be used as the element type of an ArrayFamily-typed column. If the valid return is false, the issue number should be included in the error report to inform the user.

(t *T)

Source from the content-addressed store, hash-verified

2941// element type of an ArrayFamily-typed column. If the valid return is false,
2942// the issue number should be included in the error report to inform the user.
2943func IsValidArrayElementType(t *T) (valid bool, issueNum int) {
2944 switch t.Family() {
2945 case TSQueryFamily:
2946 return false, 90886
2947 case TSVectorFamily:
2948 return false, 90886
2949 case PGVectorFamily:
2950 return false, 121432
2951 default:
2952 return true, 0
2953 }
2954}
2955
2956// CheckArrayElementType ensures that the given type can be used as the element
2957// type of an ArrayFamily-typed column. If not, it returns an error.

Callers 1

CheckArrayElementTypeFunction · 0.85

Calls 1

FamilyMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…