MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / ParseDTupleFromString

Function ParseDTupleFromString

pkg/sql/sem/tree/parse_tuple.go:173–181  ·  view source on GitHub ↗

ParseDTupleFromString parses the string-form of constructing tuples, handling cases such as `'(1,2,3)'::record`. The input type t is the type of the tuple to parse. The dependsOnContext return value indicates if we had to consult the ParseContext (either for the time or the local timezone).

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

Source from the content-addressed store, hash-verified

171// The dependsOnContext return value indicates if we had to consult the
172// ParseContext (either for the time or the local timezone).
173func ParseDTupleFromString(
174 ctx ParseContext, s string, t *types.T,
175) (_ *DTuple, dependsOnContext bool, _ error) {
176 ret, dependsOnContext, err := doParseDTupleFromString(ctx, s, t)
177 if err != nil {
178 return ret, false, MakeParseError(s, t, err)
179 }
180 return ret, dependsOnContext, nil
181}
182
183// doParseDTupleFromString does most of the work of ParseDTupleFromString,
184// except the error it returns isn't prettified as a parsing error.

Callers 1

ParseAndRequireStringFunction · 0.85

Calls 2

doParseDTupleFromStringFunction · 0.85
MakeParseErrorFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…