ParseDBitArray parses a string representation of binary digits.
(s string)
| 288 | |
| 289 | // ParseDBitArray parses a string representation of binary digits. |
| 290 | func 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 | |
| 300 | var errCannotCastNegativeIntToBitArray = pgerror.Newf(pgcode.CannotCoerce, |
| 301 | "cannot cast negative integer to bit varying with unbounded width") |
no test coverage detected