ParseDBool parses and returns the *DBool Datum value represented by the provided string, or an error if parsing is unsuccessful. See https://github.com/postgres/postgres/blob/90627cf98a8e7d0531789391fd798c9bfcc3bc1a/src/backend/utils/adt/bool.c#L36
(s string)
| 352 | // string, or an error if parsing is unsuccessful. |
| 353 | // See https://github.com/postgres/postgres/blob/90627cf98a8e7d0531789391fd798c9bfcc3bc1a/src/backend/utils/adt/bool.c#L36 |
| 354 | func ParseDBool(s string) (*DBool, error) { |
| 355 | v, err := ParseBool(s) |
| 356 | if err != nil { |
| 357 | return nil, err |
| 358 | } |
| 359 | if v { |
| 360 | return DBoolTrue, nil |
| 361 | } |
| 362 | return DBoolFalse, nil |
| 363 | } |
| 364 | |
| 365 | // ParseDByte parses a string representation of hex encoded binary |
| 366 | // data. It supports both the hex format, with "\x" followed by a |
no test coverage detected
searching dependent graphs…