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

Function AsDBitArray

pkg/sql/sem/tree/datum.go:546–552  ·  view source on GitHub ↗

AsDBitArray attempts to retrieve a *DBitArray from an Expr, returning a *DBitArray and a flag signifying whether the assertion was successful. The function should be used instead of direct type assertions.

(e Expr)

Source from the content-addressed store, hash-verified

544// a flag signifying whether the assertion was successful. The function should
545// be used instead of direct type assertions.
546func AsDBitArray(e Expr) (*DBitArray, bool) {
547 switch t := e.(type) {
548 case *DBitArray:
549 return t, true
550 }
551 return nil, false
552}
553
554var errCannotCastNegativeIntToBitArray = pgerror.Newf(pgcode.CannotCoerce,
555 "cannot cast negative integer to bit varying with unbounded width")

Callers 2

MustBeDBitArrayFunction · 0.85
AdjustValueToTypeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…