MCPcopy Create free account
hub / github.com/auxten/postgresql-parser / ParseDArrayFromString

Function ParseDArrayFromString

pkg/sql/sem/tree/parse_array.go:149–155  ·  view source on GitHub ↗

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.

(ctx ParseTimeContext, s string, t *types.T)

Source from the content-addressed store, hash-verified

147// cases such as `'{1,2,3}'::INT[]`. The input type t is the type of the
148// parameter of the array to parse.
149func ParseDArrayFromString(ctx ParseTimeContext, s string, t *types.T) (*DArray, error) {
150 ret, err := doParseDArrayFromString(ctx, s, t)
151 if err != nil {
152 return ret, makeParseError(s, types.MakeArray(t), err)
153 }
154 return ret, nil
155}
156
157// doParseDArraryFromString does most of the work of ParseDArrayFromString,
158// except the error it returns isn't prettified as a parsing error.

Callers 2

ParseAndRequireStringFunction · 0.85
PerformCastFunction · 0.85

Calls 3

MakeArrayFunction · 0.92
doParseDArrayFromStringFunction · 0.85
makeParseErrorFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…