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

Function ParseDBitArray

postgres/parser/sem/tree/datum.go:290–298  ·  view source on GitHub ↗

ParseDBitArray parses a string representation of binary digits.

(s string)

Source from the content-addressed store, hash-verified

288
289// ParseDBitArray parses a string representation of binary digits.
290func ParseDBitArray(s string) (*DBitArray, error) {
291 var a DBitArray
292 var err error
293 a.BitArray, err = utils.Parse(s)
294 if err != nil {
295 return nil, err
296 }
297 return &a, nil
298}
299
300var errCannotCastNegativeIntToBitArray = pgerror.Newf(pgcode.CannotCoerce,
301 "cannot cast negative integer to bit varying with unbounded width")

Callers 6

bit.goFile · 0.92
varbit.goFile · 0.92
bitExplicitFunction · 0.92
bitImplicitFunction · 0.92
varBitImplicitFunction · 0.92
ParseAndRequireStringFunction · 0.85

Calls 1

ParseFunction · 0.92

Tested by

no test coverage detected