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

Function CheckArrayElementType

pkg/sql/types/types.go:2958–2964  ·  view source on GitHub ↗

CheckArrayElementType ensures that the given type can be used as the element type of an ArrayFamily-typed column. If not, it returns an error.

(t *T)

Source from the content-addressed store, hash-verified

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.
2958func CheckArrayElementType(t *T) error {
2959 if ok, issueNum := IsValidArrayElementType(t); !ok {
2960 return unimplemented.NewWithIssueDetailf(issueNum, t.String(),
2961 "arrays of %s not allowed", t)
2962 }
2963 return nil
2964}
2965
2966// IsDateTimeType returns true if the given type is a date or time-related type.
2967func IsDateTimeType(t *T) bool {

Callers 1

arrayOfFunction · 0.92

Calls 3

NewWithIssueDetailfFunction · 0.92
IsValidArrayElementTypeFunction · 0.85
StringMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…