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)
| 544 | // a flag signifying whether the assertion was successful. The function should |
| 545 | // be used instead of direct type assertions. |
| 546 | func AsDBitArray(e Expr) (*DBitArray, bool) { |
| 547 | switch t := e.(type) { |
| 548 | case *DBitArray: |
| 549 | return t, true |
| 550 | } |
| 551 | return nil, false |
| 552 | } |
| 553 | |
| 554 | var errCannotCastNegativeIntToBitArray = pgerror.Newf(pgcode.CannotCoerce, |
| 555 | "cannot cast negative integer to bit varying with unbounded width") |
no outgoing calls
no test coverage detected
searching dependent graphs…