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

Function MakeParseError

pkg/sql/sem/tree/datum.go:281–288  ·  view source on GitHub ↗

MakeParseError returns a parse error using the provided string and type. An optional error can be provided, which will be appended to the end of the error string.

(s string, typ *types.T, err error)

Source from the content-addressed store, hash-verified

279// optional error can be provided, which will be appended to the end of the
280// error string.
281func MakeParseError(s string, typ *types.T, err error) error {
282 if err != nil {
283 return pgerror.Wrapf(err, pgcode.InvalidTextRepresentation,
284 "could not parse %q as type %s", s, typ)
285 }
286 return pgerror.Newf(pgcode.InvalidTextRepresentation,
287 "could not parse %q as type %s", s, typ)
288}
289
290func makeUnsupportedComparisonMessage(d1, d2 Datum) error {
291 return pgerror.Newf(pgcode.DatatypeMismatch,

Callers 13

ParseDArrayFromStringFunction · 0.85
ParseBoolFunction · 0.85
ParseDByteFunction · 0.85
ParseDUuidFromStringFunction · 0.85
ParseDUuidFromBytesFunction · 0.85
ParseDIntFunction · 0.85
ParseDFloatFunction · 0.85
setDecimalStringFunction · 0.85
ParseDTimeFunction · 0.85
ParseDJsonpathFunction · 0.85
ParseDOidAsIntFunction · 0.85

Calls 2

WrapfFunction · 0.92
NewfFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…