ParseDArrayFromString parses the string-form of constructing arrays, handling cases such as `'{1,2,3}'::INT[]`. The input type t is the type of the parameter of the array to parse. The dependsOnContext return value indicates if we had to consult the ParseTimeContext (either for the time or the loca
( ctx ParseTimeContext, s string, t *types.T, )
| 168 | // The dependsOnContext return value indicates if we had to consult the |
| 169 | // ParseTimeContext (either for the time or the local timezone). |
| 170 | func ParseDArrayFromString( |
| 171 | ctx ParseTimeContext, s string, t *types.T, |
| 172 | ) (_ *DArray, dependsOnContext bool, _ error) { |
| 173 | ret, dependsOnContext, err := doParseDArrayFromString(ctx, s, t) |
| 174 | if err != nil { |
| 175 | return ret, false, makeParseError(s, types.MakeArray(t), err) |
| 176 | } |
| 177 | return ret, dependsOnContext, nil |
| 178 | } |
| 179 | |
| 180 | // doParseDArraryFromString does most of the work of ParseDArrayFromString, |
| 181 | // except the error it returns isn't prettified as a parsing error. |
no test coverage detected